|
This might be too much of a departure if you've already defined your basic map structure, but Metroid has an interesting system:
The only "real" map is the top-level world map, a 16x16-byte array of screen numbers (so a total space of 256 screens theoretically, but many positions are empty and some screen numbers are reused with different tilesets, so there are nowhere near that many unique screen layouts).
Each screen number has an associated list of objects to stamp out to build that screenful of the world.
Each object is a ragged array of metatile numbers.
Each metatile is a 2x2 array of the pattern numbers that go in the VRAM name table.
So when entering a new screen, the game looks up its screen number and walks the object list to render that screen into VRAM. Transitions to new tile/enemy/code sets (there are five sets, one for each "area": Brinstar, Norfair, Kraid, Ridley, and Tourian) are handled with the elevators. This is mostly tied to the game originally being on FDS and thus needing to stop to load from disk. |