To make the game more complete, I asked one of my friends, a music graduate, if they would collaborate with me on my game to create various sound effects and music. In return they can showcase their work together with mine in the form of a game.
During the asset concept/planning phase I came up with a preliminary list of sounds that I thought we would need, written with fairly basic descriptions such as ‘staff attack’ or ‘walking/running’. We then talked about the sounds we would need more specifically, using YouTube videos as an aid to help describe the kind of sound that I was thinking about and writing better descriptions.
Throughout development we have met to discuss progress, improve/alter sounds and implementation.
Stalactites being hit – As there are two sizes of stalactites (big and small), Natalie made a couple of variations for each of them.
Player attack – The player attack originally had quite a sharp sound to the thrust as I had initially described it as a fast swipe. I showed the sound in context to Natalie and she adjusted it to fit the weapon and animation better.
Enemy hit – When hit by the correct attack, play a loud strong sounding smack. When hit by the incorrect colour, play a quiter, dull hit to indicate the wrong colour is being used.
Player Hit – Sound played to indicate the player has been hit.
Main Theme music – The main music that plays from the start of the level up to the altar area
Altar activation and music – Sound for both activating the altar itself as well as music for entering the surrounding area.
Footsteps – Multiple footstep types for different surfaces as in the original concepts there were different areas that would create different sounds when walking on them, each with a slight variation to them.
Jump – Sound played when the player jumps
Ambient cave sounds – Ambience water drips and cave sounds.
Originally Natalie created multiple variants of one sound so that there is more variance when playing, but due to lack of time only single sound effects were implemented. I did start it, however, creating an array of clips which would be randomly picked when doing specific actions.
For the music I used an audio source that automatically plays the main theme on awake, however, for the altar music I set up a trigger box that stops the main theme and starts the altar theme once the player model moves into it.
One Issue I had with audio is that I had it set up for sound to play as an enemy died, but an instance after the sound is played, the enemy is destroyed. This meant that the audio source on the enemy was also destroyed, resulting in no death sound. As I used the destroy() coroutine to remove the stalactites they also had the same issue.
To rectify this I used AudioSource.PlayerClipAtPoint(clip, transform.position), this places the audio source where the object was in the world space and then removes it, allowing the audio source to play out without being interrupted.