What is hxbt?
hxbt is a behavior tree library that I've been working on for a little while. hxbt is being developed in Haxe, hence the name hxbt. The library is not dependent on any other library to function, so it should work with your preferred haxe library, framework or engine.
hxbt decouples data from logic in order to avoid wasting resources and leave as small a memory footprint as possible. Decoupling data and logic allows the same behavior tree to be used by different objects without having to make a new instance of the tree, as no data specific to the object that it is controlling is stored in the behavior.
What are Behavior Trees?
There is a lot of information out there on the internet that explain behavior trees really well, which means I won't take the time to try to create my own, probably inferior explanation to what behavior trees are. Instead I suggest that you take a couple of minutes to google them.
What can it do?
Behavior trees are often used in applications that need some kind of artificial intelligence. Such as digital games, both indie games and AAA titles. This is however far from the only area where behavior trees are useful. They are great for structuring code in a way that makes the flow of the code easy to follow.
How does hxbt work?
The samples folder in the hxbt repository contains usage examples aimed at showing how hxbt can be used with different haxe libraries and frameworks. As it stands now it only contains two different samples, but more are in the making.
hxbt and Luxe/Snow
As hxbt isn't tied to any specific framework or library it works with both Luxe and Snow. The samples folder contains a sample that uses hxbt together with Luxe.
Where can I find hxbt?
The github repository would be the place to find and download the library. It will be added as a haxelib package in the near future.
The future of hxbt
hxbt is still a young library, but allready has enough base components to satisfy most behavior tree needs. That being said, the library is open source, anyone is welcome to make additions to it.
Aside from that, the next item on the checklist is to analyze the performance of the library, as that hasn't been thorougly done yet. The focus of the library so far has been on creating a behavior tree library that doesn't use a lot of memory and where the behavior trees can be shared between different entities that use the same tree. As I am currently satisfied with the memory usage of the behavior trees, focus will be shifted to make sure that the behavior trees are as performant as possible when it comes to CPU usage.
A graph tool is also in the planning stages, which will allow behavior trees to be created quickly by dragging and dropping components in the graphical tool. There isn't much to share about this tool as of this time though, as no tool coding has been done yet.
Buh-bye for now
More posts will be written about the library when there is more to share. For now, give the library a try and let me know what you think.