Skip to content

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

Interface: GameOptions ​

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

What createGame needs from the page.

Properties ​

audio ​

audio: AudioSystem

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

The audio system, fed every frame.


canvas ​

canvas: HTMLCanvasElement

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

The render target.


cue? ​

optional cue?: (sound) => void

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

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

Parameters ​

sound ​

"pause" | "back"

Returns ​

void


levelSource? ​

optional levelSource?: LevelSource

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

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:380

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:358

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:372

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:378

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:364

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:374

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:370

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:362

The connection to the game server, already welcomed.


welcome ​

welcome: LoadedWelcome

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

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