itch.io is community of indie game creators and players

Devlogs

Local Saving and Itch Desktop App Compatibility

State-Based HTML5 Itch Template
A browser tool made in HTML5

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 2 MB
    Apr 25, 2022
Download State-Based HTML5 Itch Template
Leave a comment