Logo of the LimboAI module for the Godot Engine

Introduction to Limbo AI

LimboAI is an open-source C++ module for Godot Engine 4 providing a combination of Behavior Trees and State Machines, which can be used together to create complex AI behaviors. It comes with a behavior tree editor, built-in documentation, visual debugger, and more! While it is implemented in C++, it fully supports GDScript for creating your own tasks and states.

Behavior Trees are powerful hierarchical structures used to model and control the behavior of agents in a game (e.g., characters, enemies, entities). They are designed to make it easier to create complex and highly modular behaviors for your games.



A screenshot for the operation of the LimboAI Godot plugin. You can see behavior tree editor debugger in action

Features

Behavior Trees (BT)

  • Easily create, edit, and save BehaviorTree resources in the editor.
  • Execute BehaviorTree resources using the BTPlayer node.
  • Create complex behaviors by combining and nesting tasks in a hierarchy.
  • Control execution flow using composite, decorator, and condition tasks.
  • Create custom tasks by extending core classes: BTAction, BTCondition, BTDecorator, and BTComposite.
  • Built-in class documentation. Check out the BehaviorTree class documentation to get started.
  • Share data seamlessly between tasks using the Blackboard.
  • Blackboard scopes isolate variable namespaces and enable advanced techniques like sharing data between agents in a group.
  • Use the BTSubtree task to execute a tree from a different resource file, promoting organization and reusability.
  • Visual Debugger: Inspect the execution of any BT in a running scene to identify and troubleshoot issues.
  • Monitor tree performance with custom performance monitors.


One of the characters form LimboAI demo project – the player character

Hierarchical State Machines (HSM)

  • Extend the LimboState class to implement state logic.
  • The LimboHSM node serves as a state machine that manages LimboState instances and transitions.
  • LimboHSM is a state itself and can be nested within other LimboHSM instances.
  • Event-based: Transitions are associated with events and are triggered by the state machine when the relevant event is dispatched, allowing for better decoupling of transitions from state logic.
  • Combine state machines with behavior trees using BTState for advanced reactive AI.
  • Delegation Option: Using the vanilla LimboState, delegate the implementation to your callback functions, making it perfect for rapid prototyping and game jams.
  • 🛈 Note: State machine setup and initialization require code; there is no GUI editor.
One of the characters form LimboAI demo project – the summoner

Tested

  • Behavior tree tasks and HSM are covered by unit tests.

GDExtension

  • LimboAI can be used as extension. Custom engine builds are not necessary.

One of the characters form LimboAI demo project – the fencer
Github logo

Find out more and get your own copy on GitHub!

Mastodon social network logo
BlueSky social network logo
X social network logo
Github logo
Discord communicator logo