Skip to content

Interface: LockstepState<Input> ​

Defined in: server/lockstep.ts:7

What a lockstep room keeps: what clients see, and the inputs waiting for the next turn.

Extends ​

Type Parameters ​

Type Parameter
Input

Properties ​

PropertyTypeDescriptionInherited fromDefined in
seednumberSeed for the simulation's random numbers. The same for every player and every replay.LockstepView.seedlockstep.ts:20
turnnumberThe latest turn.LockstepView.turnlockstep.ts:22
entriesTurnEntry<Input>[]What happened in the latest turn, in the order every client must apply it.LockstepView.entrieslockstep.ts:24
desync| { turn: number; } | nullSet once two players reported different hashes for the same turn.LockstepView.desynclockstep.ts:26
clock?"players"Set to "players" by a room whose turnClock is "players": the room sleeps between turns, and closes them when a player's client asks.LockstepView.clocklockstep.ts:34
snapshotEvery?numberHow many turns go by between snapshots, when the room keeps them: a client whose simulation has save and load sends one each time the turn is a multiple of this.LockstepView.snapshotEverylockstep.ts:40
pendingTurnEntry<Input>[]Inputs and events waiting for the next turn. Not sent to clients.-server/lockstep.ts:9

MIT licence. Tickflare is an independent project and is not affiliated with Cloudflare.