I needed behaviour trees because I wanted to manage the complexity of the units AI in Warrior Defense which originally used finite state machines (FSM). FSMs are great because they are so simple and intuitive. When they get big, however, they become so complicated. It got to a point where I'm afraid to change the configuration … Continue reading Finite State Machine vs Behaviour Tree, A True Story
I think Banana Tree is complete, for now. Software projects can never be completed. Little UI elements and responses are still missing. No copy-paste yet, no undo-redo. But for its purpose and intended use, it does it very well. I was able to replicate the behaviour of ground and flying crawlers using the tool. By … Continue reading Banana Tree Success!
A lot has happened to Banana Tree and I'm quite happy with its current state. More variable types are now supported in the node inspector. I prioritized the variables that are used in existing actions so I could test them as soon as possible. While thinking about how action nodes should pass variable values to … Continue reading Working Behaviour Tree From Editor
Today, I've been working on the node inspector of a BananaTree node. The inspector displays information about the selected node. It's most important use, though, is to set variables of a node. Every property in an action that has a public getter and setter would be considered as a variable. This information could be retrieved … Continue reading Experimental Node Inspector
Look, the editor now has an action browser and can add actions into the tree! This thing took a long time to create. I wanted actions to be added into the editor automatically after compilation. It uses reflection to look for those classes. I also studied attributes and how to access them so I could … Continue reading Action Browser Window
I just finished coloring the different nodes. This has proven to be useful. At first glance, I could see right away what type of node it is. The color could also provide meaningful description to the node when a different label would be provided (which I plan to implement later). I've ran into some complexities … Continue reading Colorful Nodes, Bugs, and Complexities
My Behaviour Tree editor is getting interesting. I can now add child Composite or Decorator nodes. The nodes are identified through reflection. Here's a simple utility code to populate a list with all the subclasses of the specified type: This is what I used to collect all Composite nodes and Decorator nodes. Now I can … Continue reading Child Nodes and Reflection