Guides Build & Release Save Progress In A Web Build

Build & Release 2 min read Updated Nov 2026

Save Progress In A Web Build

In Web builds with browser storage support, put save slots and checkpoint files in your project's Saved/ folder. Lenga restores that folder before your game starts. Use Preferences for small settings such as volume, language, or control sensitivity.

Save At Checkpoints

Use PHP file operations to write into Saved/. Save at checkpoints or when a player chooses Save, rather than on every frame. For a slot you replace, write a temporary file beside it, close the file, then rename it over the slot. Check the result of the write and rename before showing a success message.

A successful PHP file operation updates the running game's files. The browser stores those changes shortly afterward. Saving only as the player closes the tab can lose the last changes, so save before that point.

Test Your Published Layout

  1. Open the game from the same page players will use, including its embed.
  2. Reach a checkpoint and create a save. Wait briefly before reloading.
  3. Reload the page and confirm the game restores progress.
  4. Open the game in a second tab. It shows "Game files will not be saved this session. Close the other game tab to save here." Only one tab saves at a time.

If Saves Do Not Return

Keep your project identifier stable between builds and use HTTPS for the game page. Saves belong to the project and the browser's storage for that site; they do not follow the player to another browser, device, or site. Clearing site data can remove saves. Private browsing, embed restrictions, and storage limits can prevent persistence. Check for a storage warning in the player and test your game in a regular window on its final host.

For the rest of the Web export workflow, see the Web export guides.