That said, here's a quick explanation of how maps in my as of yet unnamed RPG work.
The map of the game world is made up of many small map files each representing a 25x24 set of map tiles. Since I plan on making the entire game world one map, these files need to be loaded as necessary.
First, we have a 3x3 array of maps, and the player. The "corners" in the array are not loaded at first.
The red squares represent loaded map sections. The center bit contains the player. |
In the array containing the sections, the adjacent loaded portions are moved left...
...and the remaining section is removed. |
The red and grey bits are the ones that have been moved. The red ones have been occupied by the player, and the green ones are newly loaded. |
No comments:
Post a Comment