higgsfield-game-generation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Higgsfield Game Generation

Higgsfield 游戏生成

Create a coherent, playable web game and deliver the URL, or produce only the requested game assets. Higgsfield CLI owns generation, 3D action discovery, deployment, and optional marketplace publication.
创建连贯可玩的网页游戏并交付URL,或仅生成请求的游戏资产。Higgsfield CLI负责生成、3D动作识别、部署以及可选的市场发布操作。

Bootstrap

初始化准备

Before work begins:
  1. If
    higgsfield
    is unavailable, install it:
    bash
    curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
  2. If
    higgsfield account status
    reports an expired or missing session, ask the user to run
    higgsfield auth login
    , then continue after confirmation.
  3. For a full game, confirm
    higgsfield game deploy --help
    works before generating assets. This is the delivery capability check.
  4. Locate this installed skill directory and set it explicitly:
    bash
    export GAME_SKILL="/absolute/path/to/higgsfield-game-generation"
    test -f "$GAME_SKILL/scripts/pipeline.py"
    python3 "$GAME_SKILL/scripts/pipeline.py" --help
    Never recreate bundled scripts from memory.
开始工作前:
  1. higgsfield
    不可用,执行安装:
    bash
    curl -fsSL https://raw.githubusercontent.com/higgsfield-ai/cli/main/install.sh | sh
  2. higgsfield account status
    显示会话过期或缺失,请让用户运行
    higgsfield auth login
    ,确认完成后再继续。
  3. 若要生成完整游戏,在生成资产前确认
    higgsfield game deploy --help
    可正常运行,这是交付能力检查步骤。
  4. 找到已安装的技能目录并显式设置:
    bash
    export GAME_SKILL="/absolute/path/to/higgsfield-game-generation"
    test -f "$GAME_SKILL/scripts/pipeline.py"
    python3 "$GAME_SKILL/scripts/pipeline.py" --help
    切勿凭记忆重新创建捆绑脚本。

Route the request

请求路由

  • Full playable game — follow the full workflow below.
  • Assets only — read
    references/stylization.md
    , then the matching asset reference. Do not deploy a game.
  • Design only — read
    references/game-design-system.md
    ; return the requested design artifact and asset manifest.
  • Existing game iteration — inspect the supplied source, preserve its architecture and unchanged assets, amend the manifest, rebuild, verify, and redeploy with its existing game ID.
  • Trailer or promotional video — use
    higgsfield-generate
    , not this skill.
  • Native mobile/desktop/console runtime — explain that this skill ships browser games; offer a web build unless the user supplied another toolchain.
  • 完整可玩游戏 — 遵循下方完整工作流程。
  • 仅生成资产 — 阅读
    references/stylization.md
    ,然后参考匹配的资产文档,无需部署游戏。
  • 仅设计 — 阅读
    references/game-design-system.md
    ;返回请求的设计产物和资产清单。
  • 现有游戏迭代 — 检查提供的源代码,保留其架构和未修改的资产,更新清单,重新构建、验证并使用现有游戏ID重新部署。
  • 预告片或宣传视频 — 使用
    higgsfield-generate
    ,而非本技能。
  • 原生移动/桌面/主机端运行时 — 说明本技能仅交付浏览器游戏;除非用户提供了其他工具链,否则可提供网页构建版本。

Full game workflow

完整游戏工作流程

1. Plan

1. 规划

Read
references/game-design-system.md
first and in full. Resolve the game profile, delivery context, core loop, win/lose/restart behavior, performance budgets, input methods, and language handling.
Create
design/assets.csv
with one row per visual or audio asset:
csv
id,role,type,description,size/ratio,style line ref,source
Read
references/multiplayer.md
whenever Players is not solo. Local same-screen multiplayer remains client-side; online multiplayer requires the platform server module.
Read
references/stylization.md
before producing any visual, including procedural canvas art. Derive one STYLE FORMULA and insert it byte-for-byte into every visual prompt. If the brief already fixes the style, state the formula and continue. If several materially different styles fit, show concise options and wait for selection.
No game code or generated visual should exist before the manifest and STYLE FORMULA.
首先完整阅读
references/game-design-system.md
。确定游戏配置文件、交付场景、核心循环、胜负/重启机制、性能预算、输入方式和语言处理方案。
创建
design/assets.csv
,每行对应一个视觉或音频资产:
csv
id,role,type,description,size/ratio,style line ref,source
当玩家数量不为单人时,阅读
references/multiplayer.md
。本地同屏多人游戏仅在客户端运行;在线多人游戏需要平台服务器模块。
在生成任何视觉内容(包括程序画布艺术)前,阅读
references/stylization.md
。推导一个STYLE FORMULA(风格公式)并逐字节插入到每个视觉提示中。如果需求已明确固定风格,说明该公式后继续。若有几种差异较大的风格均符合需求,展示简洁选项并等待用户选择。
在完成清单和STYLE FORMULA之前,不得编写任何游戏代码或生成任何视觉内容。

2. Generate assets and build

2. 生成资产并构建

Start independent generation jobs together, then write the game while those jobs run. Inspect every model contract before first use:
bash
higgsfield model list --json
higgsfield model get <job_type>
higgsfield generate create <job_type> ... --wait --json
Media flags accept local paths or prior upload/job IDs. Keep job JSON in project files when chaining; do not dump IDs into the user-facing reply.
Read the reference matching each manifest row:
AssetRequired reference
Static sprites, backgrounds, UI
references/stylization.md
Spritesheets / 2D animation
references/2d-animation.md
Repeating ground, walls, tiles, PBR maps
references/textures.md
Any 3D model or animation
references/3d-animation.md
Music, SFX, voice
references/audio.md
For 3D animation selection:
bash
higgsfield preset list animation-action --query walk --json
higgsfield preset list animation-action --group Fighting --category Punching --json
When multiple actions fit, show their preview URLs and let the user choose. Pass the chosen integer as
--animation_action_id
only after checking the target model schema.
Read
references/build-game.md
last, but before writing game code. Assemble the source ZIP with
index.html
and exactly one root code module (
logic.js
or
server.js
). Use relative asset paths and keep
design/assets.csv
in the shipped project.
Generation failures get at most two retries. After that, use the best valid result and compensate in code, or amend the manifest honestly.
同时启动独立的生成任务,然后在任务运行期间编写游戏代码。首次使用前检查每个模型契约:
bash
higgsfield model list --json
higgsfield model get <job_type>
higgsfield generate create <job_type> ... --wait --json
媒体标志接受本地路径或之前的上传/任务ID。链式调用时将任务JSON保存在项目文件中;切勿在面向用户的回复中输出ID。
阅读与清单每行匹配的参考文档:
资产所需参考文档
静态精灵图、背景、UI
references/stylization.md
精灵表 / 2D动画
references/2d-animation.md
可重复地面、墙体、 tiles、PBR贴图
references/textures.md
任何3D模型或动画
references/3d-animation.md
音乐、SFX、语音
references/audio.md
选择3D动画时:
bash
higgsfield preset list animation-action --query walk --json
higgsfield preset list animation-action --group Fighting --category Punching --json
当有多个动作符合需求时,展示它们的预览URL并让用户选择。仅在检查目标模型架构后,将选中的整数作为
--animation_action_id
传入。
最后阅读
references/build-game.md
,但需在编写游戏代码之前完成。将源代码打包为包含
index.html
和恰好一个根代码模块(
logic.js
server.js
)的ZIP文件。使用相对资产路径,并将
design/assets.csv
包含在交付的项目中。
生成失败最多重试两次。若仍失败,使用最佳有效结果并通过代码补偿,或如实更新清单。

3. Verify and deliver

3. 验证与交付

Run the local game over HTTP, not
file://
:
bash
python3 -m http.server 8000
Verify the complete loop, restart, missing assets, console errors, responsive canvas, non-Latin keyboard layout through
event.code
, touch-only play when mobile is in scope, declared gamepad controls, fixed-timestep behavior, and multiplayer in two sessions when applicable.
Package from the directory that contains the required root files:
bash
zip -r /absolute/path/to/game.zip . -x '*.DS_Store' 'node_modules/*' '.git/*'
higgsfield game deploy /absolute/path/to/game.zip \
  --title "<public title>" \
  --description "<player-facing description>" \
  --thumbnail "<optional https 16:9 image URL>" \
  --favicon "<optional https 1:1 image URL>" \
  --json
For an update, add
--game-id <existing_game_id>
; never omit it after an update failure, because that would create a different game.
Deployment creates the playable URL. Publishing to the public marketplace is a separate external action and requires explicit user intent:
bash
higgsfield game publish <game_id> \
  --name "<optional listing name>" \
  --description "<optional listing description>" \
  --cover-url "<optional https 16:9 URL>" \
  --logo-url "<optional https 1:1 URL>" \
  --json
Re-open the returned playable URL and repeat the critical smoke path. Deliver the URL returned by CLI; never construct it manually.
通过HTTP而非
file://
运行本地游戏:
bash
python3 -m http.server 8000
验证完整循环、重启功能、缺失资产、控制台错误、响应式画布、通过
event.code
支持非拉丁语键盘布局、移动端场景下的纯触摸操作、声明的游戏手柄控制、固定时间步长行为,以及适用时的双会话多人游戏功能。
从包含所需根文件的目录打包:
bash
zip -r /absolute/path/to/game.zip . -x '*.DS_Store' 'node_modules/*' '.git/*'
higgsfield game deploy /absolute/path/to/game.zip \
  --title "<public title>" \
  --description "<player-facing description>" \
  --thumbnail "<optional https 16:9 image URL>" \
  --favicon "<optional https 1:1 image URL>" \
  --json
若为更新,添加
--game-id <existing_game_id>
;更新失败后切勿省略该参数,否则会创建一个新的游戏。
部署操作会生成可玩URL。发布到公共市场是独立的外部操作,需要用户明确意图:
bash
higgsfield game publish <game_id> \
  --name "<optional listing name>" \
  --description "<optional listing description>" \
  --cover-url "<optional https 16:9 URL>" \
  --logo-url "<optional https 1:1 URL>" \
  --json
重新打开返回的可玩URL并重复关键冒烟测试路径。交付CLI返回的URL;切勿手动构造。

Reference order

参考文档顺序

For full games:
  1. references/game-design-system.md
  2. references/multiplayer.md
    when Players is not solo
  3. references/stylization.md
  4. Conditional asset references
  5. references/build-game.md
Read each selected reference completely. Do not load unrelated references.
Supporting references opened only when their owning route requires them:
  • references/client-reference.md
    — online client protocol.
  • references/kernel-reference.md
    — platform room-kernel contract.
  • references/logic-reference.md
    — turn-based/event-driven rules module.
  • references/meshy-api.md
    — raw Meshy fallback only.
  • references/meshy-input-rules.md
    — mandatory before any image-to-3D submit.
  • references/procedural-animation.md
    — non-humanoid procedural rigs.
对于完整游戏:
  1. references/game-design-system.md
  2. 当玩家数量不为单人时,
    references/multiplayer.md
  3. references/stylization.md
  4. 条件性资产参考文档
  5. references/build-game.md
完整阅读每个选定的参考文档。不要加载无关的参考文档。
仅当对应的请求路由需要时,才打开支持性参考文档:
  • references/client-reference.md
    — 在线客户端协议。
  • references/kernel-reference.md
    — 平台房间内核契约。
  • references/logic-reference.md
    — 回合制/事件驱动规则模块。
  • references/meshy-api.md
    — 仅作为Meshy原始 fallback。
  • references/meshy-input-rules.md
    — 在提交任何图像转3D操作前必须阅读。
  • references/procedural-animation.md
    — 非人形程序绑定。

UX rules

UX规则

  • Mirror the user's language; keep generation prompts in English.
  • User updates are short and describe the game, not internal gates, phase numbers, job IDs, or tool mechanics.
  • Ask only when the answer materially changes the game. Do not batch unrelated questions.
  • Preserve one visual system across generated and procedural assets.
  • Do not request secrets in chat. Raw Meshy fallback may use a user-configured environment key only when the native Higgsfield 3D model is unavailable.
  • Do not publish publicly unless the user requested marketplace publication.
  • 镜像用户使用的语言;生成提示保持为英文。
  • 向用户更新时内容简短,描述游戏本身,而非内部关卡、阶段编号、任务ID或工具机制。
  • 仅当答案会实质性改变游戏时才提问。不要批量提出无关问题。
  • 在生成的资产和程序资产中保持统一的视觉系统。
  • 不要在聊天中请求密钥。仅当原生Higgsfield 3D模型不可用时,Meshy原始fallback才可使用用户配置的环境密钥。
  • 除非用户请求市场发布,否则不要公开发布。

Output

输出

  • Design-only: requested design artifact plus
    design/assets.csv
    .
  • Assets-only: usable files/result URLs and their manifest roles.
  • Full game: verified playable URL, a one-line gameplay summary, and marketplace URL only when explicitly published.
  • 仅设计:返回请求的设计产物加上
    design/assets.csv
  • 仅资产:返回可用文件/结果URL及其清单角色。
  • 完整游戏:返回经过验证的可玩URL、一行游戏玩法摘要,以及仅当明确发布时的市场URL。