Hello.

I now mostly post over here: blog.greer-inc.com

I'm a Digital Designer, Art Director and Developer. I'm into photography, interactive design, the web, advertising and art.

Catch.

Posted: January 4th, 2010 | Author: | Filed under: General | Comments Off

I’ve been working through a few of the examples in Keith Peters’ Advanced Actionscript Animation book recently, which is as well thought through as its prequel.  The section on steering behaviors with 2D vectors is incredibly informative, and got me working on a game of tag between the little arrows.  Using the behaviors I’d just worked through in the book examples, this was surprisingly straightforward.  The players all avoid whoever is ‘it’, while he-who-is-it looks for the nearest player, and moves towards him (or, rather, his destination based on his speed and direction).

Get Adobe Flash player

Catches are pretty frequent when the arrows bounce off the walls, as the predator tends to be behind the prey as they turn.  Getting rid of the walls shows a more interesting pattern as the prey swarm together:

Get Adobe Flash player

Things have a tendency to get stuck on the edges still.

May have a go at skinning it with some frantic chickens running aboot after each other.  Then onto the chapters on isometric rendering.  Whoop.

Code available here: catch.


Comments are closed.