• 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
  • Quick SteerToFollow example
    Quick SteerToFollow example
  • Screenshot Saturday 20110813
    Screenshot Saturday 20110813
  • Screenshot Saturday 20110806
    Screenshot Saturday 20110806
  • UnitySteer - AutonomousVehicles and Bipeds
    UnitySteer - AutonomousVehicles and Bipeds
  • Hairy Tales Previews
    Hairy Tales Previews
  • Quick SteerToFollow example
    Quick SteerToFollow example
  • UnitySteer - AutonomousVehicles and Bipeds
    UnitySteer - AutonomousVehicles and Bipeds
  • Hairy Tales progress - new elements and a boss
    Hairy Tales progress - new elements and a boss

Leave a Reply

Click here to cancel reply.

Recent posts

  • Hairy Tales Previews
  • Quick SteerToFollow example
  • UnitySteer – AutonomousVehicles and Bipeds
  • Hairy Tales progress – new elements and a boss
  • Public Alpha 2

Recent comments

  • Ricardo J. Méndez on Quick SteerToFollow example
  • Ben Ezard on Quick SteerToFollow example
  • Ricardo J. Méndez on UnitySteer 2.1 released
  • Elie on UnitySteer 2.1 released
  • Ricardo J. Méndez on Upcoming changes to UnitySteer
© 2009-11 Arges Systems Inc.. All Rights Reserved
TwitterStumbleUponRedditDiggdel.icio.usFacebookLinkedIn