I'm considering releasing my game in episodes (updating the game as new episodes become available).
Do you see any problems related to saving and loading regarding this? In my mind components added to a scene later shouldn't pose a problem when loading a save game saved before components were added, right?
I'm also wondering just how experimental the JSON save format is, I seen the following disclamer:
Note: A limitation of this format is that GameObjects cannot have multiple 'Remember' scripts if one of those is a custom one.
I'm curious as to what you mean by "if one of those is a custom one".
Thanks!
AC: 1.69.1
Unity: 2019.2.5
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
So long as the data structure itself isn't changed, then you should be OK - though of course new Remember scripts added since wouldn't get correctly reset/loaded upon loading.
You would need to avoid removing / changing existing variables - though adding new ones should be OK, as well as maintain the order of player prefabs listed in your Settings Manager.
What may be a bigger threat is a change to AC's internal data structure, in which the save data made with one version of AC is no longer compatible with a newer AC release. This scenario is rare, and covered in the upgrade notes when this is the case, however I cannot yet rule out this being the case for the next major update.
For completeness: another option would be to release each episode as a separate AC project, but allow importing of save files from one to the next. This works by updating only the Global Variable values, so that the wider game can keep track of e.g. player choices, TTG-style.
By "custom one", I'm referring to a custom Remember script - as covered by this tutorial.
Thanks for a thoughtful answer. I totally get how maintaining backward compatibility between save games could be tricky..
Sorry, I don't quite follow you here.. How do you mean "allowing importing of save files"?
Ok, but having more than one built in component such as "Remember Visibility" and "Remember Animation" on an object would work, right?
See the Manual's "Importing save from other games" chapter. If each episode is a different project, you can transfer Global Variable values from other-episode save files provided they all share the same Variables Manager.
Test it out in a simple scene for reassurance, but yes - that should be fine.