As usual, I will start with a photo that shows some new/improved aspects of the game.
Things have changed a lot since the last week. Now, the sonar has a mesh effect (Cheers Jacob) and the moth gets to a horizontal position, when the player shoots the sonar. This mesh effect is really important due to fact that, now, the sonar does not reveal everything when shot. Enemies, death traps or other things could be hidden behind the walls, who knows?
However, this blog post will be about my experience of better understanding how unity works with sounds and how to combine them, in order to get to the desired result.
I had some suggestions about the in-game sounds, so, I tried to get the best from the sounds I already had and what I added after reading the suggestions.
Modifying the background was not hard. Get the desired sound effects, open up Audacity, cut, modify the volume and export. Below, is the updated background sound, which is still not final.
(I had to upload this to dropbox for some reason)
I added the owl hooting and the really cold wind. I chose to increase the volume of the wind in order to emphasize that, the moth is a small and alone creature. It’s more of an aesthetic choice, rather than a sounds that just had to be there.
The sonar sound has been modified and now it sounds like a bell. I think it also transmits the fact that the moth is trying, somehow, to get to the end of the path. Having a rather alarming sound for the most used feature of the game, the sonar, makes a great antithesis between the pitch black background and the moth.
A spider sound effect is added. It is actually located near the spider’s spawn point so the sound won’t follow the spider, but will alert the player that something is there, since the sound amplifies as you get closer to it.
And the final addition was the power up effect. Gaining a power up but not having any feedback, is not satisfying. Not at all. So, in order to change that a bit, I’ve added a sound! For now, it is only a “placeholder” sound, so there will be some changes to it, maybe a whole different new sound. Later on, we’ll add a visual representation which will transmit the player that now he’s powered up.
The power up, in our game, is gained by landing on a flower. The power up can extend your stamina, unlock the sonar and it also acts as a checkpoint. In order for me to be able to introduce the sound, I had to write a little bit of code, on top of the current code, telling Unity to give a sound feedback, after the power up is unlocked.
So, now, the flower has an Audio Source on it, and also a command that tells the source to pick up a specific sound from the assets and the sound source from the Audio source itself. This way, I can put a different sound effect for every power up, making the progress through the game more satisfying.