Outdoor or large environments best practices

bill0287

Member
In a topdown game, I am confused about how to handle "room" concepts for large outdoor environments.

If I were making a game that took place in a mall, for example, different stores could be different rooms, but if were making a game that takes place in a small town, how do you handle the sizing of rooms? Is it one large room to encompass the entire game playing field, or do you segment it out into smaller "rooms", and manage switching between them as the player crosses over. Many interlinked rooms seems tedious.

What is the best practice for something like that?

I attached a picture to kind of illustrate what I am asking. Is it one room for the entire map (red), or a series of rooms linked up (black)
 

Attachments

Fern

Member
You generally load chunks of the level and unload other chunks. So each 1024x1024 pixels is maybe a chunk. Check out instance activation/deactivation.
 

NightFrost

Member
One approach is tilesets. They minimze the memory footprint from graphics, so you can draw pretty large environments with the room editor's tile tools. Another approach is chunking as explained above. Your map is divided into pieces and only the nearby ones get loaded and those moving away are unloaded. This also normally involves motion trickery: when the character moves, it is actually the world that gets moved across the display. Consequently the room doesn't need to be larger than the view, and chunks get loaded in right outside its borders as they are approached.
 
Top