Although you’re definitely much more knowledgeable on the issue Kevin, it would seem that the only parts of the map that need to be saved are the ones that have been activated by the player since the last save. If you wanted to get even more specific, you could check whether any tiles in the ‘activated’ parts of the map have changed since previous save. For example, if you’re driving along a road it doesn’t need to re-save that road because none of the tiles changed in the few seconds you drove over it. That’s just my two cents and I have no idea how easy it would be to implement, but it would be very helpful in reducing save time
(among other things I’m sure)[/quote]
Yea, muchly. Basically you need any map chunks where something is happening loaded into memory, and maybe a few more for performance reasons. Right now that just means the “reality bubble” around the player, there have been rumblings of making fire spread work better, which means pinning any tiles that are on fire into memory as well. Even better, once you leave an area, you can write the map chunks back out to disk, so there’s a very small amount to write out when you manually save. Even even better, this would allow us to do map load/generate/save more incrementally, so when you’re moving around, it would load/generate/save a few map tiles per step rather than a whole bunch whenever you cross a threshold, and if you stopped moving for a few seconds, it could use that slack time to get ahead and load/generate/save a bunch of them.
The thing holding this up is the fact that all map chunks are stored in one gigantic file (maps.txt), so you can’t just load a few chunks at a time. This needs some heavy-duty refactoring to let us save/load a reasonable number of map chunks at once. Or once I dig in it might end up being easy, you never know 