Fun with emergent behaviour (or a boids bookmarklet)

I’ve been working on Kick Ass 2 lately. I am in the process of adding enemies, which are inspired by the enemies in the iOS app. The key difference will be the amount of enemies per page but also their movement types. I was looking for something that would be suitable and came across a flocking algorithm, Boids algorithm. Really simple and easy to implement.

To test this I needed good subjects, so I tried it on my Facebook page. It’s quite fun looking at my friends flying around, so I made a bookmarklet out of it:

Flocking Elements

The algorithm is taken from: which has a super simple breakdown. It was really helpful.

And here is a tiny demo of how it looks, for the lazy:

Posted in Programming | 1 Comment

One response to “Fun with emergent behaviour (or a boids bookmarklet)”

  1. Ji says:

    Hi, this bookmarklet can’t be used in facebook now. I’m not sure if we need a new version of it or not~ waiting for your help

Leave a Reply

Your email address will not be published. Required fields are marked *