pioneerspacesim/pioneer — Issue #633: Lua save format changes
Author: robn
Created: 2011-10-08 11:32:17+00:00
State: open
Labels: Design

Usually when the save format changes we do a version number bump. This is fine for core stuff, but I'm wondering what to do about modules. A module changing its save format can break the game load, but it would result in a script failure, not a load failure. It shouldn't require a version bump and third-party scripts couldn't arrange that anyway.

I'm inclined to say that modules that want to change their save format should manage versioning themselves. I want to say they should degrade gracefully (either be backward-compatible or ignore the save data and bring up a reasonable default state) but we don't place that requirement on the core, so maybe that's not fair. On the other hand, its very difficult to place such a requirement on the core because of the binary nature of the savefile. Scripts should have it easier because their savedata is typically a Lua table which has more flexibility.

Something we could do is provide a save utility library to modules that tries to handle versioning and anything else.

Thoughts?