The project makes a visually interesting simulation of a character wandering through a maze looking for a key and trying to find the door to exit only to be stuck repeating this for all eternity. Additionally, there are "enemies" trying to kill the character, but the bright side is that when the character dies, within a matter of time, he is regenerated forever stuck looking for potions to stay alive a little longer only to find another key and another door.
DFRobot Arduino Uno LCD with buttons Shield × 1
MAX7219 8X8 Red Dot LED Matrix × 1
In my youth, we had arcades and bowling alleys to play games slightly better than the Atari home gaming system. The VIC-20 home computer system was the predecessor to the Commodore-64. Growing-up during a time before wireless phones and graphics better than the Atari, I really enjoyed the text-based adventure games. To this day, I can recall images in my mind of what I imagined while reading the descriptions of the environments I got to explore. Using only Arduino Uno, I want something like a text-based adventure or Multi-User Dungeons (MUDs), or Zork, using basic rules of Dungeons & Dragons with a feel similar to Gauntlet or Diablo.
This simulation covers the basic motivation of finding the key hidden in the current map and then locate the door to exit. Each player has hit-points, armor class, experience points, and can hold up to three items. The MAX7219 8X8 Red Dot LED Matrix is used as a 'viewer' into the world of the simulation, displaying a section of overall map at a time. Each dot represents either a wall, if solid or a player when blinking. As the player moves around the map, the display moves to the relevant section.
I have included several mini animations, a series of icons shown on the 8x8 display, for finding a key, using a potion, using magic, opening the door, and player death. I have also included numbers 1 - 20 for showing the result of a simulated die roll. However, showing the number each time the player rolls is annoying so this animation has been disabled.
If you are making this project then I will assume that you know how to compile a sketch and upload it to the Arduino Uno. You will need to have the LiquidCrystal.h library and the LedControl library in order to compile the source available at the link above.
The code for controlling the player's actions using the LCD buttons shield works but you will have to slow down the timing of turns by pressing the DOWN button until the simulation has slowed down enough. The UP button increases the speed. Selections can be made by pressing the RIGHT button to toggle and the SELECT button to choose. I would appreciate any feedback you have as to how we can better control the player and keep the simulation going at a reasonable rate.
CUSTOM PARTS AND ENCLOSURES
LCD Shield Schematic
LCD Shield footprint
CODE-ArduinoRPG
Complete source-code except LedControl and LiquidCrystal libraries.