Skip to content

Documentation / @debuffjp/core / GameOptions

Interface: GameOptions ​

Defined in: game.ts:26

Properties ​

background? ​

optional background?: string

Defined in: game.ts:45

Opaque background colour, cleared every frame. Default "#000".


canvas ​

canvas: HTMLCanvasElement

Defined in: game.ts:27


clock? ​

optional clock?: FixedClockOptions

Defined in: game.ts:43


container? ​

optional container?: HTMLElement

Defined in: game.ts:34

Element whose size drives scaling. Default: the canvas's parent.


height ​

height: number

Defined in: game.ts:30


pixelArt? ​

optional pixelArt?: boolean

Defined in: game.ts:36

Nearest-neighbour sampling for crisp pixel art. Default false.


reducedMotion? ​

optional reducedMotion?: boolean | "auto"

Defined in: game.ts:50

Honour the player's reduced-motion preference. "auto" (default) follows prefers-reduced-motion live; true/false force it.


renderer? ​

optional renderer?: "webgl2" | "2d" | "auto"

Defined in: game.ts:41

Rendering backend. auto (default) uses WebGL2 and falls back to Canvas 2D when it is unavailable. Both implement the same draw API (ADR 0007).


scale? ​

optional scale?: ScaleMode

Defined in: game.ts:32

Default "fit".


seed? ​

optional seed?: number

Defined in: game.ts:42


splash? ​

optional splash?: boolean | SplashOptions

Defined in: game.ts:59

A short "made with debuff" card when the game first starts, before your first frame. Any key, click or tap skips it. Not shown in dev, or when time is driven by step() (scenarios, agents). false removes it. Default on.

Publishing on Poki? Turn it off: Poki doesn't allow splash screens. Other portals have similar rules; see https://debuff.jp/docs/publishing.


width ​

width: number

Defined in: game.ts:29

Logical resolution. Game code always works in these units.