Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Phaser 3 2D game dev: scenes, physics, tilemaps, sprites, polish.
.claude/skills/notque-phaser-gamedev/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 96% | 0% |
This skill builds complete Phaser 3 2D games using a Phased Construction pattern: DESIGN (plan game type, physics, scenes) → BUILD (scene lifecycle, sprites, tilemaps) → ANIMATE (physics, animation state machines, input) → POLISH (camera effects, particles, tweens, sound, mobile). Targets Phaser 3.60+ throughout.
Scope: Platformers, arcade shooters, top-down RPGs, puzzle games, and side-scrollers — anything 2D in Phaser 3. Use threejs-builder for 3D games, native mobile games, and non-Phaser canvas work.
| Signal | Load These Files | Why | |---|---|---| | references/core-patterns.md | core-patterns.md | Always | | references/build-scaffolds.md | build-scaffolds.md | Phase 2 BUILD | | references/animate-scaffolds.md | animate-scaffolds.md | Phase 3 ANIMATE | | references/polish-scaffolds.md | polish-scaffolds.md | Phase 4 POLISH | | references/errors.md | errors.md | Error Handling | | references/arcade-physics.md | arcade-physics.md | Arcade physics | | references/tilemaps.md | tilemaps.md | Tilemap / Tiled | | references/spritesheets.md | spritesheets.md | Sprites / animation | | references/performance.md | performance.md | Performance concern | | references/game-feel-patterns.md | game-feel-patterns.md | Polish / juice signal | | references/tilemaps-and-physics.md | tilemaps-and-physics.md | Complex maps / Matter.js |
Goal: Understand what to build, select the physics system, and plan the scene graph before writing any code.
Core constraints:
Step 1: Identify the game type
From the user's request, determine: game genre (platformer, shooter, RPG, puzzle, side-scroller), primary physics need, number of scenes, tilemap or procedural world, spritesheet or texture atlas.
Step 2: Select the physics system
| Physics | Use When | When Not to Use | |---------|----------|------------| | Arcade | Platformers, shooters, simple AABB | Rotating bodies, non-rectangular shapes | | Matter.js | Physics puzzles, destructible terrain | Performance-critical (100+ bodies) | | None | Puzzles, card games, UI-only | Any meaningful collision detection |
Step 3: Document the scene plan and load references
Write a short markdown scene plan covering: Boot, Game, UI, Physics choice, World, Sprites (measured frame dimensions).
Load these references based on the plan:
references/core-patterns.md (scene lifecycle, transitions, input)references/tilemaps.mdreferences/spritesheets.mdreferences/arcade-physics.mdreferences/performance.mdreferences/game-feel-patterns.mdreferences/tilemaps-and-physics.mdGate: Scene plan documented. Physics system selected. References loaded. Proceed only when gate passes.
Goal: Implement the scene lifecycle skeleton, load assets, place sprites, wire up tilemaps.
Core constraints:
frameWidth/frameHeight is the #1 Phaser bug; open the PNG, count pixels per frame before writing this.load.spritesheet()preload() — never load assets in create() or update()Full TypeScript scaffolds (entry point, BootScene with progress bar, GameScene skeleton): references/build-scaffolds.md.
Gate: Boot and Game scenes compile. Assets load without console errors. Scene transitions work. Proceed only when gate passes.
Goal: Add physics-driven movement, animation state machines, and player input.
Core constraints:
update() — no new Phaser.Math.Vector2(), no this.physics.add.sprite(), no array creation per frame; allocate in create(), reuse in update()delta for frame-rate-independent movement — velocity = speed * (delta / 1000) ensures consistent feel at any FPS'idle' | 'walk' | 'jump' | 'attack' | 'dead' prevents impossible states like isJumping && isAttackingAnimation definitions (anims.create), the Player state machine, and input handling scaffolds: references/animate-scaffolds.md. Collision groups, overlap callbacks, and physics tuning: references/arcade-physics.md.
Gate: Player moves. Animations transition correctly. State machine has no impossible state combinations. No per-frame allocations. Proceed only when gate passes.
Goal: Add camera work, particles, tweens, sound, and mobile controls. Verify performance.
Core constraints:
debug: true from physics config before shippingconsole.log calls unless the user explicitly requested loggingFull scaffolds for camera effects, particles (Phaser 3.60+ API), tweens, sound, mobile virtual controls, and final verification steps: references/polish-scaffolds.md.
Gate: Polish checks pass. Performance within budget. Debug config removed. Game is shippable.
Common errors and fixes (spritesheet frame mismatches, undefined body access, tilemap collision no-ops, animation failures, mobile slowdowns): references/errors.md.
| Reference | When to Load | Content | |-----------|-------------|---------| | references/core-patterns.md | Always | Scene lifecycle, transitions, input, state machines | | references/build-scaffolds.md | Phase 2 BUILD | TypeScript entry point, BootScene with progress bar, GameScene skeleton | | references/animate-scaffolds.md | Phase 3 ANIMATE | Animation definitions, Player state machine, input handling | | references/polish-scaffolds.md | Phase 4 POLISH | Camera, particles, tweens, sound, mobile controls, verification | | references/errors.md | Error Handling | Common Phaser error scenarios and fixes | | references/arcade-physics.md | Arcade physics | Groups, colliders, velocity, physics tuning, pitfalls | | references/tilemaps.md | Tilemap / Tiled | Layer system, collision, animated tiles, object layers | | references/spritesheets.md | Sprites / animation | Frame measurement, loading, atlases, nine-slice | | references/performance.md | Performance concern | Object pooling, GC avoidance, texture atlases, mobile | | references/game-feel-patterns.md | Polish / juice signal | Screen shake, particle bursts, hit-stop, scale punch, tween chains, sound timing | | references/tilemaps-and-physics.md | Complex maps / Matter.js | Tiled integration pipeline, Matter.js vs Arcade decision table, collision categories, slopes, object layer spawning |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→fail | 20,588 | 20,914 | +2% | 1 | 1 | 0% | 3,859 | 6,023 | +56% | 0 | 0 | — |
case-04 | pass→pass | 22,605 | 15,586 | -31% | 1 | 1 | 0% | 3,838 | 4,711 | +23% | 0 | 0 | — |
case-05 | fail→fail | 16,169 | 14,524 | -10% | 1 | 1 | 0% | 3,256 | 4,686 | +44% | 0 | 0 | — |
case-01 | fail→pass | 26,168 | 23,741 | -9% | 1 | 1 | 0% | 4,710 | 6,584 | +40% | 0 | 0 | — |
case-02 | fail→fail | 27,244 | 22,292 | -18% | 1 | 1 | 0% | 5,165 | 6,202 | +20% | 0 | 0 | — |
case-06 | pass→pass | 19,435 | 15,869 | -18% | 1 | 1 | 0% | 2,971 | 4,499 | +51% | 0 | 0 | — |
case-07 | fail→pass | 17,551 | 6,993 | -60% | 1 | 1 | 0% | 2,648 | 3,030 | +14% | 0 | 0 | — |
case-08 | pass→pass | 11,984 | 4,438 | -63% | 1 | 1 | 0% | 2,268 | 2,692 | +19% | 0 | 0 | — |
case-09 | pass→pass | 13,676 | 16,681 | +22% | 1 | 1 | 0% | 2,286 | 4,856 | +112% | 0 | 0 | — |
case-10 | pass→pass | 4,575 | 4,263 | -7% | 1 | 1 | 0% | 763 | 2,636 | +245% | 0 | 0 | — |
case-11 | fail→pass | 18,359 | 13,380 | -27% | 1 | 1 | 0% | 3,154 | 4,647 | +47% | 0 | 0 | — |
case-12 | fail→pass | 19,054 | 9,829 | -48% | 1 | 1 | 0% | 2,687 | 3,701 | +38% | 0 | 0 | — |
case-13 | fail→pass | 9,452 | 6,162 | -35% | 1 | 1 | 0% | 1,526 | 2,986 | +96% | 0 | 0 | — |
case-14 | pass→pass | 15,998 | 7,201 | -55% | 1 | 1 | 0% | 2,326 | 3,128 | +34% | 0 | 0 | — |
case-15 | fail→fail | 13,114 | 6,420 | -51% | 1 | 1 | 0% | 1,888 | 2,925 | +55% | 0 | 0 | — |
case-16 | fail→pass | 12,492 | 3,331 | -73% | 1 | 1 | 0% | 1,994 | 2,517 | +26% | 0 | 0 | — |
case-17 | fail→pass | 10,095 | 2,700 | -73% | 1 | 1 | 0% | 1,408 | 2,369 | +68% | 0 | 0 | — |
case-18 | fail→pass | 10,509 | 3,267 | -69% | 1 | 1 | 0% | 1,547 | 2,498 | +61% | 0 | 0 | — |
case-19 | fail→fail | 11,247 | 4,110 | -63% | 1 | 1 | 0% | 1,605 | 2,560 | +60% | 0 | 0 | — |
case-20 | fail→fail | 10,185 | 6,627 | -35% | 1 | 1 | 0% | 1,656 | 2,988 | +80% | 0 | 0 | — |
case-21 | pass→pass | 12,270 | 10,283 | -16% | 1 | 1 | 0% | 1,873 | 3,542 | +89% | 0 | 0 | — |
case-22 | fail→fail | 7,674 | 1,879 | -76% | 1 | 1 | 0% | 1,176 | 2,154 | +83% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +36 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.