Yet More On Behaviour Trees

So I've been going through as much stuff on behaviour trees that I can find to try and figure out whether they're going to be appropriate for what I'm doing and how they actually work. "Behavior Trees for Next-Gen Game AI" is very comprehensive and well worth a watch if you're interested (despite my dislike for videos - text is just so much more practical), and I think I can see how it would come together to produce interesting behaviour.

In a way I'm actually feeling a little disappointed - the current game design doesn't call for massivly complex AI (you are fighting zombies after all) but now i have the urge to switch to something with fewer enemies with a much richer set of behaviours. But that will have to wait, and the current game will give me a chance to walk before I run anyway.

I'm not entirely sure how i'm going to handle interrupted states and animation (like when an enemy gets hit right in the middle of an attack). Currently I'm thinking of having behaviours listen to events, and making them fail and bail out if they take damage. It seems like it would work, but it sounds like it would require handling this event all over the tree, which could get tedious and error prone. On the other hand it might be a good way of intelligently playing different damaged/death animations depending on what we were doing at the time.

17 Responses to “Yet More On Behaviour Trees”

  1. alexjc Says:

    The reason for the video is that I prepared the whole talk for the Game Developer’s Conference (GDC) and it was an easy way to get all that work down for future reference.

    It’s true though, a comprehensive article would do the trick too. (Damian Isla’s Halo 2 paper on Gamasutra is not bad though.)


  2. JC Says:

    I’ve not seen the Halo 2 one, I’ll have to hunt that down, thanks. Have you any ideas for handling the transitions to damaged/death behaviors and animations that I mentioned above?

  3. alexjc Says:

    The important thing here is to decouple your AI logic from the animation state. So you don’t have the AI mirror individual transitions in your animation systems. Instead, you just have the AI decide what to do based on the animation state variable, which is decoupled.

    So when you request a death animation, the AI reads the current animation state, potentially using other factors to decide what to do, then requests an animation.

    Does that make sense? It’s getting late :-)


  4. JC Says:

    I think that makes sense, although it probably means my animation system needs another layer to handle that kind of request since at the moment it’s pretty simple.

    I’m getting to the point where I can’t quite see the wood for the trees – I suspect the best way forwards now is to get my hands dirty and see what works and what doesn’t…

  5. alexjc Says:

    Definitely! Get something working even if it has flaws, then improving it the next time around is much easier :-)


  6. Game AI Roundup Week #28 2008: 13 Stories, 1 Video, 1 Quote, 1 Event — Says:

    [...] » Yet More On Behaviour Trees [...]

  7. HappyPete Says:

    A big Hello Friend, I am commenting from Sydney, Australia. Thanks for the great article. It helped me a lot with my college internet research essay :)

  8. Petloveyou Says:

    If I coeuinmcatmd I could thank you enough for this, I’d be lying.

  9. Tyler Pebley Says:

    It is not usually very easy to remain positive, but bordering myself with wonderful good friends as well as a suportive household constantly makes it less difficult. I remind myself constantly that every day is actually a present, and we’re fortunate to awaken just about every morning and choose component in it…

  10. Jewell Lair Says:

    Your site doesn’t display appropriately on my iphone – you may wanna try and repair that

  11. redbus coupons Says:

    You’ve hit the nail in your brain with excellent presentation.

  12. makemytrip deals Says:

    goodenjoyableawesomefineattractivedecentexcellentexcellentsuperbfantasticamazinglovelysweetterrificawesomeexcellentrelaxinghelpfulbeautifulenjoyableadvantageousidealcozywonderfulimportantgreattop qualityfirst classfancyquality publishwrite-upreportdocumentcontentpostingshort articleguidewritten piecepageinformationblog publishbit of contentpiecereviewwritingeditorialcommentarywrite-upshort publishpublishmaterialblog and incredibly logical and relevant points submit on your part.

  13. Gary Wing Says:

    Man this is so informative, I love reading about health. Loved the tip rainey just made. Its so difficult to find the right product for me. I’ve been looking now for 3 weeks! LOL Just want to let you all know I will make my goal one way or another. I promise you that! Wish me luck! :)

  14. Monroe Despard Says:

    Great write-up, I’m normal visitor of one’s site, maintain up the nice operate, and It is going to be a regular visitor for a lengthy time.

  15. Tegan Duerkop Says:

    I like this web site so much, saved to favorites .

  16. Bryanna Dicioccio Says:

    I not to mention my pals happened to be going through the nice information and facts found on your web site and then immediately developed an awful suspicion I never thanked you for those techniques. These young men are actually absolutely happy to study them and have now surely been taking advantage of these things. Appreciate your simply being very thoughtful and also for picking out such important themes millions of individuals are really desirous to learn about. My very own sincere regret for not expressing appreciation to you earlier.

  17. Says:

    Right here is the perfect web site for everyone who wishes to find out about this topic. You know a whole lot its almost hard to argue with you (not that I really would want to…HaHa). You certainly put a brand new spin on a topic which has been written about for many years. Excellent stuff, just excellent!

Leave a Reply