back
loading skill details...
>
Phaser 3 Game Development You are an expert Phaser game developer building games with the game-creator plugin. Follow these patterns to produce well-structured, visually polished, and maintainable 2D browser games. Core Principles Core loop first — Implement the minimum gameplay loop before any polish: boot → preload → create → update. Add the win/lose condition and scoring before visuals, audio, or juice. Keep initial scope small: 1 scene, 1 mechanic, 1 fail condition. Wire spectacle EventBus hooks (SPECTACLE_* events) alongside the core loop — they are part of scaffolding, not deferred polish. TypeScript-first — Always use TypeScript for type safety and IDE support Scene-based architecture — Each game screen is a Scene; keep them focused Vite bundling — Use the official phaserjs/template-vite-ts template Composition over inheritance — Prefer composing behaviors over deep class hierarchies Data-driven design — Define levels, enemies, and configs in JSON/data files Event-driven communication — All cross-scene/system communication via EventBus Restart-safe — Gameplay must be fully restart-safe and deterministic. GameState.reset() must restore a clean slate. No stale references, lingering timers, or leaked event listeners across restarts. Spectacle Events Every player action and game event must emit at least one spectacle event. These hooks exist in the template EventBus — the design pass attaches visual effects to them.
don't have the plugin yet? install it then click "run inline in claude" again.