Local Saving and Itch Desktop App Compatibility


Saving and loading are now also supported in the itch desktop app.

I did some research, and it turns out that the itch desktop app downloads the HTML and javascript files, and runs them locally, (rather than from the server.) This allows you to play your downloaded games even when offline.

The template can now detect whether the user is playing via server or locally, (but storing and then retrieving a test cookie.) If the user is local, the game will populate some additional save/load buttons to the page, which can allow the user to manually download/upload a save file. The server-based autosave is more convenient, but this is the tradeoff when developing mobile/web/local-compatible apps with vanilla js.

Files

H5SBE Source.zip 2 MB
Apr 25, 2022
HTML5 State-Based Engine.zip Play in browser
Apr 25, 2022

Get State-Based HTML5 Itch Template

Leave a comment

Log in with itch.io to leave a comment.