This will be the last <canvas> demo for a while. I’m playing a little more with jQuery at the moment so the next few posts will be related to that. I made a cool fading image switcher with a few simple lines of JS. I’ll post that soon. For now, enjoy the bricks game! Special thanks to Andy for co-coding this with me. If you want a challenge, the harder version (faster ball) can be found here.

It is buggy – yes, I know. Collision detection in JS isn’t an easy thing to do. If you move the mouse too quickly it can skip over the frame where the ball collides with the paddle. I’ve commented the code on the hard version (mostly). This will briefly explain what all the code does. I’ll finish it soon when I get a little more free time.

Bricks Game in Canvas