What problem does it solve?
Setting up Phaser 4 game configuration can be confusing, especially when choosing the right renderer, scaling strategy, pixel art behavior, and FPS controls.
Core Features & Use Cases
- Boot the right GameConfig: Guides how
new Phaser.Game(config) parses defaults and performs the DOM-ready boot sequence, including renderer creation and loop start.
- Tune renderer and visual fidelity: Explains
type selection (AUTO/CANVAS/WEBGL/HEADLESS) plus pixel-art settings like pixelArt and smoothPixelArt.
- Scale and canvas layout: Covers common scaling modes (FIT/ENVELOP/RESIZE/EXPAND), centering behavior, zoom, and how top-level
width/height are overridden by the scale sub-object.
- Use configuration extras safely: Documents practical options such as
parent handling, transparent, input disabling, DOM canvas placement, and boot callbacks (preBoot/postBoot).
Quick Start
Create a minimal Phaser 4 game by defining a Scene, setting a basic GameConfig with type and the Scene, then passing the config into new Phaser.Game(config).