Documentation / @debuffjp/core / GameOptions
Interface: GameOptions
Defined in: game.ts:26
Properties
background?
optionalbackground?:string
Defined in: game.ts:45
Opaque background colour, cleared every frame. Default "#000".
canvas
canvas:
HTMLCanvasElement
Defined in: game.ts:27
clock?
optionalclock?:FixedClockOptions
Defined in: game.ts:43
container?
optionalcontainer?: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?
optionalpixelArt?:boolean
Defined in: game.ts:36
Nearest-neighbour sampling for crisp pixel art. Default false.
reducedMotion?
optionalreducedMotion?: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?
optionalrenderer?:"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?
optionalscale?:ScaleMode
Defined in: game.ts:32
Default "fit".
seed?
optionalseed?:number
Defined in: game.ts:42
splash?
optionalsplash?: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.