LimboAI is an open-source C++ module for Godot 4 providing a combination of Behavior Trees and State Machines to craft your game’s AI. 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 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. I wrote a short introduction to behavior trees, which you can read here.
Behavior Tree Comments: Annotate behavior trees with the new BTComment task.
BTRepeat Improvement: Added a forever mode to the BTRepeat task.
Improved Task Palette:
New context menu options for BT tasks: “Edit Script” and “Open Documentation.”
Add and remove tasks from favorites.
Added a “Refresh” button.
Introduced a new category system for better organization.
Improved task filtering capabilities by category and type.
Rich documentation tooltips.
Keyboard Shortcuts: Added keyboard shortcuts for a variety of editor actions.
Action Banners: Now you’ll receive action banners for various alerts requiring user input.
Misc Menu: Includes shortcuts for opening the debugger and project settings, creating script templates, and displaying an introduction to Behavior Trees.
Task Custom Names: BT tasks with custom names are now emphasized in both the editor and debugger.
Unit Testing: Implemented unit tests for most tasks and nodes, with testing performed in the new GHA workflow on commits to the master branch.
Improved Documentation: Enhanced in-editor documentation for all classes and added an introduction to Behavior Trees.
GDExtension support is coming to LimboAI, and it will be going v1.0 in a few weeks. To celebrate that occasion, we decided to make a pre-release version 1.0-dev1.
Good question! Recently, I fixed a number of issues related to C# in the LimboAI and I could implement simple tasks in C# using LimboAI. FYI, I tested it before I added GDExtension support. You’d need to use LimboAI’s generated C# glue for that, and it’s a bit confusing how to do it, at least for me personally, but it worked. With the GDExtension, I’m not sure how this would work, and if you can access the classes exported by GDExtension - you should be able to use LimboAI. You can also check out C# editor builds on the GitHub!
BlackboardPlan resource: Stores and manages a collection of variables, and is used to construct new Blackboard instances.
Define blackboard variables in a BehaviorTree resource, using it’s BlackboardPlan property.
BTPlayer also has its own BlackboardPlan which extends the behavior tree BlackboardPlan resource, i.e. variables from the BehaviorTree resource are overridden in the BTPlayer node.
BlackboardPlan Editor
Accessed with “Manage…” button in the inspector.
Rename, reposition, and change types and hints of the blackboard variables.
Specify relevant export hints for the variables.
Edit default variable values directly in the inspector.
Binding: Bind variables to object properties using blackboard.bind_var() method.
Blackboard variable property editor:
Used in the behavior tree tasks and can be used with custom tasks.
Note: It is shown for any property that ends with “_var” and also when using BBParam-derived parameters.
Handy property editor that shows an indicator if variable is included in the blackboard.
Clicking on the indicator takes you straight to the blackboard plan editor and auto-fills variable name if it doesn’t exist.
Also provides a drop-down selection of existing variables.
Special indicator for variables that begin with “_” (aka private variables).
These changes are fully compatible with both module and GDExtension builds!
Other changes
BBVariable object holds the value of a blackboard variable and its metadata (not exposed to the API).
GHA: Fixed issues with iOS templates build workflow
LimboAI version 1.0 is finally here after months of intensive coding and refining!
Now with GDExtension support, a new powerful blackboard system, improved editor, awesome demo project, and much more!