Hello again, today I will talk about music and an often overlooked way of working with music. Most understand that the music can change with the game(if the player moves from cover to a dangerous situation the music can change to describe that change) but music can also interact with the game, giving us another element to work with.
so how can we use music to affect our game?
Let’s start with the most obvious option, in a rhythmic based game(dance dance revolution or the crypt of the necromancer). In these games the use is quite obvious but givers us a good start. If a game’s main mechanics are based around the music or the rhythm of the music it is of great use to know the tempo or bpm(beats per minute) in the song, and by having this in mind when we program our game we can build functions that tell us the bpm or even indicates when a beat is played. With this information we can see if the player is hitting the keys at the right time or if it’s time to send the next note etc.
But we can also use the music as a reference to other functions, for example to tell them if it’s time for them to execute or not. In the game The Witcher 3 the music is used to indicate when an enemy can use certain abilities so that the “hit” of the ability land som the beat of the song.
In programs like Wwise you can get a beat confirmation from Wwise to your game removing the need to program it from scratch. If you don’t want to use Wwise you can use the bpm of your song to create a beat counter and with this get a beat timer or whatever else you need.
so how do we use the information we now have?
In our game we use the beat confirmation for multiple things,for example in our battle mechanics. Our battle mechanics is based on the hand game rock paper scissors where the attack should be timed with the song, the player chooses one of the three hand shapes and attacks with that shape on the beat. if the player missed the beat the attack fails or does low damage.
The enemies and even the world can be affected by the music, at the moment they are affected by the bpm only but in the future i would like to add a variable for mood(type of music) etc.
At the moment the only visual feedback of the rhythm is that the player character dances to the beat(the sprite flips horizontally at the beat), more feedback will be added.
60 BPM
120 BPM
Sincerely Ludvig H.
0 comments