Development, Labs

Making Tools for Behavior Trees


Recently I’ve continued my work on Behavior Trees, taking what I’ve learned in my previous experiment and integrating it into our existing AI framework.

Friendly AI interacting with each other…

My goal this time was to create an authoring tool to quickly create behavior trees inside the Unity editor, instead of handwriting them in code.

Initially, I was planning to rewrite each AI action into modular objects that I could create on demand in the editor. But after experimenting for a little, I came up with a better solution that could let me experiment more, without creating too much junk in the project.

The original code already worked, so it didn’t need to change. Also, it was convenient to bash out and manage raw code, especially when I was still figuring out the AI.

The Behavior Tree for the monster AI in action.

So I made it possible to do both, mixing both raw code and modular code objects, together. And it worked out great!

Here’s a video of the AI in action. It’s the same as the last test, just using the new system and a few visual changes.

What’s different?

  • It’s using the Owner’s 3D model from The Very Organized Thief.
  • Added some new animations to the Owner, like hiding, scaring and punching.
  • Each AI’s behaviors can be swapped easily with another via “drag and drop”.

The authoring tool also lets me visualize the executing tasks, which makes it easier to debug and see how the behaviors are running.

Now we have a new way to author AI behaviors quickly and should meet the demands of the types of AI we are planning to add to The Very Organized Thief.

Expect more updates to come.


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Ko-fi Coffee

2 Responses

    Matthew says
    on

    Really interesting, you guys are doing an awesome work :)


      Redefinition Games says
      on

      Thanks :)



Comments for this post are closed.