• Home
  • About us
  • Articles and Tips
  • Contact us

Articles

Home / Articles / Behavior trees – Team player example

Behavior trees – Team player example

Posted on: 12-15-2008 Posted in: AI, Unity

NOTE: These tutorials were created for Behave 0.3, and Behave has changed considerably since then. You can use them as guidelines for concepts, but do not expect the code will work straight out with the latest libraries.

Continuing with our series of examples of behavior tree implementations using AngryAnt’s Behave component for Unity, this demo shows branching behavior with selectors.

In this case we have implemented the concept of teams, the team number displayed above each cube. A cube will pursue the ball only if it doesn’t consider it to be owned by another cube of the same team. Cubes who own the ball butfind themselves overwhelmed will attempt to pass it to another cube of their team. If a cube doesn’t own the ball, but knows that one of his team has it, he will attempt to intercept nearby enemies so that they don’t attack his teammate.

The kicker’s color indicate its current status in the behavior tree:

  • Red: going for the ball
  • Magenta: someone else is has the ball and we’ve located a nearby enemy, intercepting
  • Yellow: can’t see a ball, but detected moving players – following
  • Blue: can’t see a ball or players, waiting

The tutorial will be coming soon, but you can inspect the behavior tree meanwhile.


</p> <div align="center"> This content requires the Unity Web Player</p> <p> <a href="http://www.unity3d.com/unity-web-player-2.x">Install the Unity Web Player today!</a> </div> <p>

About the Author

Ricardo J. Méndez

  • Popular Posts
  • Related Posts
  • UnitySteer 2.1 released
    UnitySteer 2.1 released
  • UnitySteer: How are you using it?
    UnitySteer: How are you using it?
  • Postmortem: The whole indie gamedev thing
    Postmortem: The whole indie gamedev thing
  • UnitySteer: Experimental vehicle and radar changes
    UnitySteer: Experimental vehicle and radar changes
  • Public Alpha 2
    Public Alpha 2
  • Project K - Polish and Effects
    Project K - Polish and Effects
  • Changes from Alpha 1
    Changes from Alpha 1
  • Screenshot Saturday 20120114
    Screenshot Saturday 20120114

Leave a Reply

Click here to cancel reply.

Recent posts

  • Public Alpha 2
  • Project K – Polish and Effects
  • Changes from Alpha 1
  • Screenshot Saturday 20120114
  • Project K – Playable Alpha

Recent comments

  • UnitySteer 2.1 released « Arges Systems on UnitySteer 2.2 released
  • UnitySteer – Steering components for Unity « Arges Systems on Project K – Playable Alpha
  • UnitySteer – Steering components for Unity « Arges Systems on UnitySteer 2.0 – multiple agents example
  • Ricardo J. Méndez on UnitySteer – Steering components for Unity
  • Isaac R. on UnitySteer – Steering components for Unity
© 2009-11 Arges Systems Inc.. All Rights Reserved
TwitterStumbleUponRedditDiggdel.icio.usFacebookLinkedIn