Page 1 of 1

Save slot summaries with a separate file

Posted: Thu Oct 27, 2022 3:48 pm
by jlhacode
This is follow up to the How To: Include Summary Info In Saved Games post from 2019.
(https://www.pixelcrushers.com/phpbb/vie ... php?t=2594)

It seems like storing a separate file with summary data would be a bit more efficient to me. What would be the recommended way of doing this using the SaveSystem?

Re: Save slot summaries with a separate file

Posted: Thu Oct 27, 2022 6:02 pm
by Tony Li
Hi,

I don't have many specific tips. Here are some that come to mind:

- You could make a subclass of SavedDataStorer (or DiskSavedDataStorer) that has an extra method to also save a summary file in addition to calling StoreSavedGameData. For example, save the game to save_1.dat and the summary info to save_1_summary.dat.

- Make it platform-independent. On PC, you might save to a local disk file. On consoles, you might save to cloud storage. Hide the implementation details from the rest of your project, which will just call the extra method.

Re: Save slot summaries with a separate file

Posted: Thu Oct 27, 2022 6:43 pm
by jlhacode
Awesome, thanks Tony!

Re: Save slot summaries with a separate file

Posted: Thu Oct 27, 2022 7:33 pm
by Tony Li
Glad to help!