Boids AS3 Demo

I’ve uploaded the Boid source code. Sorry for the delay. I’ve also included some basic examples of how you can create nice behaviors using the Boid class. If you set Main.as as your document class then you’ll see that within that you can specify the demo to run when you compile.

The basic demos included are:

  • Chase – Boids chase each other
  • Flock – Boids flock together with some wander
  • Graphics – How to use custom graphics with a Boid instance
  • Seek – Boids seek the mouse position
  • Wander – You guessed it, they wander

I’ve commented all of the methods and properties and there is also documentation (open index.html in the docs folder) to get you started. Before you mention it, yes, there is some redundant code ;) (such as the constrainToRect method which doesn’t really work) but I need to do some optimisations anyway so I just left it as is for now, rough and ready.

Download: AS3 Boid Class & Demos Read : Flipping you the Boid »

Posted on 05 May 2009
90 Comments
19 Trackbacks

About me

Soulwire is a weblog by Justin Windle; a Senior Interactive Developer at Fi (Fantasy Interactive), Stockholm – I often Tweet, Flik, Link and Vim.

Warning: file_get_contents(http://search.twitter.com/search.atom?q=from:soulwire&rpp=1) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 410 Gone in /home/soulwire/webapps/soulwire_blog/wp-content/themes/soulwire/functions.php on line 203