World storage

Added a new article on the website about the data structures used to store the world :


2 comments so far

Add Your Comment
  1. I’d probably go with the dynamic map sizes, it would be pretty easy to generate a map on a 100×100 temporary grid and then cull it to the smallest fitting rectangle. Imagine a level with a single large tower in the middle, and the memory that would be saved! 🙂

  2. Yes, but you still have pathological cases (like two towers at north-west and south-east corners of the region). TCOD currently use the last solution (several little maps for each feature). This uses the smallest amount of memory but the map may become fragmented if there are lots of buildings, which may have an impact on performances. The next step would be either to add a ‘smart map merger’ that merge map fragments that are ‘near enough’ or to store map fragments in a bsp tree instead of a list. I’m not really impatient to sweat on this… 😉