Below you will find pages that utilize the taxonomy term “Utility-Ai”
Posts
read more
Lua for Game Development — Chapter 14: Combat AI, Behavior Trees, Utility AI & Enemy Design
Combat AI determines the challenge, pacing, and tension of any action game.
Modern games use:
- State Machines (simple AI)
- Behavior Trees (modular, readable)
- Utility AI (dynamic decisions)
- Blackboards (shared memory)
- Squad AI (formations, flanking, roles)
- Boss AI (scripted phases + BT nodes)
Lua’s flexibility makes it ideal for building AI layers.
This chapter builds:
- Enemy archetypes
- Finite State Machine (FSM) combat AI
- Behavior Tree engine
- Utility-based decision system
- Aggro & threat systems
- Group tactics (flank, assist, swarm)
- Boss scripting (phases, triggers, timelines)
1. Enemy Archetypes
Define enemies in data:
Posts
read more
Lua for Game Development — Chapter 6: AI Systems — BT, FSM, Utility AI, GOAP, Navigation, Hybrid AI
Game AI is one of Lua’s strongest domains.
Lua scripts drive NPCs in:
- World of Warcraft
- Don’t Starve
- CryEngine titles
- Roblox (Luau)
- Cocos2d-x Lua games
- Thousands of mobile/indie games
Game studios rely heavily on Lua due to:
- Ease of scripting
- Data-driven behavior
- Fast iteration
- Easy debugging and hot reload
- Coroutine-based timelines
This chapter covers all major AI paradigms used in modern games:
- FSM (Finite State Machines)
- Behavior Trees (BT)
- Utility AI (Score-based decision AI)
- GOAP (Goal-Oriented Action Planning)
- Navigation patterns
- Blackboard memory systems
- Hybrid AI architecture for bosses
- Performance tuning for large AI crowds
1. Finite State Machines (FSM)
FSMs are simple, predictable, and great for: