Shama’s Midterm: Guitar Hero

By looking at the time this is posted, you can tell there were a lot of last minute tedious fixes I had to make to make my game work smoothly. I will begin with the details that surprisingly took the longest. After my first draft, I noticed that the space in between my menu buttons (easy,medium, hard etc.) were clickable, and this was the same for the x-axis of my buttons. The issue was that the buttons had a very badly adjusted offset, I fixed this through trial and error (easy but extremely tedious). My next issue came when I realized that my game didn’t end after the songs ended, I had to create an if statement for this (pretty easy fix). After thinking everything was going well, I then noticed that if the window was resized, everything would get thrown off course, so I aligned each elements position to be relative to the next so that it can be responsive to any window size changes.

After going through these tedious changes, I had to start focusing on the actual songs and the creation speed of my arrows. I wanted the songs and the arrows to be in sync almost. While I could’ve calculated this more technically using each song’s bpm, I decided that based off the song’s tempo, I would assign them to the level difficulties. Starting from there the songs and the symbols were not so out of sync, but this wasn’t enough. I took a more tedious route here by adjusting the speed and vertical distance of my arrows to suite each song and level difficulty, if you pay close attention a majority of the arrows will perfectly line up with the song’s beats.

My biggest issues with this project was understanding how to rework my code in a simpler and cleaner way, I kind of took the long messy route because its what I understood best.

I really enjoyed making my own designs and deciding which interaction to use based on what I already know from playing different versions of guitar Hero. I previously experimented with using a sound response for each key pressed on time, but that ended up clashing with the music in the background and sounding awfully annoying, so I decided to go with a box that lights up green when the key is detected to be pressed in the proper range using the splice function. The screen will flash red otherwise.

I also decided to make the game over screen appear if 6 keys were missed in a row, I chose this number after testing it on my friend who said “6 missed keys are fair enough to lose the game, but also challenging enough to want to play again”.

Overall, I learned tremendously a lot from working on this game and by taking the long route, I began to understand what shortcuts I can begin to make instead. In the future, I would like to be able to fluently implement faster code, instead of taking 10 lines to do one thing I’d like to be able to do it in 1.

And finally, here is my Midterm project !!!!! (feel free to resize the window😎 )

Leave a Reply