Assignment Explanation - Lunarnorthstar/Programming_AudioAssignment GitHub Wiki

What Our Assignment Does

Our assignment uses data from music to spawn dynamically changing obstacles. As the player you can move around the screen freely, push the obstacles, and shoot them. Shooting the obstacles increases the players score and brings a sense of satisfaction. Our assignment works with almost any music, but we chose to use "Cloak and Revolver" by Steel Plus.

What The Controls Are

  • Use the arrow keys move the player
  • Press space to shoot
  • Press P to pause and un-pause the music (which can be used to stop the obstacles from spawning.)

How It Works

The obstacles spawn rate changes based on the music. The louder the music, the more obstacles will spawn! The obstacles change their size size independently, based on the music during their lifetime. Their colour also shifts dynamically based on their size, which means the obstacles' colours are different from each other based on when they spawned. The obstacles' Y positions are also randomized, although limited to the screen height.

The player's shooting ability is on a cooldown, indicated by whether or not the player is filled in. If the player is solid white, they can shoot. If they are just an outline, they need more time to reload! The bullets the player shoots change colour based on the music when they were first shot, and are used to destroy the obstacles. Destroying an obstacle increases the score variable and prints it to the screen. The player also has the ability to personally interact with the obstacles by nudging them aside when they collide. This allows for endless gameplay without the worry of death, but also provides constant interactability.