Skip to content

Interface: LockstepView<Input> ​

Defined in: lockstep.ts:18

What clients see of a lockstep room.

Extended by ​

Type Parameters ​

Type ParameterDefault type
Inputunknown

Properties ​

PropertyTypeDescriptionDefined in
seednumberSeed for the simulation's random numbers. The same for every player and every replay.lockstep.ts:20
turnnumberThe latest turn.lockstep.ts:22
entriesTurnEntry<Input>[]What happened in the latest turn, in the order every client must apply it.lockstep.ts:24
desync| { turn: number; } | nullSet once two players reported different hashes for the same turn.lockstep.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.lockstep.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.lockstep.ts:40

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