top of page
  • Writer's pictureJahnavi Shah

Final Project: Creating an Interactive Game

Updated: Apr 30

My understanding of gaming dynamics has always been fairly limited so I thought that it would be interesting to develop an interactive game that would be a culmination of my understanding of p5 and arduino, help me step out of my comfort zone and explore interactivity with permuations of the fundamentals of p5. I have created a game using serial communication that has a line of input and output to and from p5 to the arduino.


The goal of the game is simple:


Catch as many eggs as possible in a basket and do it as fast as possible.


A Potentiometer and an Ultrasonic sensor control the two baskets of the game that catch the egg in question. The game would have 5 lives and the speed would increase after every level. After 5 lost lives, the game will proceed to restart. The levels have three simple themes: the underground, earth, and space. Multiple iterations that explore diverse hand movements have been used here in my attempt to create an interaction that is unique. After a particular score is achieved, the game moves on to the next level. In order to maximise the feeling of playing with a controller, I have utilised an LCD screen that shows the score and the time taken to finish the game. Players would ideally get better once they adapt to the hand movement between the sensor and the potentiometer. The time taken to finish the games displayed would stand as a yardstick to measure the agility.


Level 1 speed : 5

Level 2 speed : 7

Level 3 speed : 10


Challenges included seperating the senor and potentiometer data with the split function so as to allow for two different inputs that operate seperately and also having a simultaneous input and output in p5.js code.


Graphics:




(The background graphics have not been made by me)


Process:


Created a very simple game to understand the dynamics between score and lives. The same base code helped develop the final game:



Individually sending data to p5 from the sensor and the potentiometer and receiving data from the LCD.


Creating a housing for the same and testing the input and output seperately:



Individual arduino codes were then combined to house the different interactions:

Arduino code:




p5 process code:



Testing the LCD connection with the basic preloaded ’Hello World’ code With the time showing in seconds. The LCD screen would display the game name and the score and the number of seconds taken to achieve the maximum score.


Final Framework that displays all the 3 components:




Demonstration of the game:









Certain hopes for a project:


- A more seamless transition of data, from one speed to another. The sensor bucket flickered despite my efforts at manipulating sensitivity. I’m sure there is way to receive cleaner data.

48 views0 comments

Recent Posts

See All

Music: Creating a musical instrument

Created a keyboard where every key generates a different sound when the key is pressed: https://editor.p5js.org/jks507/sketches/_LMCbscYI Created a graphic of an old man laughing by adding a repeated

bottom of page