Commit Graph

4 Commits

Author SHA1 Message Date
RoosterDragon
59b3cd154d Change indexes into tile arrays to be stored as bytes to save memory.
The index value needs only be big enough to handle all defined terrain types. This is a low number so we can save memory by defining it as a byte. This particularly saves memory for the CustomTerrain field in the Map class, which defines a cell layer for the map using tile indexes, so we can reduce the size of that layer 4x as a result.
2014-10-09 20:03:01 +01:00
Matthias Mailänder
8649475b91 document engine limitations 2014-08-24 08:16:59 +02:00
RoosterDragon
a512d9ad0a Sped up shroud rendering.
- Only update shroud within the visible screen area, rather than the whole map. This improves performance on larger maps significantly when scrolling around since large portions of the shroud do not need to be updated.
- Provide methods in Shroud to return delegates to check for explored/visibility for tiles within a certain region. This allows it to return more efficient delegates whenever the region is within the map bounds, or shroud/fog is disabled. In the typical case where the region is in bounds and shroud/fog is enabled, the fast check is almost twice as fast as the slow check.
- Use the Shroud delegate functions in shroud rendering, frozen actors, minimap rendering and resource layer areas to provide a speedup since these areas of code can often take advantage of the fact they perform checks within the map boundary.
- Cache current element in CellRegionEnumerator to prevent repeated work if the element is accessed more than once.
- Decrease the size of elements in some arrays in hopes of reducing memory needs and improving cache hits.
2014-07-07 17:34:31 +01:00
Matthias Mailänder
0feb5a7bdc check for building influence when growing resources
closes #5556
2014-07-04 09:22:14 +02:00