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
39 Comments
8 Trackbacks

Flow Field with Perlin Noise

It was a rainy Sunday and I found myself playing around with perlin noise for a couple of hours.

The idea was to create a simple flow field using the BitmapData perlinNoise method, and use this to influence the movement of autonomous agents. There is no complex vector math or steering behaviours, just some simple logic for how a particle or agent reacts to the current pixel it is positioned over. Read : Perlin Noise Flow Field »

Posted on 14 Dec 2008
26 Comments
2 Trackbacks

2D Cellular Automata

Inspired by Conway’s game of life, I decided to program a 2 dimensional Cellular Automaton in Actionscript 3.

I had been reading up on complexity theory for a recent project and the Cellular Automata just kept on rearing its head. Of course it displays the fundamental qualities of complexity; starting with an object following a set of simple rules and then creating multiple instances to form complex and unpredictable patterns. Read : 2D Cellular Automata »

Posted on 06 May 2008
12 Comments
3 Trackbacks

About me

Soulwire is a weblog by Justin Windle; a Creative Technologist at Lean Mean Fighting Machine, London – I often Tweet, Flik, Link and Vim.

Twitter <follow>

March 18th 2010 - 5:29pm

We've missed you Morris: RT @memotv: This guy is nuts. New trailer for Chris Morris' jihadist comedy Four Lions http://is.gd/aNzki