game-setup-and-config

Configure Phaser 4 GameConfig for renderer, scaling, pixel-art, and FPS options.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill game-setup-and-config-artriv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: game-setup-and-config
Source: https://github.com/ArtRiv/game-topicos-especiais/tree/main/skills/game-setup-and-config
Command: npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill game-setup-and-config-artriv

SYSTEM DOCUMENTATION & REQUIREMENTS

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).

Frequently Asked Questions about game-setup-and-config

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a Phaser 4 game instance with the right renderer and scaling?

To configure a Phaser 4 game, define a GameConfig object mapping top-level properties and the scale sub-object, then pass it to new Phaser.Game(config) to execute the boot sequence and start the render loop.

What is the difference between top-level width/height and the scale sub-object in Phaser 4?

In Phaser 4 GameConfig, the scale sub-object overrides top-level width and height properties to manage responsive canvas layouts, applying scaling modes like FIT, ENVELOP, RESIZE, and EXPAND for game positioning.

How do I enable pixel art rendering in a Phaser 4 game configuration?

Enable pixel art rendering in Phaser 4 by setting the pixelArt and smoothPixelArt properties in the GameConfig, which ensures the renderer maintains crisp visual fidelity without smoothing pixelated game assets.

Does Phaser 4 GameConfig support limiting FPS during the game boot sequence?

Yes, Phaser 4 GameConfig supports limiting FPS by configuring the fps.limit property, allowing you to cap the frame rate when the game boot sequence initializes the render loop.

Which renderer type should I select for a Phaser 4 game: AUTO, CANVAS, WEBGL, or HEADLESS?

Select the Phaser 4 renderer type using the type property in GameConfig: AUTO defaults to WebGL, CANVAS uses 2D context, WEBGL uses GPU acceleration, and HEADLESS runs logic without rendering visuals.

Can I use preBoot and postBoot callbacks when setting up canvas placement in Phaser 4?

Yes, you can use preBoot and postBoot callbacks in the Phaser 4 GameConfig to execute logic during the DOM-ready boot sequence, safely handling parent DOM canvas placement and input disabling.