Tile Saving
Saving of the tilemap seems to be working now. I basically save everything, just how it is stored in RAM. Which results in a file that’s 7MB big. That makes me a bit worried, since that only includes chunks that are initialized. And since the track currently is pretty small, how much memory would a proper level take? Probably too much to run on a 3DS :/

The asset itself however can be shrunken down easily. I don’t have to store most of the tiles, since they are just the default tile without any additional information. That removes at least half the data and should shrunk the asset down to something like 3 or 4 MB. That’s acceptable I think. All tilemaps in the game would then only take 40MB or so. We have plenty of ROM space, so that all seems fine.

I won’t worry about the RAM space for now. In the end it wouldn’t matter if the game doesn’t run on the 3DS. It’s just a nice target for me. The platforms the game will release on have plenty of RAM for this kind of game. It could basically store all data in RAM probably and never need to load anything from disk. Though I am curious to learn new ways of shrinken that size down, without making the code too complex in the process. Let’s first just focus on getting tilemaps to save and load. That’s already enough work to get right.

Last modified: April 6, 2023