Interface: LockstepView<Input>
Defined in: lockstep.ts:18
What clients see of a lockstep room.
Extended by
Type Parameters
| Type Parameter | Default type |
|---|---|
Input | unknown |
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
seed | number | Seed for the simulation's random numbers. The same for every player and every replay. | lockstep.ts:20 |
turn | number | The latest turn. | lockstep.ts:22 |
entries | TurnEntry<Input>[] | What happened in the latest turn, in the order every client must apply it. | lockstep.ts:24 |
desync | | { turn: number; } | null | Set 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? | number | How 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 |