Actionscript 3 AI Steering Behaviors Library

The library is taken from the source code of the book “Programming game ai by example” (a book that I love very much) you can find c++ sources and binaries at http://www.jblearning.com/Catalog/9781556220784/student/ (or just the part regarding the Steering Behaviors down on this page) and some excerpt and related talk at http://www.ai-junkie.com/books/index.html my first two little example in as3 are at http://www.imageinaction.net/works/steeringBehavior/flocking.html and http://www.imageinaction.net/works/steeringBehavior/followPath.html (refresh the page to get a new random path).

The library is based on simple behaviors like seek, avoid, interpose, obstacles avoidance, cohesion, alignement etc. that can be combined togheter to get a more complex behavior. by the way as part of it there are some usefull class to perform some geometry, collision detection, vector operation. there is anybody out there that would like to help me testing, improving, optimizing the code?


(reload page to get a new path)

Download

Documentation

Flocking sample

Follow path sample (reload page to get a new path)