Final Project Proposal

Finalized Concept For my final project, I am building a competitive 2-player game inspired by “Tomb of the Mask,” except physical steadiness determines who wins. Two players will race against each other to navigate a digital maze on the screen. Instead of using a keyboard, each player will hold a custom physical controller that detects tilt.

By tilting their controller forward, backward, left, or right, the players will steer their avatars on the screen. The game will require steady hands and precise movements to avoid crashing into walls while trying to beat the opponent to the finish line.

Arduino Design & Logic The Arduino will  translate physical movements into data.

Inputs: I will use two separate Accelerometers connected to a single Arduino board. One sensor is for Player 1, and the other is for Player 2.

Processing: The Arduino program will constantly read the X, Y, and Z tilt angles from both sensors to understand exactly how each player is holding their controller.

Communication (Sending): It will package these four values (Player 1 X/Y/Z and Player 2 X/Y/Z) and send them continuously to the computer via the USB cable.

P5.js Design & Logic P5.js will act as the “brain” and “display” of the game.

Visuals: The program will draw the maze walls, the start/finish zones, and the two player avatars.

Communication (Receiving): P5.js will continuously listen for the tilt numbers coming from the Arduino.

Game Logic:

    • It takes the tilt numbers and uses them to change the speed and direction of the player dots. (e.g., Tilt left = Move left).

    • It checks for collisions. If a player hits a wall, they stop or bounce back.

    • P5 checks for the winner and notifies the Arduino to reward the winner.

Project Roadmap To complete this project, I will follow these steps:

  1. Wiring: Connect both accelerometers to the Arduino and confirm I can get readings from both at the same time.

  2. Connection: Write the code to successfully send the sensor numbers from Arduino to P5.js.

  3. Gameplay: Create the maze graphics in P5 and program the physics so the dots move smoothly with the sensors.

  4. Building: Construct two simple handheld boxes (or 3D printed shells) to house the sensors so they are easy to hold and tilt.

Leave a Reply