Saving / Loading
| Saving and Loading is currently INCUBATING. |
| Loading a saved game must happen with the exact same underlying database state as it was saved, else the results are unpredictable. |
Persistence mechanism
| The principle of saving/loading in TBE is that we are creating a separate class for everything that we want to save/load. This means we are creating our own serialization layer between our unity runtime data and the final serialization (which a.t.m. uses JSON). |
The namespace tbe.incubator.save contains the TBE serialization layer and provides an infrastructure for using and enhancing TBE serialization with you own needs.
The idea is that the user extends the classes that start with the Simple* prefix. Those classes being:
-
SimpleSaveGameRuntimeData-
This class merely provides shortcuts to the runtime data that we want to save.
-
-
SimpleCreateSaveBhv-
This actually creates our save game.
-
-
SimpleSaveGame-
A value object that holds the save game data to be written to the save file.
-
-
SimpleLoadGameBhv-
This loads our save game.
-