Saves
Game-scoped JSON storage for guests and signed-in players.
On this page
Read and write
await ZUQ.init();
const state = (await ZUQ.saves.get()) ?? {level: 1};
state.level += 1;
await ZUQ.saves.set(state);Guest saves use localStorage on this device. Verified signed-in accounts use the existing account cloud-save service. The result of set reports cloud:true or cloud:false. Browser storage can be cleared or unavailable. Inspector saves are in-memory test data only.
Limits and conflicts
Save one JSON snapshot per game, below the 64 KiB request cap including its value envelope. Do not save tokens, personal data or payment state. Serialize save requests; concurrent live saves reject. Account changes during a request reject. Handle network/storage errors and show the player when saving has failed. The current external save is a latest-write snapshot, not a merge engine or authoritative score store.