Skip to content

Room

actions: Map<number, Act>

actions sent to the host and not answered yet: kept with their name and data, so a new host can be asked again


activeAt: number

when a person last did something here (moved, acted, sent an effect, joined, left, started, came back to the page, pressed stay); the host’s automatic shared writes and the pages’ clock pings do not count, so a game left running with nobody at it still ends


banned: Set<string>


byId: Map<string, Seat>


code: string


created: number

when the room was made (room list: newest first among equals)


docParts: Map<string, { at: number; n: number; parts: string[]; }>

documents arriving in parts: by sender and part key


docs: Map<string, Doc>

shared documents (Yjs) by name: the updates as sent (base64, never read here), numbered; see doc()


docsAt: number


docsDirty: boolean

documents changed since they were last saved; loaded (or nothing to load); pages that asked for a document before the load


docsFailed: boolean

the saved documents could not be read (nothing is written over them); when they were last written


docsReady: boolean


docWait: object[]

d: string

s: Session


exactAt: number

when sharedBytes was last counted in full (see sized)


flushN: number

state frames sent on the tick so far; a reader on rate 1/d gets every d-th one (see Session.div)


game: string


host: Seat | null


hostAliveAt: number


idleWarned: boolean

the players were told the room closes soon


key: string


lease: string

the world save this room holds the lease on (“” = none). One room at a time writes a given save.


loadAt: number


loadTries: number


match: number


nextAction: number


noSave: boolean

the host cleared the save (the game is won or lost): nothing is written until the next start


outAvg: number

data budget: the room’s moving average of bytes out a second, its send interval multiplier (1, 2, 4, 8) and whether its host was told


outBytes: number

bytes sent to this room’s sockets: total, at the last one-second mark, and the rate over the last second


outMark: number


outRate: number


owner: string

Play alone: the one seat this room belongs to (“” = a room for anyone). Its world save is that person’s own, not the shared one.


party: string

checkpoint saves (spec.cp): the signed-in seat that opened the room; the run is theirs (“” = none: a guest opened it, nothing is saved)


pendAt: number


pendFx: object[]

data: unknown

from: string

name: string


pendFxBytes: number


pendPlayers: Map<string, Record<string, unknown>>


pendPT: Map<string, number>

when the pending values were sampled by their senders (shared clock): per player id, and for the shared part


pendSC: number


pendShared: { patch: Record<string, unknown>; put?: Record<string, unknown>; term: number; } | null

put: the writes made with put (anyone’s, on open keys) since the frame, less what the host wrote over later: the host’s own frame has only these


phase: number

0..9: which sub-tick this room sends on, so all rooms do not write their sockets in the same instant


played: boolean

a match ended; the next start begins a new one


priv: boolean


resumed: boolean


rev: number


saveBusy: boolean

the game keeps a world save, but another room is playing it: this room is not saved


saved: { at: number; data: Record<string, unknown>; v: number; } | null


savedAt: number


savedWrev: number


scope: string


seats: Map<string, Seat>


shared: Record<string, unknown>


sharedBytes: number

JSON size of shared, kept like seat.stateBytes; writes since the last exact count


sid: string

this room’s session id for the store (one earlier copy per session)


sizeChecks: number


slot: string

the app’s stable key for saves (“” = none) and whether this room keeps a world save


slowF: number


slowTold: boolean


spec: Spec


specKey: string


startB: Bucket

match starts and ends (startRate): each one sends the whole shared state to every reader


started: boolean


startWait: { at: number; resume: boolean; } | null

a Start that came while the save was still loading: run once it is loaded (Continue / New game is offered first when a save turns up)


term: number


tickN: number


tiers: Map<number, Frame> | null

per slower rate (2, 4): everything since that rate’s last frame, merged; null while every reader is on the full rate


world: boolean


worldState: "off" | "loading" | "ready" | "failed"

the world save’s load: nothing is written (and nothing cleared) until it is “ready”; “failed” retries on a timer (loadAt)


wrev: number

how many shared writes the room had at the last world write; a world save is due when it differs