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:
The algorithm is taken from: http://www.vergenet.net/~conrad/boids/pseudocode.html which has a super simple breakdown. It was really helpful.
And here is a tiny demo of how it looks, for the lazy: