Networking · function
randomSnapshotter
A generator, as one number.
Explained in Networking and rollback.
function randomSnapshotter(rng: SavablePosition): Snapshotter<import { randomSnapshotter } from '@driftengine/network';Parameters
| Parameter | Type | Description |
|---|---|---|
rng | SavablePosition |
In depth
Not restoring this is the classic silent rollback bug. Everything looks correct until a replayed tick draws from the generator, gets the next number instead of the one it got the first time, and produces a world that is plausible and different. Nothing in a frame can see it.