build-game-monster-system
它能做什么
这个技能指导智能体为 Three.js 动作游戏构建可用于游戏玩法的敌人生物素材。适合希望怪物拥有可靠的受击区域、攻击时机和统一结构的游戏开发者。
适用场景
- ✓游戏需要带有骨骼绑定、受击区域和攻击动画的新怪物的时候。
- ✓怪物只是装饰性的网格,与战斗规则不匹配的时候。
- ✓已有的怪物集需要遵循同一套共享结构的时候。
技能链接
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-monster-system/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请为我的游戏构建一个带骨骼绑定的狼怪,包括受击区域、爪击攻击,以及可供其他怪物共享的结构。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会把怪物的基础数据、骨骼绑定、运行时状态和视图分开,使战斗由游戏规则决定,而不是由可见的姿势决定。它会用同一份约定来检查每个怪物。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build Game Monster System
Build monsters as gameplay-compatible runtime assets, not decorative meshes.
Establish the contract
Read references/monster-contract.md before implementation or audit. Check the real game content model, combat events, enemy state machine, collision API, camera distance, and asset loader before extending the contract.
Use related skills when applicable:
- Use
img2threejsfor image-driven procedural reconstruction and its staged visual gates. - Use
build-hybrid-game-assetsto choose procedural versus imported representation and record provenance/budgets. - Use
tune-enemy-aifor perception, intent, movement, and behavior transitions. - Use
design-action-combatfor startup/active/recovery timing and authoritative contact.
Separate four layers
MonsterDefinition: serializable authored facts, tags, scale, stats, attacks, locomotion, asset provenance, and budgets.MonsterRig: semantic transform hierarchy, joints, sockets, secondary-motion anchors, materials, and LOD visuals.MonsterRuntime: current state, timers, target intent, health/posture, cooldowns, and authoritative combat events.MonsterViewAdapter: drives rig poses, VFX, audio, visibility, and LOD from runtime state; never decides hits from rendered pose.
Do not duplicate authored combat values in the rig or UI.
Build the rig
- Use
+Yup,+Zforward, meters, and a ground-contact root. - Keep
root -> motion -> bodystable across every monster and LOD. - Parent limb segments as real joint chains so shoulder/hip motion propagates through elbows/knees to wrists/ankles.
- Name semantic equivalents for nonhumanoids; do not fake absent anatomy.
- Provide sockets for attack origins, VFX, audio, targeting, ground contact, attachments, and death effects.
- Keep visual meshes out of physics by default. Provide simple solid, navigation, hurt, attack, and trigger shapes separately.
- Preserve root, joints, sockets, collision, and animation state across LOD changes.
Connect behavior and combat
Support at least idle, investigate, pursue, reposition, windup, attack, recover, stagger, and defeated. Each attack definition must declare startup, active, recovery, cooldown, contact shape/socket, damage/posture output, facing rule, and interrupt/cancel policy.
Drive contacts from authoritative action IDs and collision events. Animation may expose a normalized phase, but it must not create damage by itself.
Compose testable movesets
- Author movesets as serializable sequences of intent states and attack IDs. Keep attack timing in the attack definitions; the moveset references it instead of copying it.
- Compile attack steps into explicit startup, active, and recovery phases.
- Provide a pure sampler from
(movesetId, elapsed)to state, attack, normalized phase, active flag, interruptibility, and stable action ID. - Give every loop cycle a new action ID while preserving one ID across an attack's startup, active, and recovery phases.
- Expose queryable or seeded fixtures for the midpoint and boundaries of every phase so reviewers can freeze and reproduce them without campaign playthrough.
Verify conformance
- Add deterministic fixtures for all required states, each attack phase, interrupt/stagger, death, LOD switching, and reset.
- Test moveset timeline continuity, exact active-window boundaries, full attack coverage, per-action ID stability, and per-loop ID renewal.
- Test joint propagation, socket stability, collider coverage, single-contact idempotence, and disposal.
- Render the monster at real encounter distance in the in-app browser.
- Measure triangles, draw calls, textures, frame time, and mobile pixel-ratio behavior.
- Fail the asset if it has floating attachments, missing mandatory states, pose-derived damage, LOD socket drift, or unbounded resource cost.
Report whether the monster fully conforms, conforms with documented exceptions, or needs a new archetype capability added to the shared contract.
常见问题
怪物的姿势决定它是否命中吗?
不决定。技能说明,命中由权威的战斗规则决定,而不是由渲染的姿势决定。
它与敌人 AI 和战斗时机配合吗?
配合。技能指向相关技能,涵盖敌人行为、战斗时机和混合素材。
它涵盖较低细节的版本吗?
涵盖。技能为远处的怪物提供较低细节的版本。
详情
作者的原始描述
Build, integrate, audit, or refactor rigged monsters for Three.js and web action games. Use for monster asset contracts, procedural or imported creature rigs, semantic joints and sockets, hurtboxes and attack volumes, combat animation states, enemy-runtime adapters, LODs, deterministic review fixtures, and validating that every monster follows one shared system.
repo: MengTo/Skills
热度
- GitHub 星标
- 7.2k
- 排名
- #13357
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
3d-cloth-material
7.2k帮你的智能体在 Three.js 中制作逼真的编织织物,包括纱线编织纹理、柔和光泽、自然褶皱、下摆和缝线。
3d-falling-leaves
7.2k帮你的智能体在 3D 场景中添加逼真的飘落树叶,树叶会翻滚、随风飘动,并在镜头移动时循环利用。
3d-four-seasons
7.2k帮你的智能体为 3D 场景添加春夏秋冬四季效果,无需重建场景即可改变植被、光线、天空和积雪。
3d-high-poly-models
7.2k帮你的智能体构建形状平滑、边缘可信的精细 3D 模型,然后制作在网页上运行流畅的轻量版本。