top of page
Search

Final Project: Rock On!!

  • Writer: Gabrielle Grenier
    Gabrielle Grenier
  • May 15, 2019
  • 4 min read

THE GAME:

For my final project, I have created a guitar hero based game. The object of the game is to hit the rolling notes when they reach the white outlined circles. Every accurate hit increases you score and hitting the note when its not there will take away points. In order to win the game you must reach 1000 points, and when doing so a "you win" screen pops up.

THE MICRO BIT:

The game as of right now has no micro bit interaction however i am getting very close to making it work. Essentially the micro bit will power the buttons of a rockband guitar controller so that the user can truly get that guitar hero experience. Despite the difficulty of the serial communications i was able to wire the controller to the micro bit and work the buttons. I did this by connecting the jumper wires to the wires already in the controlling, i then assigned each wire to a pin and coded each pin to display a different number on the micro bit in order to make sure all buttons were working and to order the colors correctly. When i got this to work I knew the next step would be to attempt to connect it to the code.

THE SERIAL CODE:

I'm going to be honest in saying that serial is a very difficult thing to figure out and i don't fully understand what i did. That being said, i was able to have a bit of help from professor Hagan and am currently attempting to make adjustments to serial allowing the button presses to work. For the micro bit side of the code, I first moved the serial to the USB and then assigned each pin i used (0,1,2,5,8) to a serial write number. The point of this is to convert these numbers into a value in my code in order to hit the note. I am going to continue with serial and update this post when i get it to work.

THE GAME CODE:

In class we learned how to draw, animate and interact with shapes. I used these three basic skills to create what we see on the screen. The lines and the stationary ellipses were made exactly like you'd think, they are put in the draw function and then i had spaced them out using the grid of my 600x600 screen. I set the size of the ellipses to a variable so all of them on the screen would be the same size. The score is also a variable that can manipulated to increase or decrease depending on the circumstances I create. It is displayed on the screen in a similar way to the lines and ellipses. I also found a way to stop the game and display the words "you win" across the screen but creating a conditional that states if score is greater than 1000, stop ellipses and show this. The main difficulties in the making of this game were the randomized movement of the falling notes and the key presses that allow the stationary ellipses to fill with color and add or take away points. I struggled with finding a way around the keyTyped function. I didn't really know how to manipulate it and using keyPressed limited my keyboard options. In looking through p5 i found the keyIsDown function which allowed me to hold the key i would use but as soon as its let go it would stop the commands its given. I also discovered that each key on the keyboard has a numeric value for javascript allowing me to avoid having to limit my options. I was able to create conditionals that added or subtracted a score and act as a button press to hit the note. Lastly, the falling notes were set to a certain speed which i made a difficult speed so the game would be a bit more interesting. I randomized the falling pattern by allowing the computer to pick the length of time it waits before each note falls. I had difficulty trying to make the notes fall at first, i wanted them to fall in straight lines, after a few tries i figured out(with help of course I'm not a pro at this stuff) to set the y positions to variables and added the speed to them.

USER TESTING:

Unfortunately i didn't have all that much done for user testing to be extremely influential and i only got a couple minutes with the user at the very end of class. That being said, i was able to talk out some of the issues i had just be reading my code and explaining it to someone. I was able to fix my mistakes and I got re motivated to make the game work to its highest potential with my capability. So i think it was helpful but i just wish i had more time with the user and a few more users.

CLASS FEEDBACK:

Our class is very positive in the way we give feedback and the ideas given to me made me wanna work on this project so much more. One idea was fixing the randomization of the notes into maybe a beat/tempo in order to play with a song in the background. I'm blanking a little as to the rest but that idea really stuck with me. I would really like to get serial working and maybe start working on that beat idea as well.

BELOW IS THE GAME BEING PLAYED :

BELOW IS THE TEST MICRO BIT CODE:

CODE FOR GAME:



 
 
 

Recent Posts

See All
Final Jam

So for my final project i wanted to stick to the music theme i had in my midterm project. I wanted to create a game much like the app...

 
 
 

Comments


bottom of page