ImmaBoid is an AI steering behavior library for FlashPunk. In order to be affected by any behavior, an entity must extend the base Boid class, which extends FlashPunk’s entity class to add mass, velocity, and maxspeed to the entity. Any boid supports multiple behaviors, including the ability to sort the behaviors to start from.

Any behavior can be added to a boid through the method addBehavior(), which receives a behavior as a parameter. Every behavior has its own set of configuration parameters, e.g. the target to pursuit. The library has the following behaviors available: seek, flee, arrival, pursuit, evade, wander and follow path.


public class Zomboid extends Boid {
    public function Zomboid(x:Number = 0, y:Number = 0) {
        super(x, y);

        maxSpeed = 150;
        mass = 10;

var z:Zomboid = new Zomboid();
z.addBehavior(new FleeBehavior(someScaryBoid);
z.addBehavior(new FollowPathBehavior(pathToAwsome, 20));