CommandReplay beta
Interface of @v12-engine/engine
export interface CommandReplayA game recorded as its start and its commands (recordGame's kind: 'commands'), to run again (playReplay)
Members
checkpoints
checkpoints?: [tick: number, save: string][];The world as it was every so many ticks (recordCommands' checkpoints), as saves: a replay played from a moment starts from the last one before it, not from its start. None in a replay made before there were any
commands
commands: [tick: number, command: IssuedCommand][];What its players told it, each at the tick it was given at, before that tick ran
debug
debug?: PlayerId[];The players who could use the debug commands as it was recorded (World.debugPlayers, which no save keeps): played back, they may again, so a game whose cheats were used (the editor's Play here, its map edits pushed) comes to the same. None when left out
format
format: 2;The replay's file format, always 2; another is not read
from
from: number;The tick it started and ended at
game
game: string;The game it is of, by id: a page plays back what it has
hashes
hashes: [tick: number, hash: string][];The world's fingerprint (worldFingerprint) every every ticks, to tell where a game played back came apart
kind
kind: 'commands';Marks this replay as one of commands, as opposed to a recording of snapshots
player
player: PlayerId;Whose side it is seen from when played back; any side can be, as all of the game is in it
rules
rules: string;The rules it was played with exactly (registry.hash): other rules may play it otherwise
saves
saves: number[];The ticks it was saved at: a save puts the crowd back as a load does (D2), so playing back does it there too
start
start: string;The world as it was at from, as a save (encodeSave)
tickRate
tickRate: number;Ticks per second the game ran at, for the replay to run at again
to
to: number;The tick the recording ended at