game-setup-and-config

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

465|41|Updated Aug 4, 2026
One-click install
npx skills add https://github.com/autonomous-ai/openharness --skill game-setup-and-config-autonomous-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: game-setup-and-config
Source: https://github.com/autonomous-ai/openharness/tree/main/store/agents/phaser/skills/game-setup-and-config
Command: npx skills add https://github.com/autonomous-ai/openharness --skill game-setup-and-config-autonomous-ai

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 frame rate control, 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, understand the boot sequence, and hook into preBoot/postBoot callbacks. - Scaling and Pixel Art Setup: Apply scale modes like FIT, RESIZE, and EXPAND, configure centering and zoom, and enable pixelArt or smoothPixelArt rendering modes. - FPS, Input, and Lifecycle Control: Set FPS targets and limits, toggle input subsystems, pause/resume the game loop, and destroy game instances cleanly. - Use Case: When starting a new pixel art platformer, generate a complete GameConfig with WebGL renderer, 320x240 base resolution, FIT scaling with 2x zoom, and pixel art rendering enabled in one step. ## Quick Start Create a new Phaser 4 game config for a pixel art game that scales to fit the browser window.

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 a renderer type and at least one scene class. The minimal config uses type: Phaser.AUTO and a scene with preload and create methods, producing a default 1024x768 canvas.

How to configure pixel art rendering in Phaser?

Set pixelArt: true in the config, which automatically disables antialiasing and enables roundPixels 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 tries WebGL first and falls back to Canvas if unsupported, while Phaser.WEBGL forces WebGL with no fallback and fails silently if unavailable. Use AUTO unless you specifically require WebGL features.

Does Phaser scale mode FIT keep the aspect ratio?

Yes, Phaser.Scale.FIT fits the canvas inside its parent while preserving aspect ratio, producing letterboxing. Use RESIZE to fill the parent ignoring aspect ratio, or ENVELOP to cover the parent with possible overflow.

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

The fps.target property is advisory only and does not enforce a frame rate cap. Use fps.limit to actually cap the frame rate, though the browser's display refresh rate remains the upper bound.

When should I use Phaser.HEADLESS renderer?

Use Phaser.HEADLESS for unit testing game logic without rendering output. It skips renderer creation but still requires a DOM environment, so it is not suitable for pure Node.js execution without a DOM shim.