Skip to content

RoomClock

Defined in: packages/engine/src/gameplay/replication/clock.ts:28

What the client knows of its room’s clock.

Property Type Description
interpolationSeconds number Seconds over which a streamed entity is drawn toward the last snapshot: one send interval, and the spread of the kept round trips on top, the most a delta lands late when all of it is on the way down.
offsetSteps number The room’s step less the client’s clock in steps: the mean of the faster half of the kept answers, whose halves of the round trip are the closest to even.
pongs number Answers recorded since the last reset.
roundTripMilliseconds number The mean round trip of the kept answers; 0 before the first.
samples ClockSample[] The last keptPongs answers, a ring the nth answer stands in at n % keptPongs: made once and written in place.