phaser

Build 2D browser games with Phaser 3 using scene-based architecture and centralized state.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires phaser, vite, typescript, bitecs, and includes references (resource) components.

What problem does it solve? Building a 2D browser game from scratch involves dozens of architectural decisions—scene structure, state management, physics, input handling, and performance optimization—that beginners often get wrong, leading to memory leaks, broken restarts, and unmaintainable code. ## Core Features & Use Cases - Enforced Architecture Conventions: Mandates a core/ directory with an EventBus singleton, centralized GameState with reset(), and a Constants file so games stay restart-safe and free of magic numbers. - Complete Implementation Patterns: Provides reference guides for scenes and lifecycle, game objects, object pooling, Arcade vs Matter.js physics, state machines, texture atlases, and mobile-first input with touch controls. - Asset-Free Visual Polish: Includes procedural design techniques—gradients, parallax layers, particles, screen shake, and spectacle events—so games look polished without any image assets. - Use Case: A game jam participant asks the AI to create a mobile-friendly endless runner; the Skill scaffolds a Vite + TypeScript Phaser project with Boot/Preloader/Game/GameOver scenes, pooled obstacles, touch and keyboard input, and a pre-ship validation checklist. ## Quick Start Create a new Phaser 3 game where the player taps to jump over obstacles, with score tracking and a clean restart on game over.

Frequently Asked Questions about phaser

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

FAQPage Schema
How do I create a 2D browser game with Phaser 3?▼

Start with the official phaserjs/template-vite-ts template, then structure the project with Boot, Preloader, Game, and GameOver scenes. Use a core/ directory containing an EventBus singleton, a GameState singleton with reset(), and a Constants file for all configuration values.

Arcade Physics vs Matter.js in Phaser: which should I use?▼

Arcade Physics is fast and lightweight, best for platformers, top-down games, and shooters with simple AABB or circle collisions. Matter.js supports polygon shapes, rotation, and constraints for realistic physics simulations. Never mix both engines in the same game.

How do I make a Phaser game work on mobile and desktop?▼

Abstract input into an inputState object merging keyboard, touch, and pointer events so game logic is source-agnostic. Use capability detection via 'ontouchstart' in window, show visible touch controls, and keep interactive targets at least 44x44px.

Why does my Phaser game have bugs after restarting a scene?▼

Stale EventBus listeners and lingering timers survive scene restarts and cause double-firing or ghost behavior. Remove all EventBus listeners in each scene's shutdown() handler and call GameState.reset() to restore a clean slate before restarting.

How do I improve Phaser game performance on mobile?▼

Pack sprites into texture atlases instead of individual images, pool frequently created objects with Groups using maxSize, and only iterate active children in update loops. Reduce particle counts, prefer circle physics bodies, and consider a 30fps target.

Can I make a polished Phaser game without any art assets?▼

Yes, use Phaser.GameObjects.Graphics for procedural visuals: gradient backgrounds, parallax layers from sine-wave hills, ambient particles, and vignette overlays. Add juice with squash-and-stretch tweens, screen shake, and eased animations, all constrained to a 3-5 color palette.