Hello everyone,

Recently, I added a game saving system to my WIP game, Hop! 2D, and I just realised it did not work for its online version on itch.io. The game currently allows to save 2 kinds of data in external files : one for the general parameters (langage, sounds and numbers of unlocked worlds), and one for each saved game (up to 6) with many more parameters (last level, lives, energy, general stats, etc.). While I thought those data were properly saved, the game seems to restart from scratch every time I relaunch it on itch.io.

I know the difference between res:// (path of the root directory of the game) and user:// (internal path linked to OS) to save data as files but I've tried both of them and none seems to work for the online version (everything works fine for downloadable ones).

Any idea of how I could fix it ? Thanks for your help

Problem solved !

I guess it only came from using res:// instead of user:// to store config and saved games files. It's really strange because I feel like I already changed this before without any effect on the itch.io version of my game. Maybe the way of quitting it was not right from the browser ?

I may apply changes only to the online version because I feel like using res:// on downloable versions (more accessible and "transportable" config files and saved games).

You shouldn't use res:// for saving stuff ever. Though if the user downloads a zip it might work, due to permissions, this is not guaranteed.

OK, thanks for this tip, I will take care of it. I realised I also forgot "file.close()" in some places of my code, I guess that may cause problems too when quitting an online session.