build-threejs-enemy-systems
できること
このスキルは、3Dアクションゲームの敵の種類を設定する作業を、AIエージェントに案内します。各敵がデータとして定義され、共有のゲームの仕組みと合うように作るためのものです。再利用とテストができる敵を作る開発者向けです。
使う場面
- ✓3Dアクションゲームに、新しい敵の種類を追加したいとき。
- ✓敵に、タイミングや攻撃の不具合があり、よりすっきりした設定が必要なとき。
- ✓敵のステータスと動きを、ゲームのライブな状態から分けて保ちたいとき。
スキルのリンク
https://github.com/MengTo/Skills/blob/main/agent-skills/game-development/build-threejs-enemy-systems/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私の3Dゲームに3種類の敵を追加してください。それぞれが独自の攻撃と報酬を持つようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、各敵を、ステータス、動き、見た目を持つ固定の定義として書きます。体力やタイマーなどのライブな状態は別に保ち、設定に不足している参照や壊れた参照がないか確認します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Build Three.js Enemy Systems
Make each enemy a portable authored definition consumed by shared runtime systems. Keep AI choice, combat resolution, rendering, and feedback as separate consumers of the same stable contract.
Separate content from runtime state
- Put stable IDs, role/tags, base stats, presentation spec, move IDs, AI hints, feedback hook IDs, rewards, and variant data in immutable authored definitions.
- Put instance ID, transform, health/posture, target, current move and phase clock, cooldowns, statuses, pathing, visibility, and LOD state in runtime instances.
- Reference definitions by ID. Reject duplicate IDs, missing references, invalid ranges, or impossible timing during content validation.
- Never mutate authored definitions, store live timers in content, or duplicate the combat clock across AI, animation, and rendering.
Normalize presentation contracts
Define these fields before integrating a model:
- source or factory ID, provenance, coordinate system, forward axis, and meters-per-unit;
- root pivot at ground contact, normalized scale, facing offset, and visual height;
- simple movement collider plus named hurtboxes, independent of render geometry;
- stable sockets for contact origins, weapons, projectiles, VFX, audio, UI markers, and targeting;
- rig and semantic clip map for idle, locomotion, moves, reactions, and death;
- LOD tiers with hysteresis, animation/update policy, and unchanged gameplay colliders.
Normalize at the asset boundary. Do not scatter scale fixes, pivot offsets, raw clip names, or compensating rotations through gameplay code.
Define moves as data
For every move, define:
- stable ID, AI tags, eligibility range/angle/line-of-sight, weight, and state prerequisites;
- startup and telegraph, one or more active windows, recovery, cooldown, and minimum commitment;
- movement, facing, cancellation, armor, interrupt, stagger, and phase rules;
- contact shape/socket, damage, posture, knockback, status, and per-target hit limits;
- semantic animation, VFX, and audio hook IDs with cleanup rules.
Let AI select only legal move IDs; let the combat system own timing and outcomes. Resolve damage from authoritative collision/contact events using stable action and target identifiers. Apply each contact once, then drive animation, VFX, audio, and UI from the resolved event.
Provide an honest fallback
When a production model is unavailable, use a deliberate placeholder that preserves footprint, height, pivot, collider, sockets, facing, move timing, and state readability. Log the fallback once and keep it visually unmistakable. Never silently substitute a mismatched asset or call placeholder visuals production-ready.
Add a new enemy
- Existing archetype and moves fit? Configure a new definition; do not add runtime branches.
- A new behavior is essential? Add the smallest reusable move, hook, or AI tag before adding a new subsystem.
- Model ready? Normalize it to the shared presentation contract; otherwise use the honest fallback.
- Content complete? Validate references, timing, contact, cooldown, recovery, interrupts, and feedback hooks.
- Proof ready? Add deterministic fixtures and automated tests, then run desktop and mobile playthroughs.
Prove the system
- Create deterministic fixtures for spawn, each move phase, wrong range/direction, obstruction, interrupt, stagger, death/reset, missing-model fallback, LOD transitions, and multiple instances sharing one definition.
- Test content uniqueness and references, active-window boundaries, cooldown/recovery, per-target hit deduplication, lifecycle cleanup, and pause/frame-step behavior.
- Play a representative encounter in the repository-approved browser. Confirm telegraphs, contact, state, animation, VFX/audio, targetability, and rewards agree.
- Verify desktop and mobile camera distance, touch controls, reduced motion, console health, frame time, draw calls, memory stability, and crowded-scene LOD behavior. Report baseline failures separately.
よくある質問
敵の判断にも役立ちますか?
敵のAIが使う敵のデータを設定します。敵がどの行動を選ぶかは、別のスキルが扱います。
設定中に何を確認しますか?
重複するID、不足している連携、不正な数値の範囲、あり得ないタイミングを、ゲームが動く前に見つけるとスキルで定められています。
仮のモデルを使ってもいいですか?
はい。スキルは仮の代替表示に触れており、最終的なモデルの準備前にもゲームを動かせます。
詳細
作者による元の説明
Build or refactor reusable, data-driven enemy archetype and moveset systems for Three.js action games. Use for enemy content schemas, model and rig conventions, combat move timing and contact contracts, runtime state boundaries, placeholder fallbacks, deterministic fixtures, or production playthrough validation.
repo: MengTo/Skills
人気
- GitHubのスター
- 7.2k
- ランキング
- #13362
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
3d-cloth-material
7.2kThree.js で、糸の織り、柔らかい光沢、自然な襞、裾、縫い目を持つ、本物の織物らしい布を作るようエージェントを支援します。
3d-falling-leaves
7.2k3D のシーンに、回転し、風に流され、カメラの動きに合わせて再利用される、本物らしい落ち葉を加えるようエージェントを支援します。
3d-four-seasons
7.2k3D のシーンに、春、夏、秋、冬の見た目を加え、シーン全体を作り直さずに、茂み、光、空、雪を変えるようエージェントを支援します。
3d-high-poly-models
7.2k滑らかな形と自然な縁をもつ、詳細な3Dモデルを作り、その後、Web で快適に動く軽いバージョンを準備するようエージェントを支援します。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。