limbonaut/limboai

LimboAI - Behavior Trees and State Machines for Godot 4

What it solves

LimboAI provides a structured way to create complex AI behaviors for game agents (such as enemies or NPCs) in the Godot 4 engine. It replaces the need to write monolithic, hard-to-maintain code for agent logic by offering modular, hierarchical tools for decision-making and state management.

How it works

The plugin combines two primary AI architectural patterns:

  • Behavior Trees (BT): A hierarchical structure of tasks (composites, decorators, and conditions) that control the flow of an agent's actions. These can be created and edited via a visual editor and executed using a BTPlayer node.
  • Hierarchical State Machines (HSM): An event-based system for managing states and transitions. HSMs can be nested within other HSMs to organize complex state logic.

The system is implemented in C++ for performance but allows users to define custom tasks and states using GDScript or C#.

Who it’s for

Game developers using Godot 4 who need a robust, scalable system for designing agent AI without relying solely on hard-coded logic.

Highlights

  • Visual BT Editor: Create and save Behavior Tree resources directly in the Godot editor.
  • Blackboard System: A shared data store that allows tasks to communicate and share variables across different agents.
  • Visual Debugger: Inspect and troubleshoot the execution of the behavior tree in real-time while the game is running.
  • Hybrid Approach: Ability to combine state machines with behavior trees using BTState for reactive AI.
  • Flexible Deployment: Available as both a GDExtension (no engine rebuild required) or a C++ module.

Related

  • Project
  • Project
  • Project
  • Project
  • Project