Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
MIT License
12 stars 5 forks source link

Save load world generation #245

Closed snipercup closed 2 months ago

snipercup commented 2 months ago

Requires #244

Restoring the same functionality as we had before, but this time for a randomly generated world.

I tested it by starting a game, walked south for a bit, dropped a magazine in a container and exited the game. I then loaded the game and saw the same map and overmap, and the magazine was still in the container.

Testing was not thorough and I'm sure there's some bugs to fix, but this is a good first iteration. The map data is saved like this: image

Inside the segment folder you can find: image

The contents looks like this: image

I considered these alternatives for saving:

I think 4x4 is fine. Our largest tacticalmap is something like 6x6 which we were also saving in one file.