Game Development Community

Flocking Behavior with Formation

by wave · in Torque Game Engine Advanced · 01/13/2011 (1:39 am) · 2 replies

I have the implemented book's source code with the title "Advance 3D game engine Programming" by kenneth about swarm..Please help me, how to add formation and obstacles avoidance?? anyone suggestion??

About the author

Recent Threads


#1
01/29/2011 (5:36 pm)
I'm not entirely sure how Kenneth's version of swarming works, but obstacle avoidance I would set up as a simple opposite of whatever swarm rules you have. From what I remember about swarms, one of the underlying rules is 'cohesion', i.e., keep close to your neighbours (but not too close). I would reverse that for obstacle avoidance, pushing boids away from known obstacle points.

Alternatively, you could incorporate dynamic obstacle avoidance with raycasts or similar, which would 'feel' for any obstacles in the boid's path, and adjust steering forces accordingly.
#2
01/29/2011 (10:53 pm)
'wave', now that you have implemented and studied the code from Ken's excellent book,
take a look at Improved AI Guard Unit for some very good basic AI functionality.