Originally I had decided on a music visualizer for my final project. However, because of my interest in game design, I wanted to continue to expand on the previous game project. Per instructor approval, I changed my final project to adding music and graphics to my Holiday Catch Game.
For this version of the game, I added holiday music that would start over when the player restarted the game. I added a fun themed holiday background. I changed the color of the falling holiday ornament to match the color palette of the background. I slowed the speed of the falling object just a little to give the player more time to catch the falling ornaments. The game functions, keeps score, and when the game is over, the player has the option to hit the "s" key to restart the game. The music also restarts.
Feel free to customize the game. You can copy and paste the code, upload your own music file to the sketch folder and replace line 16 with your audio file's title:
backgroundMusic = minim.loadFile("Nutcracker_8bit_30");
You can change the background by replacing line 34 with a different 600 x 600 image in the sketch folder:
img = loadImage("600_600_pink_xmas_tree_background_40.jpg");
Enjoy and Happy Holidays!
Music credits:
A-List Music "Nutcracker March 8bit", licensed through Shutterstock
Robert Crandall, "O Come All Ye Faithful Surf", licensed through Shutterstock
I was having difficulty with the music looping. I added:
backgroundMusic.loop();
This solved the problem.