Fun Timing Game in Canvas

Multithreaded JavaScript, O'Reilly 2021, is available for early access and pre-order!

Seizure Spheres
Seizure Spheres

I just spent the last two hours building a game with my friend Andrew Beattie. Check out Seizure Spheres now! Right now!

Gameplay is very simple. Just hit WASD to toggle the arrows. You want the colors to be the same when the balls are at their largest. If not, you lose lives. When you run out of lives the game resets (a simple page refresh). The seconds are your score.

The code is ridiculously simple. It uses globals and all sorts of horrible evils. It does have some fun little optimizations though, like it only does a total redraw after the level has been cleared, since it can just draw over the previous state.

There's currently a bug, if you browse to a separate tab your score keeps counting.

Tags: #gamedev
Thomas Hunter II Avatar

Thomas has contributed to dozens of enterprise Node.js services and has worked for a company dedicated to securing Node.js. He has spoken at several conferences on Node.js and JavaScript, is an O'Reilly published author, and is an organizer of NodeSchool SF.