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

Articles

Home / Articles / UnitySteer 2.0 – multiple agents example

UnitySteer 2.0 – multiple agents example

Posted on: 10-19-2010 Posted in: AI, Unity, UnitySteer


Most UnitySteer webplayer examples on the site are by now a year old, so with the release of UnitySteer 2.0 I thought it was time we came up with a new one. Previously it was more difficult for me to show what was going on in the agents’ brain, but Ryan Scott was kind enough to contribute a GL-based debug visualization library which helps display it in the actual game scene.

Without much further ado, here’s a demo of 77 animated agents wandering around, avoiding each other and obstacles.


Unity Web Player. Install now!

Some notes:

  • This demo uses mainly three behaviors: SteerForWander, SteerForSphericalObstacleAvoidance, SteerForNeighborAvoidance. It also uses SteerForTether to avoid them wandering too far.
  • Pressing 1 will load the default scene, with only 77 agents. Pressing 2 will load a scene with 154, for which rendering is significantly heavier.
  • The initial randomizing function is dead dumb, so it’s perfectly possible you’ll start in geometry. He’ll find his way out soon enough.

The demo is a bit rendering heavy, and I’m curious what kind of performance people are getting. Enjoy!

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
  • UnitySteer - AutonomousVehicles and Bipeds
    UnitySteer – AutonomousVehicles and Bipeds
  • UnitySteer: Experimental vehicle and radar changes
    UnitySteer: Experimental vehicle and radar changes
  • Updates for March 7-14, 2011
    Updates for March 7-14, 2011
  • UnitySteer: the next few months
    UnitySteer: the next few months
  • (5) Comments
  • (1) Trackbacks
  1. Takuan Daikon10-19-10

    I don’t understand how so many Unity-related websites don’t realize that the web player doesn’t work –

    Unity’s hosted version of UnityObject.js has a syntax error, and doesn’t work on any web page I’ve visited with an embedded Web Player, in either Firefox or Internet Explorer.

    I has a sad :(

    (reply)
    • Ricardo J. Méndez01-11-11

      Very odd, I’d never seen it before. I’ve mentioned it to some folks at Unity, but nobody has reported it. It might be a good idea to shoot them an e-mail with your browser details.

      (reply)
  2. Bruce10-27-10

    Thanks for posting this!

    Here are the details on my performance:

    * Scene with 77 agents: Min: 14, Max: 55, Avg: 30.199

    * Scene with 154 agents: Min 7, Max: 21, Avg: 14.453

    The minimums are from the scene start, once the player walks around the FPS sticks to the average.

    System specs: 2x ATI HD 4890 / AMD Phenom II X4 955 (3,2GHz) / 4GB DDR3 PC3-10666 1333MHz

    (reply)
  3. CM01-29-11

    Excellent work! I am a noob to Unity but excited to learn. Is there any chance you can make this ‘multiple agents example’ demo available? I know it’s based on the standard 3rd Person demo available to the Unity Community, but I would like to learn how this is applied in this particular case. I believe people can learn some important things from this. Thank you very much!

    (reply)
    • Ricardo J. Méndez01-29-11

      Hello CM,

      It uses the stage, model and walk animation from the 3rd person demo, but that’s it. I might make it available at some point, but it depends on a library I cannot make available (the one I use for drawing the debug arrows) and would require a bit of documentation on the the choices I made for the parameters, and I’m afraid right now I can’t spare the time. Do download the other examples and experiment, you’ll likely be up to speed in no time. Enjoy!

      (reply)

Leave a Reply

Click here to cancel reply.

  1. UnitySteer – Steering components for Unity « Arges Systems12-19-11

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