RoomSettings
What a game declares of its room, each setting optional.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
maxPlayers? |
RoomPlayers |
The most players one room holds; defaultRoomPlayers when left out. A game for more players than this runs several rooms. |
rejoinHoldSeconds? |
number |
Seconds the room holds a dropped player’s seat, her player and what she controls for her page to come back to, above 0 and at most mostRejoinHoldSeconds. Left out, 15 seconds after a page closed its socket and 30 after a connection broke. |
sendRate? |
60 | 30 |
The room’s sends a second; defaultRoomSendRate when left out. 30 sends each player about half the bytes and shows other players about 15 ms later. |
textChat? |
boolean |
Whether players type to each other in the room; true when left out. false turns text chat off for the game: no page draws its window, and the room refuses a message with chat-off, and drops a game’s own. The filter on a playerText() field runs either way. |
voice? |
boolean |
Whether players talk in the room; true when left out. false turns voice off for the game: the room starts no voice, and no page asks for a microphone, opens voice’s connection or draws the microphone button. setVoice turns voice off for a phase of a game that has it. |