Blow the wall!

This is a simple computer shooter game using a 16x2 LCD panel, an Arduino, piezo buzzer, WAV player module, and pushbutton switches. The first line of the LCD consists of randomly generated bricks which you blow up by launching rockets from a gun on the second line. A cooperative task scheduler called (naturally) TaskScheduler by Anatoli Arkhipenko is used to handle the multitasking requirements of creating the bricks, processing the movement and fire buttons and playing musical tones.

Game Box

The LCD game box has a laser-cut 3mm acrylic top panel. The bottom buttons shift the gun left-right. The next buttons above are the fire buttons, you can shoot with left or right hand. The top left blue button is the power switch and the top right the reset button. The LED flashes when a brick is blown up and a piezo buzzer produces sounds of rocket launches and explosions(with a bit of imagination). You can plugin headphones to hear lasercannon shots and explosions from WAV files.



To win a game, you must blow up at least 10 bricks within 30 secs. It's not as easy as it sounds!



Picture below shows bricks on first line of the LCD panel and the rocket launcher on the second. When the fire button is pressed, animated rockets shoot at the bricks.



Player statistics are shown at the end of each game.



Winning game with WAV effects.



Losing game with WAV effects.



Winning game with piezo effects.

Schematic

Resources

View the code here.

Read the TaskScheduler documentation for API details.

MDFLY embedded MP3/WAV player module datasheet for API details.

Sound effects WAV files from the web:

Bart Simpson


Homer Simpson



Brick, Lasercannon shot, Explosion