Advertisement

flocking and formations

Started by March 30, 2006 03:52 PM
11 comments, last by Timkin 18 years, 7 months ago
but in real life bird dont elect a leader before taking flight ;)

Its been a while since i played with flocking, but i think the for a wedge formation, birds look for the closest bird in front, and try to position themselfs to the back/side of them. If there are no birds in front of you, then you're on your own (or maybe there's birds following you!) so just do your own thing, untill someone happens to be in front of you.
The basic'forces' involved in flocking are (as i remember..) :
trying to match your speed with the speed of others around you, trying to position yourself away from others (to an optimal distance) and trying to position yourself at the average position of the flock. - these balance out into a formation. Other forces, such as keeping at an angle to others in the flock (as mentioned above) can be added to change the form of the formation.
http://www.red3d.com/cwr/boids/

This guy is where i originally got my info, so listen to him more than my ramblings above ;)

I used his techniqes in a Half-Life teamplay bot, and it worked pretty well for squad-based exploration without specific directions ;)
Advertisement
Quote: Original post by Anonymous Poster
but in real life bird dont elect a leader before taking flight ;)


Game AI isn't about simulating real world entities... it's about making things 'look' like real world entities (or at least entities that are natural in the world you define for them).

Furthermore, flocking behaviours such as boids are not simulations of how real animals move in flocks... but they do show us that animals that move in flocks need only simple local rules to achieve coordinated behaviours.

If you want to simulate how real birds fly in a V, go and talk to some biologists. If you want to create your own behaviours in the style of boids, then you can get away with whatever you like that gets you to the result you desire.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement