A simple canvas game made with p5.js. The game begins with 5 rows of bricks having random colors at the top of screen. The goal is to destroy all bricks. A ball moves straight around the screen and when it hits the brick, it bounces back and the brick is destroyed. The player loses a turn when the ball touches the bottom of the screen; to prevent this from happening, the player has a horizontally movable paddle to bounce the ball upward, keeping it in play.
Try the demo code here: