I'm currently considering my options for setting up a save system for my game, and would like some advice.
My game is set up with a separate database for each scene, plus a master database which is loaded in every scene. This works fine as long as no saving / loading is needed. Everything that needs to be transferred between scenes is in the master database, all the rest is just loaded along with the scene. Nothing in my game is persistent at the moment, nothing gets transferred between scenes.
Of course, if the user can save and reload the game at any time, the data in my scene-specific databases also needs to be saved somehow. I can think of a hundred ways to approach this, and I've done some reading around the documentation, but I'd like your opinion before making any decisions.
I had a smaller project that used DSFU before, where I set up my own basic save manager that uses
Code: Select all
string s = PersistentDataManager.GetSaveData();
PersistentDataManager.ApplySaveData(s);
I could of course use the built-in save system, but I gather from the documentation that this doesn't play well with multiple databases:
This implies that everything that's not in the initial (master) database doesn't get saved.<The initial database> should include everything that needs to be in a saved game
Of course, the nuclear option is to get rid of my multiple databases altogether and just merge everything. Either by making one big database file, or by loading all databases in every scene. In the latter case using GetSaveData may work - though I'm not sure. The save data only seems to contain variable names, not ids, so I don't know what would happen if the same variable name was used in multiple scenes.
Any ideas / opinions? What would you recommend?