Skip to content

ReplayChoice beta ​

TypeAlias of @v12-engine/client

ts
export type ReplayChoice = boolean | {
    checkpoints?: number;
    keep?: (replay: Replay) => void;
};

Whether a game played in the page is recorded and kept as a replay (see recordGame): in this browser (true), not at all (false), or as said: checkpoints keeps the world every so many ticks (REPLAY_CHECKPOINTS when left out, 0 for none), so going back in it and opening it halfway are quick (RecordOptions.checkpoints; a save each, so bigger), and keep is handed the replay in place of this browser