Resumable builds: let testers carry on from their saves
A resumable build loads its whole state from the saved keys. That lets testers carry on where they left off, on any device and across builds, and lets you open any tester's save in the game yourself. It's part of saves and replays, which studios have on request: ask in the studio (https://studio.betacade.com/saves-replays) or at hello@betacade.com.
Before you turn it on#
Only mark a build resumable once the game keeps all its state in localStorage (see Game state): it loads everything from those keys at startup and writes them with setItem, removeItem or clear. Restoring a save into a game that keeps state anywhere else can corrupt it.
Turn it on#
In the studio, open the game, find the build in Builds and choose Mark resumable. The same place turns it off again.
On a resumable build, the play page offers each tester who shares data Switch save (their saves on any device they're signed in on) and Go back in time (one save's checkpoints).
Help the replay viewer#
The studio's replay viewer loads the game with a tester's save at each save point, then freezes it. The game should help: when window.wt?.replaying is true, load and draw the saved state, skip offline catch-up, intros and random events, don't save, and call wt.ready() once drawn.
const replaying = window.wt?.replaying === true;
const state = loadGame();
if (!replaying) applyOfflineProgress(state, Date.now() - state.savedAt);
render(state, { skipIntro: replaying });
window.wt?.ready?.();
Outside Betacade, window.wt doesn't exist, so with optional chaining the game runs the same anywhere. For smooth, moment-by-moment playback, see Smooth replay.