RoomState
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
buildMismatch |
BuildMismatchReason | null |
The room’s build and the page’s where they differ, which the engine’s note names while she plays: from the room’s welcome, or from a room from before the warning that refused her for it; null otherwise. |
bytesPerSecond |
number |
What those messages weighed over the last second. |
characterId |
string | null |
The client’s own character, by the id the room’s dump keys her under; null until the welcome. |
correctionFields |
string[] |
The rewound fields whose values differed in those corrections, each once, such as transform or facing.rotation. |
correctionMetres |
number |
The largest of those corrections, in metres. |
correctionMilliseconds |
number |
- |
corrections |
number |
Times the room corrected her own character over the last second: each a move whose state the room ended past its tolerance from where the client had it end, such as her position past the pose tolerance, defaultPoseTolerance.position unless her control names one. |
correctionsTotal |
number |
Times the room corrected her own character since the page loaded its game, the last second’s among them: what a run over many seconds reads, where corrections starts over each second. |
correctionWarning |
string | null |
What the page says while the room has corrected her at a steady rate for seconds, as it does a page whose own systems fight the room’s: the traits of her the page holds otherwise. Null on a healthy page, and always in a built game. |
edits |
boolean |
Whether the room takes a devtools edit; false until the welcome says so, and once its socket closes. |
full |
RoomFullReason | null |
How full the room was when it refused her for being full, which a game shows as “This room is full (4 of 4)”; null otherwise. |
interpolationMilliseconds |
number |
How far behind the room’s last snapshot the streamed entities are drawn, as the pings set it: one send interval before the first answer. |
jitterMilliseconds |
number |
How much the round trip wanders: the mean change from one ping’s to the next’s over the last few; 0 before the second answer. |
lastDrop |
RoomDrop | null |
Why her last socket to the room closed where the room did not refuse her, which a game’s line for RoomStatus.Reconnecting reads: the room gone, or a message of hers too large for it; null before any. |
leadTicks |
number | null |
Ticks her page’s clock runs ahead of the room’s, as the room’s answers to her pings estimate its tick, at the end of the last second: the lead her input lands early by plus its trip. Null before the room’s first answer. |
leave |
() => Promise<boolean> |
Tells the room she leaves on purpose, which frees her character and her seat at once, and closes the connection for good. Resolves with whether the room released her: false with no room, while she reconnects, or when the room does not answer within leaveConfirmSeconds, and the room then keeps her character for its hold. The app calls it as the player leaves the game. |
move |
() => void |
Closes her socket as moved: her seat went to her session in another window or on another device, and the room stores her save and frees her seat at once. The app calls it as it hears so. |
notice |
RoomNotice | null |
What to tell the player about her connection now, in the game’s connectionText where it gives one, such as “Connection lost. Reconnecting…”; null while she plays, and before the page tries a room. A game’s status line shows its text. |
players |
number |
Players in the room: the streamed entities with a name. |
predictionChecks |
PredictionFinding[] |
What the prediction checks found on her page in development, one entry for each kind of mistake. Empty on a healthy page, and always in a built game. |
readViewStep |
() => number | null |
The room’s step this page draws the streamed entities at now, the one a shot names, for a game’s own message to name the moment her screen showed; null before the room has answered a ping. |
refusal |
RoomRefusal | null |
The code and reason the room closed her socket with when it refused her, whatever the reason; null until it does. full and buildMismatch read the two reasons a game shows. |
refusedShot |
ShotRefusedMessage | null |
The room’s last refusal of one of her shots, by the number sendShot returned, as the frame after it landed publishes it; null before any. A new record for each. |
refusedShotOrigins |
number |
Her shots the room refused for their origin since she joined it, as its last answer to a ping counted them. |
replayedSteps |
number |
Over the last second: the steps those corrections replayed, those that took their kept physics sweep rather than sweeping again, those that swept anyway because their kept sweep met a tie between two colliders, which a replay cannot prove it would break the same way, and the milliseconds the page spent receiving the messages that corrected her, the restores and replays among them. |
rerunMilliseconds |
number |
The slowest re-run of her predicted set over the last second, in milliseconds. |
roomStepMilliseconds |
number | null |
Milliseconds one of the room’s steps takes on the server, on average over its last few seconds, as its last answer to a ping said; null before the first, or from a room that does not say. |
roundTripMilliseconds |
number |
The time a ping takes to the room and back, the mean of the last few; 0 before the first answer. |
sendEdit |
(edit) => void |
Sends the room a devtools edit: the loop’s socket, which drops it until open. |
sendRate |
number |
The room’s sends a second, as its welcome named them: the game’s room setting, or the platform’s default. |
sendShot |
(shot) => number | null |
Sends the room a shot, naming the room’s step this page draws the streamed entities at, and numbered for a refusal to name: the loop’s socket, which drops it until open, and until the room has answered a ping since its welcome, since the clock names no step before then. Returns the shot’s number, from 0, or null for a shot dropped. |
sentBytesPerSecond |
number |
What her page’s messages to the room weighed over the last second: her input, a message a frame, her presses, pings and the rest. |
snapshotsPerSecond |
number |
The room’s snapshots and deltas applied over the last second. |
status |
RoomStatus |
- |
stepMilliseconds |
number |
Milliseconds one of the page’s own steps took, on average over the last second. |
takenSweeps |
number |
- |
tiedSweeps |
number |
- |