Calling all adventurers! Prepare to embark on a thrilling collaborative treasure hunt with this interactive game. You’ll navigate a top-down world in P5.js using joysticks on custom Arduino controllers.
The Arduino controller is the command center. One joystick translates your movement (up/down/left/right, forward/backward) into smooth exploration in P5.js. Another button activates the metal detector, triggering a response in the game world.
P5.js paints the picture. The user explore a beautifully crafted map, whether it’s a lush forest or a sandy desert. Your character, represented by a sprite or shape, moves based on your joystick actions. Scattered throughout the map are hidden treasures, initially invisible. Keep your eyes and ears peeled!
The metal detector serves as your trusty companion. A visual representation of the detector moves with your character, and it changes color, size, or plays a sound effect when you approach a hidden treasure. This is your hot zone cue! Get closer, and the treasure becomes visible on the map, ready for collection. Your success adds it to your inventory display.
The communication flow is straightforward. Arduino continuously sends joystick movements to P5.js. When you press the metal detector button, Arduino sends a signal indicating activation. The character on P5.js will move according to the received movement data. P5.js sends 2 types of data: The gamestate and signal indicating of the treasure is close. The gamestate will be displayed on the LCD on the controller, while LEDs on the controller will blink if it receives treasure signal.
Furthermore, sound effects will be added for immersive exploration and treasure discoveries. Also, will introduce a timer for a thrilling race against the clock. Consider different treasure types with varying rarities for a more dynamic hunt.
This single-player treasure hunt offers a compelling experience. You can tailor the world, difficulty, and treasure types to your preferences. With the core gameplay established, the possibilities are endless! So grab your controller, unleash your explorer spirit, and embark on a thrilling hunt for hidden treasures!
Controller Picture Demo: