For a web-based game, I'd like the player to be able to save their progress to a downloadable file. That way, they can resume their progress from another device if needed, as long as they have the file on a flash drive, cloud, etc.
Is this possible, and if yes, how could I achieve this?
After using "System Save" action, in a "On Save Complete" event SaveStateJSON expression will contain all the saved data. You can download it with "Browser invoke download" action.
To load game from the file, you need to first get the file URL using FileChooser object, and then load it with "System Load from JSON" action.
Saving the file to downloads works, but the 'FileChooser -> On Changed' event triggers a 'load failed'.
I was able to fix the issue by loading the chosen file into AJAX first, then loading JSON from AJAX.LastData. Not sure what caused the issue :/
Develop games in your browser. Powerful, performant & highly capable.
Oh, sorry, of course that should be done with AJAX. I made that comment in a hurry.