Save files being erased
Posted: Sun May 22, 2022 8:19 pm
Hi there, I am having users report that their save files are being lost randomly. It seems to happen randomly when upgrading to a new version of the game, or just if the game doesn't load right all of their progress is lost.
When my game loads I do a load of the save file, and save periodically through the game and when the game closes. I'm thinking that sometimes if the game crashes it saves a blank version of the save file over the existing one.
Could you please share the best practices around loading and saving data to make sure I don't overwrite existing data with a new save file?
---
Second question, could you please clarify how to save the save file as text so I can post it to a web URL and have it saved in REDIS as a string?
I saw the example on it but I'm still confused how to get my existing save file as a string and then how to replace current values with values from a string if the player loads their data from my server?
Thanks
When my game loads I do a load of the save file, and save periodically through the game and when the game closes. I'm thinking that sometimes if the game crashes it saves a blank version of the save file over the existing one.
Could you please share the best practices around loading and saving data to make sure I don't overwrite existing data with a new save file?
---
Second question, could you please clarify how to save the save file as text so I can post it to a web URL and have it saved in REDIS as a string?
I saw the example on it but I'm still confused how to get my existing save file as a string and then how to replace current values with values from a string if the player loads their data from my server?
Thanks