Skip to content

five-on-it / apps/client/src/renderer/game / GameOptions

Interface: GameOptions ​

Defined in: apps/client/src/renderer/game.ts:355

What createGame needs from the page.

Properties ​

audio ​

audio: AudioSystem

Defined in: apps/client/src/renderer/game.ts:363

The audio system, fed every frame.


canvas ​

canvas: HTMLCanvasElement

Defined in: apps/client/src/renderer/game.ts:357

The render target.


cue? ​

optional cue?: (sound) => void

Defined in: apps/client/src/renderer/game.ts:379

Plays a menu cue (the pause's squelch, its menu's moves).

Parameters ​

sound ​

"pause" | "back"

Returns ​

void


follow? ​

optional follow?: Store<MapCentre | undefined>

Defined in: apps/client/src/renderer/game.ts:361

What the minimap centres on, published every frame (the player, or the teammate watched).


levelSource? ​

optional levelSource?: LevelSource

Defined in: apps/client/src/renderer/game.ts:371

Where its level came from (level-cache.ts); inline when absent.


onMission? ​

optional onMission?: (state, mission) => void

Defined in: apps/client/src/renderer/game.ts:383

Hears of a mission begun, done or failed (the anonymous statistics, with the player's consent: ui/telemetry.ts).

Parameters ​

state ​

"complete" | "failed" | "begun"

mission ​

string

Returns ​

void


overlay ​

overlay: Store<OverlayState>

Defined in: apps/client/src/renderer/game.ts:359

The overlay's store: the HUD numbers and the music state go there.


platform? ​

optional platform?: Platform

Defined in: apps/client/src/renderer/game.ts:375

The platform's client: the phone's Jobs app asks it what there is to play (in the city); none, no Jobs app.


radio? ​

optional radio?: Radio

Defined in: apps/client/src/renderer/game.ts:381

The radio (audio/radio.ts), followed every frame; none, no radio.


rtc? ​

optional rtc?: Pick<RtcTransport, "via" | "view">

Defined in: apps/client/src/renderer/game.ts:367

Its data channel (rtc.ts): which way the frames go, for the HUD and window.__poc; the WebSocket alone without.


settings? ​

optional settings?: Store<Settings>

Defined in: apps/client/src/renderer/game.ts:377

The player's settings (volumes, controls, the HUD), read every frame; the game's own without.


social? ​

optional social?: Social

Defined in: apps/client/src/renderer/game.ts:373

The page's social side: the room's parties, and what window.__poc shows of it.


transport ​

transport: Transport

Defined in: apps/client/src/renderer/game.ts:365

The connection to the game server, already welcomed.


welcome ​

welcome: LoadedWelcome

Defined in: apps/client/src/renderer/game.ts:369

The server's welcome: the client id, the clock and the level (inline, or fetched by its hash).