Leave a comment

>Behavior Trees

> Over the past few weeks I’ve been digesting behavior trees – trying to learn all I can about them.

I finally decided I knew enough to start implementing my own. I’ll go into more detail in future posts, but I’m happy with how things are coming along so far. Once I had the basic building blocks in place, it was pretty easy to cobble together a test behavior that does the following:

If the flag is available, go to it, pick it up, and bring it back home (and drop it). If someone else has the flag, try to kill them.

Once you’ve got the building blocks in place, you basically have a “language” through which you can build behavior. Kind of neat to see it coming together.

I quickly realized that assembling these trees in code was way to complicated though. After toying around with various options for UI, I settled on a small Winforms app in which I manually bind the UI to the behavior tree hierarchy. There is a little bit of tedious UI work to get this up and running, but I decided it was a more prudent option at this point than learning about WPF databinding.

The result is what you see in the linked photo (that screenshot is the behavior for the AI I described above). I’m able to add/remove/re-arrange the nodes, set parameters on them, and save this out to an XML file which can be deserialized by the game.

I haven’t done this yet, but it should be straightforward to have the game “hot load” the AI as I make changes in the editor.

Now *all* I need to do is write the AI, and fix all the design issues I haven’t forseen.

I need to think about/implement:

  • target selection
  • memory
  • behavior vtables to aid in the re-use of certain subtrees

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Space Quest Historian

Let's Play's, Podcasts, and General Adventure Game Goodness

Harebrained Schemes

Developer's blog for IceFall Games

kosmonaut games

Development blog of "Bounty Road"

Halogenica

Turn up the rez!

bitsquid: development blog

Developer's blog for IceFall Games

Game Development by Sean

Developer's blog for IceFall Games

Lost Garden

Developer's blog for IceFall Games

Memories

Developer's blog for IceFall Games

Casey's Blog

Developer's blog for IceFall Games

Blog

Developer's blog for IceFall Games

Rendering Evolution

Developer's blog for IceFall Games

Simon schreibt.

Developer's blog for IceFall Games

Dev & Techno-phage

Do Computers Dream of Electric Developper?

- Woolfe -

Developer's blog for IceFall Games

Ferrara Fabio

Game & Application Developer, 3D Animator, Composer.

Clone of Duty: Stonehenge

First Person Shooter coming soon to the XBOX 360

Low Tide Productions

Games and other artsy stuff...

BadCorporateLogo

Just another WordPress.com site

Sipty's Writing

Take a look inside the mind of a game developer.

Jonas Kyratzes

Writer, game designer, filmmaker.

%d bloggers like this: