The pictures and video do not fully capture the brilliant color when seeing it for yourself.
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. Other enemy players try to kill the main character, can pick-up and use items including the key to open the door, resetting the maze. When any character dies, within a matter of time, regenerated with randomly selected base stats; forever stuck looking for potions to stay alive a little longer only to find another key and another door.
This is a new version of an older project: https://www.hackster.io/bitsandbots/existential-crisis-aka-arduinorpg-fdf238
This simulation covers the basic motivation of fighting to stay alive in an effort to find 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. Each map contains a key, and a randomly selected number of rewards, or items to help the player. Items available are: a potion of healing, a better weapon or magic.
A 64 RGB LEDs in an 8×8 display is used as the ‘viewer’ into the World of the simulation, displaying only a quadrant section of the overall map at one time. As the primary player moves around the map, the ‘viewer’ display moves to the relevant section.
RED – Opponent Player Characters ( Enemies )
GREEN – Main Player Character ( Game Focus )
BLUE – Wall
WHITE – Door
YELLOW – Key
Find a key
Use a potion
Open door using key
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.
How the Simulation Works
On each turn, a player object executes the function WhatAreMyOptions
Move ( Direction Available: North, East, South, West ) A proximity-check to opponents is made to determine options. Short-term Memory of locations explored. Coordinates of recent moves are stored in the player object in an effort to reduce looping.
Attack: Each player rolls a 20-sided die trying to meet or exceed the Armor Class value of the opponent. Upon a successful hit, the player then rolls a 4-sided die for damage and applies any bonuses. The total damage is subtracted from the opponent’s hit points.
Check Inventory and Use Item: Randomly determined for simulation purposes.
Source-Code – I’m updating the source-code to look less like a collection of notes and more manageable.
Potential for Expansion using I2C
Add additional microcontroller or Raspberry Pi for Neural Network.
Add better controls, such as push-buttons, and even sensors.
Add a sound-effects module
Additional visual displays.
More About Electronics:
- Why DIY when you could buy?
- Why Arduino when you can Pi?
- Making a Lightshow with Arduino
- Making Sound Effects with Arduino
- Working with Multiple Sensors and Arduino
- Using a Raspberry Pi and USB Camera
- Using a Raspberry Pi for your own Inventory Management System
More About hydroMazing:
- Managing Nutrient Solution Systems
- Setup hydroMazing Smart Garden System
- Using Arduino to Wirelessly Control Appliances
More About Indoor Gardening:
- What is a “Smart” Garden?
- Starting a Smart Indoor Garden
- Digging Deeper into Indoor Gardening
- Indoor Gardening: What can go wrong?