Game over; save everything or only what has changed

Discussion and help for Easy Save 3
Post Reply
danosono
Posts: 12
Joined: Mon Feb 21, 2022 12:58 pm

Game over; save everything or only what has changed

Post by danosono »

Happy hello,

I have 66 dictionaries holding player stats (each dictionary contains about 500 keys each with a value of a class with 6 or 7 simple fields); in a typical play session, only some of the dictionaries change.

Should I simply save all dictionaries at the end of gameplay (is there overhead saving an unchanged dictionary?) or should I set bools for dictionaries that have changed and use a conditional statement to only save changed dictionaries or does EasySave3 have an if (item.changed) > then save - type of functionality?

Thanks!
Danny
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Game over; save everything or only what has changed

Post by Joel »

Hi there,

I would just save all of the Dictionaries unless you're encountering performance issues.

If you're encountering performance issues, I'd then follow this guide:
https://docs.moodkie.com/easy-save-3/es ... rformance/

If you're still encountering performance issues after that, then I would consider setting a bool for your Dictionaries and only save the ones which have changed (Easy Save doesn't contain this functionality because the act of comparing the data to the saved data would have a greater performance impact than simply saving the data).

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
danosono
Posts: 12
Joined: Mon Feb 21, 2022 12:58 pm

Re: Game over; save everything or only what has changed

Post by danosono »

Thanks very much for the information!

Danny
Post Reply