billw2015
King
- Joined
- Jun 22, 2015
- Messages
- 837
I'm experimenting with this at the moment after noticing that we have granular control over what parts of a plot are rendered or not.
I modified the paging system so it can load/unload all these parts separately.
Here you can see the results from loading only one of the component types for the whole map:
It is also worth noting that the speed with which these can be turned on and off varies wildly, with FEATURE component being by far the slowest (it uses the plot builder which I guess is slow).
I have modified the paging system now so that these components can be toggled at different distances, so you can have yield symbols, roads and rivers on always, and units, cities and features only paged in when you are looking at them.
I also modified it so that it will page in progressively instead of trying to do it all in a single frame, this smooths the experience when panning the camera (it pages in more when you move more slowly, less when you move fast).
//edit: I updated the unit numbers after making all tiles visible, they are now the biggest cost, but of course usually you can't see ALL tiles, so you can take a fraction of this number as the "real" cost.
I modified the paging system so it can load/unload all these parts separately.
Here you can see the results from loading only one of the component types for the whole map:
Code:
Mem Use MB Mem diff Whats rendered
NONE 1403 0
SYMBOLS 1422 19 Yield symbols
FEATURE 1612 209 Improvements, terrain features, resources, resource icons
RIVER 1453 50 Rivers
ROUTE 1430 27 Routes
UNIT 1680 277 Units
CITY 1560 157 Cities
ALL 1964 561 All
I have modified the paging system now so that these components can be toggled at different distances, so you can have yield symbols, roads and rivers on always, and units, cities and features only paged in when you are looking at them.
I also modified it so that it will page in progressively instead of trying to do it all in a single frame, this smooths the experience when panning the camera (it pages in more when you move more slowly, less when you move fast).
//edit: I updated the unit numbers after making all tiles visible, they are now the biggest cost, but of course usually you can't see ALL tiles, so you can take a fraction of this number as the "real" cost.
Last edited: