ID:154227
 
Anyone know if its possiable to generate a map at run time? And send the player to that location? This would be a map created from no where at runtime. And only those players who enter that space will be able to interact and see each other. It be like a LIST, and everything inside the list would make up the room/map. I'm thinking to do this later for my Galatic Force game where when u enter a space ship it allows you to walk around inside it and see and interact with things while aboard and moving around in space. Then when you arrive at a planet or station you can dock and walk off the ship. This could also carry a spaceship full of players to a destination, and the Navigator would see an over view map like in Star Traders.

LJR
LordJR wrote:
Anyone know if its possiable to generate a map at run time?

Yes, it's possible. Back when I was working on my first project, an RPG, and I had the map saving/loading, when you went to an unloaded zone, it would incrementally put together the zone while you walked around.

Each time you moved, the area around you and one spot further out would be loaded (if it hadn't been already), and in the remaining time the zone would fill itself in a little more each tick.

That was loading a pre-existing map, but the principle would be the same for a dynamic map.

In fact, using block(), you could be constantly creating the map on the fly as they moved.
In response to Deadron
Now if only there were some way to do that on a map that didn't have edges, I could create my infinite space environment...
In response to Foomer
Think about it! Just reverse rolls. Instead of moving the mob around, move the map around the mob! Where the mob would stay fixed in the center of the screen.

LJR
In response to LordJR
We've been discussing this type of thing in another thread. The main problem isn't generating the maps for the player, it's allowing player to player interaction. If each player is on a seperate z layer for example (so you could "move the map" arround each player differently then you'd have to come up with some system of displaying players (and there actions!) to eachother. That is where the true difficulty seems to lie...
In response to English
Well just like the map you make it dynamic as well. Like every tile will have a var placement. And then you pool all the tiles to see whats there or whaves been updated, like another character that has moved into that space. Also lists will need to be used wisely so as to link everything up in a quick easy to read codewise manner.

Also you could combine this with savefiles so everything thats dropped or left on this map including the map itself can be saved and referenced when needed. Unless the ship gets destroyed, then you'd also delete the file. Or clear it out and mark it for reuse.

ps. Just I can foresee much lag in this process from the constant pooling of tiles, basically you'd be re-writing a part of the BYOND game engine.

LJR
In response to Deadron
Deadron could you explain this auto creatyion feature more thouroghly. I was wondering how to make it so once a ship is created at run time. The inside is generated as well. Then once the ship is deleted delete the area too.
In response to LordJR
LordJR wrote:
Well just like the map you make it dynamic as well. Like every tile will have a var placement. And then you pool all the tiles to see whats there or whaves been updated, like another character that has moved into that space.

Yep, but that still doesn't cover the issue of exactly how to handle player actions that other players can view. Would they be mobs that are copies of the players? Would they be screen objects?
might ask FIREking i think he was doing something similar...