Problem Summary
The player has to wait before entering a (new) part of the game.
Use When
Typical to free roaming games e.g. MMO's, role playing, action or simulation games where players have the ability to move around freely in large persistent game worlds. Typically such worlds are partitioned into smaller zones as it cannot be loaded in whole in the memory. When a player moves from one zone to another the player usually must wait for the new zone to be loaded into memory before continuing playing the game.
Solution
Provide a seamless gameworld
A seamless gameworld allows you to move around in the game world without experiencing any loading times. Being able to render a large seamless game world may have a significant effect on the game engine design, an example implementation could be as follows:
- The entire world is broken up into chunks (chunk size depending on available memory).
- Nine chunks are loaded into memory at any given time, the chunk the player is currently in and the 8 surrounding chunks.
- As the player moves out of the central chunk into one of the bordering chunks, the 3 chunks farthest from the player are discarded and the chunk the player just entered then becomes the center chunk. 3 new chunks are loaded to complete the 3x3 grid.
Recommendations
- This algorithm can be fine tuned by having some adaptive caching algorithm that could check how close a player is getting to a certain border chunk. As the player gets closer more and more of it is paged in bits and pieces at a time, so that by the time the player gets to the chunk it is loaded and available for rendering/interaction. If the player gets a certain distance away from it, it can be completely trashed to free up resources.
- The chunks can either be loaded in a separate thread or in the same as long as the player does not have to wait to load a chunk.
- This algorithm could potentially be extended to 3 dimensions where 27 chunks may need to be cached.
Rationale
Having a large, persistent world creates a level of constant immersion for the player as the game never stops and never loads. This solution increases efficiency and satisfaction.
Examples
References
- ↑ Scott Bilas, The Continuous World of Dungeon Siege http://www.drizzle.com/~scottb/gdc/continuous-world.ppt