Wiki / Saving

Saving

The game autosaves to this browser every 15 seconds (localStorage). Nothing leaves your machine: there is no account, no server, no sync. That also means browser storage is the only copy, and browsers may evict it without asking. The save code is the real backup.

  • Export: Settings → Save → Export copies a code to your clipboard. Paste it anywhere safe (a note, a file). It restores everything: progress, parts, pets, the works.
  • Import: paste any code into Settings → Save → Import. Codes from older versions of the game always load (saves migrate forward automatically); codes from a NEWER version than the build you are running are refused rather than guessed at.
  • Offline progress accrues while the tab is closed, up to a cap, and is reported when you return.
  • The yellow banner that appears when you have no recent backup does exactly one thing: it copies a fresh save code to your clipboard. Audio settings are device-local and deliberately not part of the save.

The save code format (for fan tools)

Codes are deliberately parseable. The recipe, should you want to build a planner, editor or analyzer:

  • A code is the string BME1- followed by LZString compressToBase64 output (the lz-string library, any port works).
  • Decompressing yields JSON: { version, savedAt, data }. version is the save schema version, savedAt a Unix ms timestamp, data the full game state.
  • Inside data, every big number (Scrap, Components, HP...) is a Decimal string like "1.5e21", not a JSON number. Parts, wires, pets, minigame states are plain objects; the authoritative shape is src/core/save/schema.ts in the repo.
  • To produce a code the game will accept: build the same JSON envelope, compress with compressToBase64, prepend BME1-. Imports are validated strictly and migrated by version, so older shapes stay loadable forever.
  • Fair warning for tool authors: the schema can change between updates while the game is in active development. The version field is your compatibility signal.