Fireflies – My #js1k Contest Entry
Most javascript developers have probably heard of the js1k demo contest by now. (You can check out all of the entries here.)
Here’s my entry, just under the wire at 1022 bytes. (The right edge is a bit cut off, because of my blog’s layout – sorry.) It was only possible with the help of the Closure Compiler from Google, which totally rocks my world.
I’ve decided it looks a bit like two swarms of fireflies chasing each other around. It’s adapted from the “Boids” flocking algorithm, which is applied to both the individual bugs and also to the swarms themselves to make them chase each other. (I found this explanation particularly helpful.)
Anyways, I doubt I’ll place because there are a lot of really amazing entries, but I had a lot of fun building this. It was a bit of a flashback to my old computer graphics days, in college.
