OutpostUniverse / OPHD

OutpostHD - Open source remake of Sierra On-Line's Outpost
BSD 3-Clause "New" or "Revised" License
107 stars 20 forks source link

Automatic Savegame Version Update? #541

Open ldicker83 opened 4 years ago

ldicker83 commented 4 years ago

When responding to #530, it occurred to me that with development, savegame versions will change and that could break previous savegame data. I had thought about this in the past about allowing the game to automatically updgrade savegames between versions but decided against it since 1) the game is still under heavy development and is subject to change a lot between versions and 2) it requires a lot of support code that would know the differences between each savegame version and would need to be able to update that as it went along.

Which made me think, what about a savegame upgrade utility? A stand-alone program that would do exactly that (and maybe could even be called by the game itself transparently in the background?) Still unsure about it -- I've manually done it in the past for truly breaking changes and just allowed the game to make assumptions to stay somewhat resilient and add missing information upon the next save.

Is this premature? Most of the savegames that I have demonstrate specific parts of the simulation and are now mostly obsolete though they do help to jump immediately into debugging without having to rebuild a colony each time.

DanRStevens commented 4 years ago

I think it's a bit early for us to worry about formally supporting saved game upgrades. Being able to upgrade any particular saved game during development could potentially become a lot of tedious work.

Saved game upgrades do seem important once we reach a formal official release, and people are actively playing the game. I want to avoid it until then though.

With that said, it is useful having a few saved games laying around for debugging purposes, so we'll probably want to do a bit of maintenance to keep them working. I'd be fine with the occasional hand edits for now.

We should probably find a way to add unit testing to this project. Currently we only do unit testing for the code in the NAS2D library. I think that's the real long term way of supporting testing needs.

ldicker83 commented 4 years ago

I would agree, though it's in the scope of a different issue. (unit tests)

As for save games, that's basically what I was thinking. I find I don't need to update them that often since there usually aren't a lot of truly breaking changes.

Anyway, I'll keep this issue open and mark it for v1.0.0 milestone.