game-setup-and-config

Configures Phaser 4 game instances with GameConfig options for renderer, scaling, and FPS.

2|10|Updated Jul 28, 2026
One-click install
npx skills add https://github.com/kodingvibes/gamejam-2026 --skill game-setup-and-config-kodingvibes
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: game-setup-and-config
Source: https://github.com/kodingvibes/gamejam-2026/tree/main/participantes/jpyunism/.agents/skills/game-setup-and-config
Command: npx skills add https://github.com/kodingvibes/gamejam-2026 --skill game-setup-and-config-kodingvibes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a new Phaser 4 game requires navigating dozens of GameConfig options across renderer selection, canvas placement, scaling modes, pixel art rendering, and FPS limits, where misconfigured values cause silent failures or unexpected behavior. ## Core Features & Use Cases - Renderer and Boot Configuration: Choose between AUTO, CANVAS, WEBGL, and HEADLESS renderers and understand the full boot sequence from config parsing to the game loop. - Scaling and Pixel Art Setup: Apply scale modes like FIT, RESIZE, and EXPAND with centering, zoom, and pixel art or smooth pixel art rendering options. - Lifecycle and Gotcha Guidance: Manage pause, resume, and destroy flows while avoiding common mistakes like fps.target not enforcing frame rate or transparent overriding backgroundColor. - Use Case: You are building a retro pixel art game for a game jam and need a 320x240 canvas scaled up crisply to fill the browser window, so you configure pixelArt with FIT scale mode and ZOOM_2X using the provided pattern. ## Quick Start Create a new Phaser 4 game config for a pixel art game that scales to fit the browser window with a 60 FPS target.

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 create a new Phaser 4 game instance?▼

Create a Phaser.Game instance by passing a GameConfig object with type, dimensions, and a scene class. The constructor parses the config, creates global managers, waits for DOMContentLoaded, creates the renderer, and starts the game loop automatically.

How to configure pixel art rendering in Phaser?▼

Set pixelArt: true in the config, which automatically sets antialias to false and roundPixels to true for crisp scaled sprites. For WebGL-only smooth edges between blocky pixels, use smoothPixelArt: true instead.

What is the difference between Phaser.AUTO and Phaser.WEBGL?▼

Phaser.AUTO uses WebGL when supported and falls back to Canvas otherwise, while Phaser.WEBGL forces WebGL with no fallback and fails silently if unsupported. Phaser.CANVAS forces the Canvas renderer, and HEADLESS runs without rendering for unit testing.

Does Phaser scale mode FIT keep the aspect ratio?▼

Yes, Phaser.Scale.FIT fits the canvas inside the parent while keeping the aspect ratio, producing letterboxing. RESIZE fills the parent ignoring aspect ratio, and ENVELOP covers the parent possibly overflowing.

Why does fps.target not limit my Phaser game frame rate?▼

fps.target is advisory only and does not enforce the frame rate. Use fps.limit to actually cap FPS, but note the limit can only slow the game down since the browser display refresh rate is always the upper bound.

When should I use scale config versus top-level width and height?▼

Width, height, zoom, and parent can be set at the top level or inside the scale sub-object, but scale values take priority when both are present. Avoid setting both to prevent confusion and conflicting configuration.