quick-game

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Performance Notes

性能注意事项

  • Take your time to do this thoroughly
  • Quality is more important than speed
  • Do not skip validation steps
  • 请花时间仔细完成此操作
  • 质量比速度更重要
  • 不要跳过验证步骤

Quick Game (Fast Prototype)

快速游戏(快速原型)

Build a playable game prototype as fast as possible. This is
/make-game
without the polish — just scaffold + implement the core loop. Get something on screen, then incrementally add layers with
/add-assets
,
/design-game
,
/add-audio
,
/game-deploy
, and
/monetize-game
.
What you'll get:
  1. A scaffolded game project with clean architecture
  2. Core gameplay — input, movement, scoring, fail condition, restart
  3. A running dev server you can play immediately
What you skip (run these later if you want):
  • /add-assets
    — pixel art sprites (2D) or 3D models
  • /design-game
    — visual polish, particles, transitions
  • /add-audio
    — music and sound effects
  • /record-promo
    — promo video capture
  • /game-deploy
    — deploy to here.now
  • /monetize-game
    — Play.fun integration
尽快构建可玩的游戏原型。这是不带打磨环节的
/make-game
——仅包含脚手架搭建+核心循环实现。先呈现可运行内容,之后再通过
/add-assets
/design-game
/add-audio
/game-deploy
/monetize-game
逐步添加功能层。
你将获得:
  1. 架构清晰的脚手架游戏项目
  2. 核心游戏玩法——输入控制、移动、计分、失败条件、重启功能
  3. 可立即游玩的运行中开发服务器
你将跳过的环节(如需可后续运行):
  • /add-assets
    ——像素艺术精灵(2D)或3D模型
  • /design-game
    ——视觉打磨、粒子效果、过渡动画
  • /add-audio
    ——音乐和音效
  • /record-promo
    ——宣传视频录制
  • /game-deploy
    ——部署至here.now
  • /monetize-game
    ——集成Play.fun

Instructions

操作说明

Step 0: Parse arguments

步骤0:解析参数

Parse
$ARGUMENTS
to determine the game concept:
Direct specification:
[2d|3d] [game-name]
  • Engine:
    2d
    (Phaser) or
    3d
    (Three.js). If not specified, default to
    2d
    .
  • Name: kebab-case. If not specified, ask the user.
Tweet URL: If arguments contain a tweet URL (
x.com/*/status/*
,
twitter.com/*/status/*
,
fxtwitter.com/*/status/*
):
  1. Fetch the tweet using the
    fetch-tweet
    skill
  2. Default to 2D
  3. Creatively abstract a game concept from the tweet
  4. Generate a kebab-case name
  5. Tell the user what you'll build
Meshy API Key (3D only): If 3D, check for
MESHY_API_KEY
. If missing, ask the user (link to https://app.meshy.ai). Store for model generation.
解析
$ARGUMENTS
以确定游戏概念:
直接指定格式:
[2d|3d] [game-name]
  • 引擎
    2d
    (Phaser)或
    3d
    (Three.js)。若未指定,默认使用
    2d
  • 名称:短横线分隔格式(kebab-case)。若未指定,请询问用户。
推文链接: 若参数包含推文链接(
x.com/*/status/*
twitter.com/*/status/*
fxtwitter.com/*/status/*
):
  1. 使用
    fetch-tweet
    技能获取推文内容
  2. 默认使用2D引擎
  3. 从推文中创造性提炼游戏概念
  4. 生成短横线分隔格式的名称
  5. 告知用户你将构建的内容
Meshy API密钥(仅3D可用): 若使用3D引擎,请检查是否存在
MESHY_API_KEY
。若缺失,请询问用户(链接至https://app.meshy.ai)。保存密钥用于模型生成。

Step 1: Scaffold + Implement

步骤1:搭建脚手架 + 实现功能

Infrastructure (main thread):
  1. Locate the template directory — check
    ~/.claude/plugins/cache/local-plugins/game-creator/*/templates/
    or
    templates/
    relative to this plugin
  2. Target directory: If inside the
    game-creator
    repo, create in
    examples/<game-name>/
    . Otherwise, create in
    ./<game-name>/
    .
  3. Copy the template:
    • 2D:
      templates/phaser-2d/
      → target
    • 3D:
      templates/threejs-3d/
      → target
  4. Update
    package.json
    name and
    index.html
    title
  5. Run
    npm install
  6. Start the dev server (
    npm run dev
    ) in the background. Check port availability first — if 3000 is taken, try 3001, 3002, etc.
Game implementation (subagent via Task):
Launch a
Task
subagent with:
You are building a quick game prototype. Speed is the priority — get a playable core loop working.
Project path:
<project-dir>
Engine:
<2d|3d>
Game concept:
<description>
Skill to load:
phaser
(2D) or
threejs-game
(3D)
Implement in this order:
  1. Input (touch + keyboard from the start)
  2. Player movement / core mechanic
  3. Fail condition (death, collision, timer)
  4. Scoring
  5. Restart flow (GameState.reset() → clean slate)
Scope: 1 scene, 1 mechanic, 1 fail condition. Keep it tight.
Rules:
  • All cross-module communication via EventBus
  • All magic numbers in Constants.js
  • No title screen — boot directly into gameplay
  • No in-game score HUD — Play.fun widget handles score display
  • Mobile-first input: touch + keyboard, use unified InputSystem pattern
  • Import
    SAFE_ZONE
    from Constants.js — keep UI below
    SAFE_ZONE.TOP
  • Minimum 7-8% canvas width for collectibles/hazards
  • Character sizing:
    GAME.WIDTH * 0.12
    to
    GAME.WIDTH * 0.15
    for character-driven games
  • Preserve the template's
    createButton()
    helper in GameOverScene — do NOT rewrite it
  • Wire spectacle events:
    SPECTACLE_ENTRANCE
    ,
    SPECTACLE_ACTION
    ,
    SPECTACLE_HIT
    ,
    SPECTACLE_COMBO
    ,
    SPECTACLE_STREAK
    ,
    SPECTACLE_NEAR_MISS
  • Add
    isMuted
    to GameState for future audio support
  • Ensure restart is clean — 3 restarts in a row should work identically
基础架构(主线程):
  1. 定位模板目录——检查
    ~/.claude/plugins/cache/local-plugins/game-creator/*/templates/
    或此插件相对路径下的
    templates/
  2. 目标目录:若在
    game-creator
    仓库内,创建于
    examples/<game-name>/
    。否则,创建于
    ./<game-name>/
  3. 复制模板:
    • 2D:
      templates/phaser-2d/
      → 目标目录
    • 3D:
      templates/threejs-3d/
      → 目标目录
  4. 更新
    package.json
    中的名称和
    index.html
    中的标题
  5. 运行
    npm install
  6. 在后台启动开发服务器(
    npm run dev
    )。首先检查端口可用性——若3000端口被占用,尝试3001、3002等。
游戏实现(通过Task子代理):
启动
Task
子代理并传入以下内容:
你正在构建一个快速游戏原型。速度是首要目标——确保可玩的核心循环正常运行。
项目路径
<project-dir>
引擎
<2d|3d>
游戏概念
<description>
需加载的技能
phaser
(2D)或
threejs-game
(3D)
实现顺序:
  1. 输入控制(从一开始就支持触摸+键盘)
  2. 玩家移动 / 核心机制
  3. 失败条件(死亡、碰撞、计时器)
  4. 计分系统
  5. 重启流程(GameState.reset() → 重置状态)
范围:1个场景、1种核心机制、1个失败条件。保持精简。
规则:
  • 所有跨模块通信通过EventBus实现
  • 所有魔法数值存于Constants.js
  • 无标题界面——直接进入游戏玩法
  • 无游戏内计分HUD——由Play.fun组件处理分数显示
  • 移动端优先的输入:触摸+键盘,使用统一的InputSystem模式
  • 从Constants.js导入
    SAFE_ZONE
    ——确保UI位于
    SAFE_ZONE.TOP
    下方
  • 可收集物/危险物的最小宽度为画布宽度的7-8%
  • 角色尺寸:角色驱动类游戏中为
    GAME.WIDTH * 0.12
    GAME.WIDTH * 0.15
  • 保留GameOverScene中的
    createButton()
    辅助函数——请勿重写
  • 绑定 spectacle 事件:
    SPECTACLE_ENTRANCE
    SPECTACLE_ACTION
    SPECTACLE_HIT
    SPECTACLE_COMBO
    SPECTACLE_STREAK
    SPECTACLE_NEAR_MISS
  • 为GameState添加
    isMuted
    属性以支持未来的音频功能
  • 确保重启功能正常——连续3次重启应效果一致

Step 2: Verify

步骤2:验证

After the subagent returns:
  1. Run
    npm run build
    in the project directory to confirm no errors
  2. If the build fails, fix the issues (up to 2 retries)
  3. If Playwright MCP is available, navigate to the dev server, take a screenshot, and do a quick visual check
子代理返回结果后:
  1. 在项目目录中运行
    npm run build
    以确认无错误
  2. 若构建失败,修复问题(最多重试2次)
  3. 若Playwright MCP可用,导航至开发服务器,截取屏幕截图并进行快速视觉检查

Example Usage

示例用法

2D game

2D游戏

/quick-game 2d asteroid-dodge
Result: Copies Phaser template → implements player ship, asteroid spawning, collision death, score counter, restart flow → dev server running at localhost:3000 in ~2 minutes. Shapes only, no polish.
/quick-game 2d asteroid-dodge
结果:复制Phaser模板→实现玩家飞船、小行星生成、碰撞死亡、计分器、重启流程→开发服务器在localhost:3000运行,耗时约2分钟。仅包含基础图形,无打磨效果。

From tweet

基于推文

/quick-game https://x.com/user/status/123456
Result: Fetches tweet → abstracts game concept → scaffolds and implements a playable prototype inspired by the tweet content.
/quick-game https://x.com/user/status/123456
结果:获取推文内容→提炼游戏概念→搭建脚手架并实现受推文内容启发的可玩原型。

Troubleshooting

故障排除

Game scaffolds but won't start

游戏已搭建但无法启动

Cause: Vite config or import paths incorrect. Fix: Verify vite.config.js has correct root. Check that main.js is referenced in index.html.
原因: Vite配置或导入路径错误。 修复: 验证vite.config.js中的根目录是否正确。检查index.html中是否正确引用main.js。

Missing core files

核心文件缺失

Cause: Scaffold skipped EventBus/GameState/Constants. Fix: Every game needs core/EventBus.js, core/GameState.js, core/Constants.js. Re-run scaffold or create manually.
原因: 脚手架过程中跳过了EventBus/GameState/Constants。 修复: 每个游戏都需要core/EventBus.js、core/GameState.js、core/Constants.js。重新运行脚手架或手动创建。

Done

完成

Tell the user:
Your game is running at
http://localhost:<port>
. Open it in a browser to play!
To keep building, run these commands:
  • /add-assets
    — replace shapes with pixel art sprites
  • /design-game
    — add visual polish (particles, gradients, juice)
  • /add-audio
    — add music and sound effects
  • /game-deploy
    — deploy to the web
  • /monetize-game
    — add Play.fun integration
Or run
/make-game
next time for the full pipeline.
告知用户:
你的游戏正在
http://localhost:<port>
运行。在浏览器中打开即可游玩!
如需继续开发,请运行以下命令:
  • /add-assets
    ——将基础图形替换为像素艺术精灵
  • /design-game
    ——添加视觉打磨效果(粒子、渐变、润色)
  • /add-audio
    ——添加音乐和音效
  • /game-deploy
    ——部署至网页
  • /monetize-game
    ——集成Play.fun
下次如需完整流程,请运行
/make-game