Networking · interface

RewindOptions

Explained in Networking and rollback.

interface RewindOptions<S>
import type { RewindOptions } from '@driftengine/network';

Properties

NameTypeDescription
stepreadonlySimStep
snapshotterreadonlySnapshotter<S>
inputsreadonlyInputLog
fixedDtreadonlynumberSeconds per fixed step, and it must be the loop's.
More

Required rather than defaulted, because a replay that stepped a different delta from the run it is replaying produces a different world while looking entirely healthy.

depthreadonlyoptionalnumberHow many ticks back a rewind can reach. Eight at 60 Hz is 133 ms.
More

The cost is one snapshot per tick of depth, held for the life of the session. §15 of the design carries the measurement.