Categories
Uncategorized

Unable to Beat Myself At My Own Game

My major goal since my last blog post was to add sound effects for the project, ML-Breakout, and I ran into some unexpected issues. I started out by obtaining 3 separate Audio Clips from freesound.org, a great website to find and download audio clips for personal and commercial projects. After I had selected my new sound effects (and given proper credit to the creators via Attribution Text + More in the newly added credits folder), I added them into the game by connecting them to Audio Sources that are attached to GameObjects.

I used these three sound files (.wav files) to give a unique sound effect to each of the three possible collisions, ball and paddle, ball and wall, and ball and brick. I wanted to have a distinct sound for each type of collision so that it provided a more diverse audio experience for the user while also helping identify which surfaces the ball collided with. Next I decided to add sound effects for losing a life, losing the game, and victory (clearing the first level). I quickly realized however, that our game wasn’t even designed to be winnable, as we hadn’t gotten around to programming in a win condition.

Is NewFile new or old?

One of my groupmates had created an alternate version of one of the most important files (GameManager) in an attempt to handle a certain issue differently, and named the file appropriately (newGameManager). However, unfortunately they decided against going with the new version but neglected to remove the new file or clarify which version was current for the project. Since both files were structured differently, I had to add my victory condition and sound effects in separately using different methods, taking double the time that it should have. My group got it straightened out at our next team meeting, but clearer naming conventions or more detailed commit messages could have saved us all a lot of time.

Game Breaking Bug

Unfortunately this was not the end of my problems, as now that I had written a victory condition I actually had to beat the game to verify and record that it worked properly. The game is more challenging than it appears, and a few attempts in I was only a few bricks away from the max score when (like a DVD logo) the ball perfectly hit the top left corner and began to bounce back and forth, perfectly horizontal, until I gave up and restarted the game a few minutes later.

I continued playing only slightly deterred, and began to lose motivation as this bug manifested itself in other ways too, getting stuck horizontal after colliding with the corner of bricks or even getting stuck underneath the paddle. Foolishly I wanted to test and commit this feature before embarking on a journey of bug fixing, but I probably could have saved more time if I started on that immediately.

After many attempts, I finally beat the game and heard the glorious victory music, only for it to be cut short as the Game was set to restart 2 seconds after the last brick was broken, ruining the video demonstration. I shamefully fixed my mistake and eventually I was able to beat the game again and call it a day. While being unable to beat a game that I was actively designing was a little demoralizing, it was an awesome feeling to have the audio effects functioning as intended and see the project begin to come together.

Leave a Reply

Your email address will not be published. Required fields are marked *