game-ai_skill

This skill guides game AI design and implementation with FSM, behavior trees, pathfinding, and utility systems for diverse agents.
  • Python

2.5k

GitHub Stars

2

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill game-ai

  • _meta.json279 B
  • SKILL.md15.3 KB

Overview

This skill is a practical Game AI development guide covering architecture patterns, behavior trees, state machines, pathfinding, flocking, utility decision systems, and perception. It focuses on actionable implementations and includes Godot-specific integration examples for navigation and agents. Use it to design resilient enemy AI, NPC behaviors, and group dynamics with clear code patterns and trade-offs.

How this skill works

The guide inspects common AI architectures (FSM, Behavior Trees, Utility AI, GOAP) and compares their strengths and trade-offs for game scenarios. It provides concrete implementations: FSM and BT node patterns, A* pathfinding, Godot NavigationAgent2D usage, Boids flocking, utility scoring, and vision sensors. Each section shows decision logic, movement integration, and hooks for animation and physics in a game loop.

When to use it

  • Implement simple, predictable enemy logic or boss phases (FSM).
  • Build modular, composable NPC behavior with clear priority and fallback (Behavior Trees).
  • Create dynamic, context-sensitive decisions for agents (Utility AI).
  • Compute paths in grid or navmesh environments (A* and Godot NavigationAgent2D).
  • Simulate group motion like flocks or crowds (Boids).
  • Add perception and line-of-sight checks for stealth or tactical AI (VisionSensor).

Best practices

  • Choose the simplest architecture that meets requirements; prefer FSM for small state sets and BT/Utility for complexity.
  • Keep behavior nodes and state logic modular and testable; separate decision from movement and animation.
  • Tune parameters (utility weights, path desired distance, boid radii) iteratively with tools or debug visualizations.
  • Use asynchronous path updates and NavigationAgent signals to avoid frame stalls.
  • Add randomness or soft thresholds in utility scoring to avoid deterministic behavior. Ensure consistent units for distances and speeds.

Example use cases

  • 2D enemy with patrol, chase, attack transitions using an FSM and NavigationAgent2D.
  • Complex NPC guard using a Behavior Tree: investigate, chase, call for help, return to post.
  • Tactical AI that chooses actions (attack, hide, reload) with a Utility AI scorer.
  • Flocking birds or fish using Boids forces for separation, alignment, cohesion.
  • A stealth enemy vision sensor that uses angle, distance, and raycasts to detect the player.

FAQ

Start with an FSM for simple behavior. Move to a Behavior Tree or Utility AI once behaviors grow in number or need reuse and dynamic scoring.

How do I prevent pathfinding stalls with many agents?

Batch or async path requests, use NavigationAgent signals, limit path recalculation frequency, and use hierarchical/navmesh simplification to reduce load.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational