Jump to content
  • Advertisement
Sign in to follow this  
omegarealist

Flocking AI Algorithm.

This topic is 3719 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need a Flocking AI Algorithm so that when I call for things to flock together they will do so and perform as a crowd and mimick each other but not immediatly so they look like they still have independent AI functions. I would appreciate any help and would prefer code samples.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

Did you look at craig reynolds paper on flocking ?
http://www.red3d.com/cwr/boids/

There is everything you need to implement the flocking behaviour.

Regarding being able to switch between one navigational AI and another, I would suggest to use a behaviour class. In normal use, each entity uses its base behaviour class. When you order to flock, you just deactivate the base behaviour and stack up the flocking behaviour for each entity. When entities are flocked together, you pop the flocking behaviour and activate back the base behaviour.

Hope that helps.

Ghostly yours,
Red.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!