Fun and Games
Arduino Game library for 20x4 display
<img class=" titleimg" alt="Arduino Game Board 20x4" src="/images/electronics/arduino/games/game-library-20x4.jpg"/>
Here we discuss a game library that provides an easy way to write games with 20x4 parallel display and a few micro-switches. There is quite a lot of stuff going on in this library, so I'd like to start slow and build up. First, let's start by taking a look at the parts needed to use this library:
- 20x4 display (other size will work too)
- 4k7 resistors (at least 6)
- 220R or 330R resistor for backlight
- Microswitches for joystickÂ
- 1uF capacitor to smooth PWM
- Arduino and breadboard!
For a simple game we need some baddies, a player (that we can move) and possibly the ability to fire. In addition we need collision detection to work out when a baddie has been caught or the game is over because the player was hit. Options for writing games are limited on a 20x4 display, but we've managed to put a few games together.