Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+3)

If the game is losing web-based saves when you publish updates and you're using PlayerPrefs to store the save data, I came up with a solution to make it not lose data on updates. If you implement it in the next update then that update will still cause save data loss, but then it won't happen any more for any future updates. Feel free to use it, the source code and explanation of the underlying problem is here.

Thank you for the detailed post about it on Newgrounds! Other than for in-game settings (which is what PlayerPrefs was intended for), we're actually saving our save data to an actual .dat file to the /idbfs/ in a similar fashion to what you describe in the post.

However, what we don't do and it's likely the problem is that we don't specific a hard-coded /idbfs/ directory like you do in your script, and rather do it based on the directory that the browser specifies. Given that itch.io changes the URL for the html file everytime you upload, that's likely what's causing it to get scrambled. 🤔

In some of our previous games we have included Export/Import Save file options to help mitigate the issue (and also allow for players to switch from web to desktop at any time), though because of the short time it takes to play this game, we ended up not implementing it on this one. I do plan to implement it on a future version though!

I'll have to give a better through look at your explanation and script and making a few experiments, but what you share there seems to be about right! Thank you very much for sharing it and for the explanation. Cheers! 🐳