sashman / kingdomforge

2 stars 1 forks source link

Continuous map loading #5

Closed sashman closed 11 years ago

sashman commented 11 years ago

Background

The game now loads multiple submaps and allows for traversal between them, however when the character gets closer to the edge, new set of submaps needs to be loaded and rendered on top.

submap - _represented by one output file from the terraingenerator view_map - multiple submaps concatenated together and rendered by the engine

What needs to be done

Allow for new view_maps to be loaded when a character nears the edge of the current one. Should also keep at least 2 view_maps in memory as cache.

How to do it

Check for when the character enters bounds for new view_map generation. Once that happens, request new view_map with appropriate submaps in it, render the new view_map on top of the current one and discard any cached maps.