« Ice Core Data Visualization | Main | Kaleidoscopic Cell v1 »

Steering Behavior : Hunting and Fleeing

Introduction: It is always interesting to watch the behavior of creatures. It's fascinating how a few relatively simple rules can create complex life-like behavior. - Edwin


Author: Mike Johnson

Author's comments:

This was a chance to combine several steering behaviors into a single environment
and run it in Flash 8 to see the potential speed increases. The peaceful entities will
wander if they are not feeling threatented, flee if they sense danger nearby, and try to
avoid static obstacles as well as mobile ones. The hunters will try to chase and attack
the nearest source of food, avoiding obstacles. Rigid body dynamics have not been implemented,
so there will be cases where overlaps and intersections happen. The predators have to take
several "bites" from their prey to kill them, which makes it even more interesting to watch.

This requires Flash 8.

This was done purely using Flash MX with the header changed to play for Flash 8.

Download Source

The Blogathon is over, but you can still show your support for GalaxyGoo.