Skip to content

RecordOptions beta ​

Interface of @v12-engine/engine

ts
export interface RecordOptions

How a game is recorded (recordGame): whose side it is seen from when played back, and which kind of replay. commands (the default) keeps the start and what the players told it, and plays it back by running it again: a few kilobytes, every side of it, and the same to the last bit while the rules are (determinism D4). frames keeps what a watcher from player's side was sent, sendRate times a second: for a game whose rules cannot be run again

Members ​

checkpoints ​

ts
checkpoints?: number;

Ticks between the checkpoints a commands replay keeps (the world as a save, to be played from a moment without running all before it: going back, opening it halfway). None when left out: each is as big as a save

every ​

ts
every?: number;

Ticks between the hashes a commands replay keeps: 300 when left out

kind ​

ts
kind?: 'commands' | 'frames';

Which kind of replay to make: commands (the default) or frames

player ​

ts
player: PlayerId;

The player whose side the replay is seen from when played back

sendRate ​

ts
sendRate?: number;

Frames a second, of a frames replay: 10 when left out