- Add all 19 skills (10 reference + 9 slash commands with arg hints) - Add all 4 agents (was 3, missing game-qa-runner) - Add all 8 example games (was 1) - Document QA subagent pipeline (5 phases, autofix loop) - Document tweet-to-game flow - Add template QA scripts inventory - Update tech stack versions - Remove stale "Commands" section (now slash commands under Skills) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
10 KiB
game-creator
The game studio for the agent internet. Build, monetize, and ship 2D (Phaser 3) and 3D (Three.js) browser games with one command. QA runs after every step. Monetize with Play.fun (OpenGameProtocol). Works with 40+ AI coding agents (via npx skills add). Share your play.fun URL on Moltbook.
Owner: OpusGameLabs
Install
npx skills add OpusGameLabs/game-creator
Target a specific agent:
npx skills add OpusGameLabs/game-creator -a claude-code
npx skills add OpusGameLabs/game-creator -a cursor
npx skills add OpusGameLabs/game-creator -a codex
npx skills add OpusGameLabs/game-creator -a antigravity
Quick Start
# Build a complete 2D game (scaffold → pixel art → design → audio → deploy → monetize)
# QA subagent runs after every step (build, runtime, gameplay, architecture, visual)
/game-creator:make-game 2d my-game
# Build from a tweet
/game-creator:make-game https://x.com/user/status/123456
# Or run individual steps on an existing game:
/game-creator:add-assets # Replace shapes with pixel art sprites
/game-creator:design-game # Add visual polish (particles, juice, transitions)
/game-creator:add-audio # Add chiptune music and sound effects
/game-creator:add-feature jetpack # Add a gameplay feature
/game-creator:improve-game # Audit + implement highest-impact improvements
/game-creator:monetize-game # Register on Play.fun, add SDK, get monetized URL
/game-creator:review-game # Code review for architecture + best practices
/game-creator:qa-game # Add Playwright QA tests
How It Works
/make-game is an orchestrator that delegates all code writing to subagents and runs a QA subagent after every code-modifying step:
Step 0 Parse args, create task list ← main thread
Step 1 Scaffold game from template ← code subagent → QA subagent
Step 1.5 Add pixel art sprites (2D only) ← code subagent → QA subagent
Step 2 Visual polish (particles, juice, transitions) ← code subagent → QA subagent
Step 3 Audio (Strudel.cc BGM + SFX) ← code subagent → QA subagent
Step 4 Deploy to GitHub Pages ← main thread (interactive auth)
Step 5 Monetize with Play.fun ← main thread (interactive auth)
The 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).
Architecture
Every game follows the same architecture, whether 2D or 3D:
src/
├── core/
│ ├── EventBus.js # Singleton pub/sub — all cross-module communication
│ ├── GameState.js # Centralized state with reset() for clean restarts
│ ├── Constants.js # Every magic number, color, timing, speed
│ └── GameConfig.js # Engine config (Phaser or Three.js)
├── scenes/ # Scene lifecycle (Phaser) or states (Three.js)
├── entities/ # Game objects (player, enemies, obstacles)
├── systems/ # Background, particles, spawners
├── sprites/ # Pixel art data (palette, matrices, tiles)
├── audio/ # Strudel.cc procedural audio
│ ├── AudioManager.js # Init, play, stop wrapper
│ ├── AudioBridge.js # Wires EventBus → AudioManager
│ ├── music.js # Background music patterns
│ └── sfx.js # Sound effect patterns
├── playfun.js # Play.fun SDK integration
└── main.js # Entry point + render_game_to_text() + advanceTime()
EventBus — Modules never import each other. All communication via pub/sub with domain:action event names.
GameState — Single source of truth. reset() gives a clean slate for restarts.
Constants — Zero hardcoded values in game logic. Sizes are proportional (GAME.WIDTH * ratio), with DPR-aware scaling for retina displays.
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.
Skills
Reference Skills (loaded automatically by Claude when relevant)
| Skill | Purpose |
|---|---|
phaser |
2D game patterns — Phaser 3 scenes, arcade physics, high-DPI rendering |
threejs-game |
3D game patterns — Three.js event-driven architecture, modular systems |
game-assets |
Pixel art sprites — renderPixelArt(), renderSpriteSheet(), palette system |
game-designer |
Visual polish — gradients, particles, screen shake, transitions, juice |
game-audio |
Procedural audio — Strudel.cc BGM patterns + Web Audio SFX |
game-qa |
Playwright testing — gameplay, visual regression, performance, accessibility |
game-architecture |
Reference architecture patterns for event-driven games |
game-deploy |
Deployment — GitHub Pages, Vercel, Netlify, itch.io |
playdotfun |
Play.fun (OpenGameProtocol) — SDK, API, auth, leaderboards |
fetch-tweet |
Fetch tweet content for tweet-to-game conversion |
Slash Commands (user-invocable)
| Command | Description |
|---|---|
/make-game [2d|3d] [name] |
Full pipeline: scaffold, pixel art, design, audio, deploy, monetize |
/improve-game [focus] |
Deep audit + implement highest-impact improvements |
/design-game [path] |
Audit and improve visual polish |
/add-feature [description] |
Add a gameplay feature following architecture patterns |
/add-assets [path] |
Replace geometric shapes with pixel art sprites |
/add-audio [path] |
Add Strudel.cc music and sound effects |
/monetize-game [path] |
Register on Play.fun, add SDK, get monetized URL |
/qa-game [path] |
Add Playwright QA tests |
/review-game [path] |
Code review for architecture + best practices |
All commands are prefixed with game-creator: when installed as a plugin (e.g., /game-creator:make-game).
Agents
| Agent | Description |
|---|---|
game-creator |
Autonomous end-to-end pipeline with build/visual gates (no user confirmation between steps) |
game-reviewer |
Reviews codebases for architecture compliance, performance, and monetization readiness |
game-qa-runner |
Runs Playwright test suites, diagnoses failures, fixes code, and re-runs until green |
game-deploy |
Deploys games to GitHub Pages, Vercel, or itch.io with pre/post validation |
Examples
8 complete example games in examples/, demonstrating both engines:
| Game | Engine | Description |
|---|---|---|
flappy-bird |
Phaser 3 | Classic flappy clone — 5 scenes, 15 Playwright tests, full audio |
barn-defense |
Phaser 3 | Tower defense game |
vampire-survivors |
Phaser 3 | Survivors-like auto-attacking game |
example-game |
Phaser 3 | Asteroid dodger (generated by /make-game test run) |
flappy-bird-3d |
Three.js | 3D flappy bird variant |
flight-simulator |
Three.js | Flight sim with terrain |
labyrinth |
Three.js | 3D maze game |
singularity-run |
Three.js | Endless runner with matrix rain effects |
cd examples/flappy-bird
npm install
npm run dev # http://localhost:3000
npm run test # Playwright tests
npm run build # Production build to dist/
Templates
/make-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).
| Template | Engine | Includes |
|---|---|---|
phaser-2d |
Phaser 3 | Boot/Game/GameOver scenes, Player entity, ScoreSystem, arcade physics, high-DPI support |
threejs-3d |
Three.js | Game orchestrator, Player mesh, LevelBuilder, HTML overlays, InputSystem (touch + keyboard) |
Both 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).
Tech Stack
| Layer | Technology |
|---|---|
| 2D Engine | Phaser 3 (^3.90.0) |
| 3D Engine | Three.js (^0.183.0) |
| Audio | Strudel.cc (@strudel/web ^1.3.0) — AGPL-3.0 |
| Build | Vite (^7.3.1) |
| Testing | Playwright (^1.58.0) + axe-core (^4.11.0) |
| Monetization | Play.fun (OpenGameProtocol) |
| Language | JavaScript ES modules |
Quality Assurance
QA is built into every code-modifying step of the pipeline via a dedicated QA subagent:
- Build —
npm run buildcatches compilation errors - Runtime — Headless Chromium checks for WebGL errors, uncaught exceptions, console errors
- Gameplay — Iterate client replays game-specific actions, verifies scoring works and death triggers
- Architecture — Validates EventBus/GameState/Constants patterns, flags magic numbers
- Visual — Playwright MCP screenshots check entity visibility, safe zone compliance, button labels
If 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.
Play.fun Integration
The /monetize-game command (and Step 5 of /make-game) registers games on Play.fun and integrates the browser SDK:
- Authenticate via web callback or manual paste
- Register game with anti-cheat limits based on scoring system
- Add CDN script +
src/playfun.js(wires EventBus toaddPoints()/savePoints()) - Rebuild and redeploy
The SDK is non-blocking — if it fails to load, the game still works. Points buffer locally during gameplay and sync on game over.
License
MIT (games using @strudel/web for audio must use an AGPL-3.0-compatible license)