Final Project Update: Half-Live Fruit Ninja

To be honest, I still don’t have a super clear idea of what I want to do with my project because I keep changing my mind, but currently I have the bare minimum elements working. For my project, I want to create a live version of Fruit Ninja, a classic mobile game that requires finger swiping interactions. For the live version, I will be using 4 different colored buttons, each button corresponding with the color of the fruit that appears on the screen. For example, if a red fruit shows up, the player should press the red button.

So far I have one of the 4 buttons working, just to test, but it doesn’t work the way it’s supposed to. It took me quite a while to figure out how to do the serial communication, but I realized that I need to send to Arduino the same amount of data that I want to receive on p5 (at least that’s what worked). At first I was only sending one thing, because technically I don’t use any information from p5 yet), but when I was receiving Arduino data it wasn’t working.

Physical Components

The physical components for my project are 4 buttons, a distance sensor, and one LED. The LED lights up when the distance is less than 10 cm. One thing I noticed is that the LED does not light up as bright sometimes when using the distance sensor, whereas when I used it to test if the buttons worked it was very bright (the testing was all in one program). So this is something to think about, because I tested both analog and digital write.

Screen/Digital Components

Here is a link to my work in progress p5 code. As I said earlier, I tested just the red button. Good news is that it removes the fruit when it is pressed, but the difficult thing to figure out is 1) how to remove only one fruit when it is pressed and 2) remove the fruit that corresponds with the button color. When I figure out these two issues, the rest of the project is mainly fine tuning.

I am still debating on whether or not I should add the distance sensor or not now. One idea that I came up with is to mark the floor where the player should stand and give then a “sword” to hit the buttons with. That will maybe make the game more challenging and eliminates the distance sensor.

Things I still need to work on:

    • Getting the color of the button to correspond with the color of the fruit.
    • Remove one fruit at a time when pressing a button.
    • Distance sensor to create an invisible barrier (maybe?).
    • Animate the fruit to look like it’s being thrown.
    • Aesthetics (but this is the very last thing to worry about).

 

 

Leave a Reply