Game AI Design
Paste the following prompt into your AI chat to install this skill:
Please install @user_3c6cb52e/game-ai-sh-l82bv3 according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem
NPC logic is often written as “see the target, move straight there,” which causes agents to jitter against walls, get stuck on corners, or overwrite each other’s state. The harder part is decoupling decision, routing, and motion: what to do, where to route, and how to move should not be tangled together.
How It Works
- Decision model: use an FSM for a small number of clear states, a behavior tree for priorities and interruption, or utility scoring for continuous preferences.
- Pathfinding: choose a grid, waypoint graph, or navmesh that fits the level; generate a path with
A*, and avoid recomputing every frame. - Steering: follow the next waypoint with
seek/arrive, rather than aiming directly at the goal, so agents round corners correctly. - Verification: check whether the agent reaches the goal, sticks to corners, or oscillates between states; draw the path and current state while tuning.
Boundaries
This fits engine-neutral NPC behavior architecture. Use the relevant Unity, Unreal, or Godot skill for concrete navmesh and agent APIs. Movement feel, collision radius, and tower-defense spawn lanes are out of scope.
Use Cases
- Add patrol, chase, and retreat states to an enemy NPC and switch behavior when the player is seen.
- Implement grid pathfinding so a unit can reach a target around obstacles from a spawn point.
- Steer AI along waypoints so agents round corners instead of moving straight into walls.
- Debug stuck, oscillating, or unreachable agents by drawing the path and current state while tuning.
Best For
- Gameplay engineer owning enemy/NPC logic who needs to separate patrol, chase, and guard states.
- Level or AI programmer working with grid or waypoint maps who needs to choose a graph and implement A*.
- Movement engineer needing smooth agent motion who wants waypoint steering without wall-hugging.
- Systems engineer maintaining multi-unit tactics who needs reusable FSM, behavior tree, and pathfinding patterns.
Related Skills
A guide for writing Seedance 2.0 video prompts, covering @ references, camera moves, time segments, audio direction, and common pitfalls.
Collects daily conversations, task logs, and errors, then runs a nine-module review to surface blind spots, generate actions, and update memory.
Local long-term memory for AI agents that appends key facts and daily logs, supports cross-session context and search recall, and auto-archives old diaries to gzip files.
A hybrid-evolution agent for OpenClaw developers that offers tiered-confirmation and rollback-safe capability optimization.