跳到正文
Skillpedia
网站与界面(前端)7.2k · #13357

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-game-monster-system/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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 img2threejs for image-driven procedural reconstruction and its staged visual gates.
  • Use build-hybrid-game-assets to choose procedural versus imported representation and record provenance/budgets.
  • Use tune-enemy-ai for perception, intent, movement, and behavior transitions.
  • Use design-action-combat for startup/active/recovery timing and authoritative contact.

Separate four layers

  1. MonsterDefinition: serializable authored facts, tags, scale, stats, attacks, locomotion, asset provenance, and budgets.
  2. MonsterRig: semantic transform hierarchy, joints, sockets, secondary-motion anchors, materials, and LOD visuals.
  3. MonsterRuntime: current state, timers, target intent, health/posture, cooldowns, and authoritative combat events.
  4. 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 +Y up, +Z forward, meters, and a ground-contact root.
  • Keep root -> motion -> body stable 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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能