{
  "markdown": "# game-creator\n\n**Go from game idea to deployed, monetized browser game in minutes — not hours.**\n\nTell your AI coding agent \"make a space invaders game\" and get a fully playable 2D or 3D browser game with pixel art, procedural audio, and automated QA. Deploy instantly to the web. Monetize with [Play.fun](https://play.fun).\n\nWorks with **40+ AI coding agents** — Claude Code, Codex, Cursor, and more via `npx skills add`.\n\n## Install\n\n```bash\nnpx skills add playableintelligence/game-creator\n```\n\nTarget a specific agent:\n\n```bash\nnpx skills add playableintelligence/game-creator -a claude-code\nnpx skills add playableintelligence/game-creator -a codex\nnpx skills add playableintelligence/game-creator -a cursor\n```\n\n## Quick Start\n\n```bash\n# Build a complete 2D game in one shot (scaffold → pixel art → design → audio → deploy → monetize)\n# QA subagent runs after every step (build, runtime, gameplay, architecture, visual)\n/game-creator:viral-game 2d my-game\n\n# Build from a tweet\n/game-creator:viral-game https://x.com/user/status/123456\n\n# Or design a real game project with milestones, ADRs, and multi-session iteration:\n/game-creator:make-game\n\n# Or run individual steps on an existing game:\n/game-creator:add-assets          # Replace shapes with pixel art sprites\n/game-creator:design-game         # Add visual polish (particles, juice, transitions)\n/game-creator:add-audio           # Add chiptune music and sound effects\n/game-creator:add-feature jetpack # Add a gameplay feature\n/game-creator:improve-game        # Audit + implement highest-impact improvements\n/game-creator:monetize-game       # Register on Play.fun, add SDK, get monetized URL\n/game-creator:review-game         # Code review for architecture + best practices\n/game-creator:qa-game             # Add Playwright QA tests\n```\n\n## How It Works\n\n`/viral-game` is an orchestrator that delegates all code writing to subagents and runs a QA subagent after every code-modifying step. (For the deeper, multi-session `/make-game` workflow with phases, milestones, ADRs, and `docs/STATE.md`, see `skills/make-game/`.)\n\n```\nStep 0  Parse args, create task list                           ← main thread\nStep 1  Scaffold game from template                            ← code subagent → QA subagent\nStep 1.5 Add pixel art sprites (2D only)                       ← code subagent → QA subagent\nStep 2  Visual polish (particles, juice, transitions)          ← code subagent → QA subagent\nStep 3  Audio (Strudel.cc BGM + SFX)                           ← code subagent → QA subagent\nStep 4  Deploy to here.now                                     ← main thread (instant publish)\nStep 5  Monetize with Play.fun                                 ← main thread (interactive auth)\n```\n\nThe QA subagent runs 5 phases per step: build check, runtime check (headless Chromium), gameplay verification (iterate client with game-specific actions), architecture validation, and visual review (Playwright MCP screenshots). If any phase fails, an autofix subagent patches the code and QA re-runs (up to 3 attempts per step).\n\n## Architecture\n\nEvery game follows the same architecture, whether 2D or 3D:\n\n```\nsrc/\n├── core/\n│   ├── EventBus.js       # Singleton pub/sub — all cross-module communication\n│   ├── GameState.js      # Centralized state with reset() for clean restarts\n│   ├── Constants.js      # Every magic number, color, timing, speed\n│   └── GameConfig.js     # Engine config (Phaser or Three.js)\n├── scenes/               # Scene lifecycle (Phaser) or states (Three.js)\n├── entities/             # Game objects (player, enemies, obstacles)\n├── systems/              # Background, particles, spawners\n├── sprites/              # Pixel art data (palette, matrices, tiles)\n├── audio/                # Strudel.cc procedural audio\n│   ├── AudioManager.js   # Init, play, stop wrapper\n│   ├── AudioBridge.js    # Wires EventBus → AudioManager\n│   ├── music.js          # Background music patterns\n│   └── sfx.js            # Sound effect patterns\n├── playfun.js            # Play.fun SDK integration\n└── main.js               # Entry point + render_game_to_text() + advanceTime()\n```\n\n**EventBus** — Modules never import each other. All communication via pub/sub with `domain:action` event names.\n\n**GameState** — Single source of truth. `reset()` gives a clean slate for restarts.\n\n**Constants** — Zero hardcoded values in game logic. Sizes are proportional (`GAME.WIDTH * ratio`), with DPR-aware scaling for retina displays.\n\n**`render_game_to_text()`** — Every game exposes `window.render_game_to_text()` returning a JSON string of current game state, so AI agents can read the game without interpreting pixels.\n\n## Skills\n\n### Reference Skills (loaded automatically by Claude when relevant)\n\n| Skill | Purpose |\n|-------|---------|\n| `phaser` | 2D game patterns — Phaser 3 scenes, arcade physics, high-DPI rendering |\n| `threejs-game` | 3D game patterns — Three.js event-driven architecture, modular systems |\n| `game-assets` | Pixel art sprites — `renderPixelArt()`, `renderSpriteSheet()`, palette system |\n| `game-designer` | Visual polish — gradients, particles, screen shake, transitions, juice |\n| `game-audio` | Procedural audio — Strudel.cc BGM patterns + Web Audio SFX |\n| `game-qa` | Playwright testing — gameplay, visual regression, performance, accessibility |\n| `game-architecture` | Reference architecture patterns for event-driven games |\n| `game-deploy` | Deployment — here.now (default), GitHub Pages, Vercel, Netlify, itch.io |\n| `playdotfun` | Play.fun (OpenGameProtocol) — SDK, API, auth, leaderboards |\n| `unity-mcp` | Unity Editor automation via MCP (CoplayDev/unity-mcp, beta) |\n| `fetch-tweet` | Fetch tweet content for tweet-to-game conversion |\n\n### Slash Commands (user-invocable)\n\n| Command | Description |\n|---------|-------------|\n| `/viral-game [2d\\|3d] [name] OR [tweet-url]` | One-shot pipeline (~10 min): scaffold, pixel art, design, audio, promo video, deploy to here.now, monetize on Play.fun |\n| `/make-game` | Multi-session game-dev workflow: idea → scaffold → development phases with milestones, ADRs, and `docs/STATE.md` |\n| `/improve-game [focus]` | Deep audit + implement highest-impact improvements |\n| `/design-game [path]` | Audit and improve visual polish |\n| `/add-feature [description]` | Add a gameplay feature following architecture patterns |\n| `/add-assets [path]` | Replace geometric shapes with pixel art sprites |\n| `/retrodiffusion [prompt]` | Generate true pixel art sprites/tilesets/animations via Retro Diffusion API (paid) |\n| `/add-audio [path]` | Add Strudel.cc music and sound effects |\n| `/monetize-game [path]` | Register on Play.fun, add SDK, get monetized URL |\n| `/qa-game [path]` | Add Playwright QA tests |\n| `/review-game [path]` | Code review for architecture + best practices |\n\nAll commands are prefixed with `game-creator:` when installed as a plugin (e.g., `/game-creator:viral-game`).\n\n## Agents\n\n| Agent | Description | Preloaded Skills |\n|-------|-------------|------------------|\n| `game-creator` | Autonomous end-to-end pipeline with build/visual gates (no user confirmation between steps) | — (delegates to subagents) |\n| `game-reviewer` | Reviews codebases for architecture compliance, performance, and monetization readiness | `game-architecture` |\n| `game-qa-runner` | Runs Playwright test suites, diagnoses failures, fixes code, and re-runs until green | `game-qa`, `game-architecture` |\n| `game-deploy` | Deploys games to here.now (default), GitHub Pages, Vercel, or itch.io with pre/post validation | `game-deploy` |\n\n## Examples\n\n8 complete example games in `examples/`, demonstrating both engines:\n\n| Game | Engine | Description |\n|------|--------|-------------|\n| `flappy-bird` | Phaser 3 | Classic flappy clone — 5 scenes, 15 Playwright tests, full audio |\n| `barn-defense` | Phaser 3 | Tower defense game |\n| `vampire-survivors` | Phaser 3 | Survivors-like auto-attacking game |\n| `example-game` | Phaser 3 | Asteroid dodger (generated by `/viral-game` test run) |\n| `flappy-bird-3d` | Three.js | 3D flappy bird variant |\n| `flight-simulator` | Three.js | Flight sim with terrain |\n| `labyrinth` | Three.js | 3D maze game |\n| `singularity-run` | Three.js | Endless runner with matrix rain effects |\n\n```bash\ncd examples/flappy-bird\nnpm install\nnpm run dev        # http://localhost:3000\nnpm run test       # Playwright tests\nnpm run build      # Production build to dist/\n```\n\n## Templates\n\n`/viral-game` copies a runnable starter project from `templates/` — not generated from scratch. Both templates include all dependencies, the full EventBus/GameState/Constants architecture, QA scripts, and procedural graphics (no asset files).\n\n| Template | Engine | Includes |\n|----------|--------|----------|\n| `phaser-2d` | Phaser 3 | Boot/Game/GameOver scenes, Player entity, ScoreSystem, arcade physics, high-DPI support |\n| `threejs-3d` | Three.js | Game orchestrator, Player mesh, LevelBuilder, HTML overlays, InputSystem (touch + keyboard) |\n\nBoth templates ship with `scripts/verify-runtime.mjs` (headless runtime check), `scripts/iterate-client.js` (action replay + screenshots), `scripts/validate-architecture.mjs` (pattern validator), and `scripts/example-actions.json` (default test actions).\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| 2D Engine | Phaser 3 (`^3.90.0`) |\n| 3D Engine | Three.js (`^0.183.0`) |\n| Audio | Strudel.cc (`@strudel/web ^1.3.0`) — AGPL-3.0 |\n| Build | Vite (`^7.3.1`) |\n| Testing | Playwright (`^1.58.0`) + axe-core (`^4.11.0`) |\n| Monetization | [Play.fun](https://play.fun) (OpenGameProtocol) |\n| Language | JavaScript ES modules |\n\n## Quality Assurance\n\nQA is built into every code-modifying step of the pipeline via a dedicated QA subagent:\n\n1. **Build** — `npm run build` catches compilation errors\n2. **Runtime** — Headless Chromium checks for WebGL errors, uncaught exceptions, console errors\n3. **Gameplay** — Iterate client replays game-specific actions, verifies scoring works and death triggers\n4. **Architecture** — Validates EventBus/GameState/Constants patterns, flags magic numbers\n5. **Visual** — Playwright MCP screenshots check entity visibility, safe zone compliance, button labels\n\nIf any phase fails, an autofix subagent patches the code and QA re-runs (up to 3 attempts). Problems are caught when introduced, not at the end of the pipeline.\n\n## Play.fun Integration\n\nThe `/monetize-game` command (and Step 5 of `/viral-game`) registers games on [Play.fun](https://play.fun) and integrates the browser SDK:\n\n1. Authenticate via web callback or manual paste\n2. Register game with anti-cheat limits based on scoring system\n3. Add CDN script + `src/playfun.js` (wires EventBus to `addPoints()`/`savePoints()`)\n4. Rebuild and redeploy\n\nThe SDK is non-blocking — if it fails to load, the game still works. Points buffer locally during gameplay and sync on game over.\n\n## License\n\nMIT (games using `@strudel/web` for audio must use an AGPL-3.0-compatible license)\n\n## Star History\n\n<a href=\"https://www.star-history.com/?repos=playableintelligence%2Fgame-creator&type=date&legend=top-left\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/chart?repos=playableintelligence/game-creator&type=date&theme=dark&legend=top-left\" />\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/chart?repos=playableintelligence/game-creator&type=date&legend=top-left\" />\n   <img alt=\"Star History Chart\" src=\"https://api.star-history.com/chart?repos=playableintelligence/game-creator&type=date&legend=top-left\" />\n </picture>\n</a>\n",
  "bytes": 11607,
  "sha": "7d5ccb45223c4462d5cdea1719bb8cf5ce2e51366a09c21dd3782230abbbbd22",
  "repo_slug": "playableintelligence/game-creator",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_playableintelligence_game_creator_game_a_539f0d87/readme"
}