I’m trying to recreate the grid system from RimWorld, and I’m facing an issue when having to save the map, which can be up to 500×500 tiles in size.
My map has multiple layers, the base layer is procedurally generated from a seed, so I can just save that seed and regenerate that terrain without having to save all of the tile data.
However, on that base layer, you can place floors and other things which by themselves don’t hold any extra information.
The way Rimworld does this (according to their save file and based on my understanding), is that it somehow converts all of that grid data to one giant string, which at runtime is then “de-obfuscated” and loaded back as actual floor tiles.
Here’s an example:
However, every other object which needs to hold any significant data is saved like this:
What would be a good way to save such simple data, similar to how Rimworld did it? 500×500 maps are huge on their own since every single grass already has to keep data about itself, and doing the same way of saving for things which only need e.g. location saved would create insanely large save files.