@zaisma/save
Save and load: a game's progress and what each of its pieces keeps of its own (the player's controls), written at the right moments, upgraded from older saves, never written over when it changed elsewhere, and kept in the browser (on Zaisma it follows the player's account) or on the game's own game server, on Zaisma or a developer's own.
- Kind
- Foundation
- Built on
- @zaisma/standard
- Version
- 1.0.0
- Licence
- MIT, open source
- By
- btc7274
- Rated
- No ratings yet
ShellCopied
npx @zaisma/cli pieces add @zaisma/saveWhat it needs
Nothing: it stands on its own.
Fits is said only for what Zaisma ran together. Not tested means nobody at Zaisma has.
Settings and hooks
Everything a game can change without editing the piece, so it moves to a newer version and keeps the game's changes.
- write_delay_msHow long after a change the save is written, in milliseconds, so many changes close together are one write. The save is always written at once when the game is hidden or closed.Number, 0 to 60000, starts at 500Setting
- writing_enabledWhether changes are written. Off (a replay, a tutorial that mustn't count), progress still changes in the game and nothing is written; turned on again, what's waiting is written.On or off, starts onSetting
- problemTold when the stored save couldn't be used or a write or a send failed, with { code, message, fix }. Without a handler, it's printed as a warning.Event
- changed_outsideTold when the stored save was changed elsewhere (another tab, another device through the game server, an earlier copy put back, the developer) and is now the one in use, with the progress: redraw from it.Event
- conflictTold when two progresses met (this device played offline while another played on): the one saved last is in use, and this gets the other, { otherProgress, otherPlace } with otherPlace this_device or elsewhere, to offer the player.Event
- writtenTold after each write, with { savedAt }: show a saved mark here.Event
- sentTold when a store that keeps the save on a server has it there, with { savedAt }.Event
None.
Versions
- 1.0.0Nov 29, 2026 · 11 files · 72 KBNewest
No version has passed its checks yet.







