Sound Design

Sound design for Denizen has been something I’ve thought about since the beginning of development. I have written a few songs which I feel represent the kind of style I want, but I currently have no music or sound effects in the game whatsoever.


Music

During week seven we were joined by various musicians for a day long workshop about music in games. I had the opportunity to discuss my thoughts about the music for Denizen with Alex Ayling from University of Chichester. My plan was to use an acoustic guitar for the entire soundtrack with no other instruments at all. Each level would have a continuous drone which looped throughout the level, I would then layer other shorter riffs over that. Alex liked my ideas, but suggested that I create more ambient style music. For the listener this creates a kind of audible silence, he said, although the player is hearing lots of sound, they essentially perceive it as texture. He recommended that I research a piece of software by Paul Nasca called Paul’s Extreme Sound Stretch, A.K.A. Paulstretch. It does exactly what is says, it takes any piece of audio and stretches it without pitch changes and other undesirable outcomes you would usually get from stretching audio. Essentially, you can use this piece of software to easily create ambient textured sounds with only a small piece of audio.

To create my ambient music, I began with a short riff on guitar. During the first level, the player has found their companion and is learning the game’s controls, so I wanted the music to be quite relaxing and not too distracting.

Once I had this short piece, I then stretched it:

As you can hear, the short riff I wrote on guitar has now been transformed into a 15 minute long ambient soundscape. I also added a higher octave to make it sound brighter.

At the start of the second level, the player loses their companion and so the music obviously has to reflect this dramatic change. I want the player to feel a sense of foreboding and loss, so I wrote a second short riff on guitar with these themes in mind:

And then stretched it again:

Unlike the first track, I’ve added two lower octaves to create a deeper and richer sound. I want the second level to feel raw compared with the first and so I’ve also added some more noise to the track as well.

With both ambient tracks created, I then needed to add them into the game. Thankfully, my work on SOUNDeSCAPE last year has put me in a good position when it comes to adding audio in Unity. It was simply a case of creating a music manager script which faded in and out the different tracks based on what level was loaded.


Sound Effects

Throughout the game, the player will encounter matches which light up the environment. My plan is to add a flame effect to these matches and so they also need an appropriate sound effect. I was hoping to be able to do the foley work myself, but I’ve almost certainly run out of time at this point in development.

After some searching, I found a nice fire loop by PhreaKsAccount on freesound.org

I was looking for a sound effect without too much crackle and of a long enough length so that the player wouldn’t perceive the looping. Once I had found this sound effect, I then added it to each of my match objects in the Unity scene, that’s when I encountered a problem. I made the sound 3D, which means that the further away the player is from the object, the less of the sound they will hear, and vice versa. The problem I discovered, is that each match would play the fire effect from the beginning of the loop. So, I had about ten matches in each level all playing the exact same sound at the same time. This caused a phasing problem where you could hear a slight delay between the sounds. This happens because the player is further away from one match than they are from the other, this causes the weird phaser and delay effect to the sound. To fix this problem, I ceated a simple script which picks a random point in the audio clip to play from, this means that the match objects will never play at the exact same time.

The matches aren’t the only environmental sound the player will encounter. My plan is to add rain to the second level and heavier rain to the first level after the game loops. I have yet to make the particle effects, but I need to think about what effect this rain will have on the overall sound for the game.

Like my fire sound effect, I found a really nice rain loop by Ayton on freesound.org.

I was looking a longer loop than my fire effect, but I think 16 minutes is perhaps a bit too long. The size of the file when I imported it into Unity was around 60mb, which is way too much. I recompressed the file and managed to get it down to around 17mb without any noticeable degradation in quality. The rain effect will be level wide, which means the volume of the sound should be consistent throughout the game, except when the player enters a building and there’s no rain. This is where Audio Mixer Snapshots are useful. I used these throughout SOUNDeSCAPE’s development and so I have a lot of experience with using them. Snapshots essentially save the state of an AudioMixer component which you can then recall whenever you like. So, you can change the volume of the rain effect when the player enters a trigger, and change it back when they leave. I created a simple script and some new triggers which lower the sound of the rain when the player is inside of the trigger volume.

Here’s an example of this in Unity:

Snapshot Example

It was quite tricky to get the right mix between the fire and rain effects, but thankfully, Unity allows users to edit audio mixers while the game is running. This is a fantastic way to work with audio and it allowed me to find a nice balance quite easily. I also used snapshots to increase the volume of the rain when it’s coming down heavier after the game loops.

I’ll be adding more music and sound effects to the game, but with the predominant sounds now added, I want to create the fire and rain particle effects that these sounds will accompany.

Particle Effects

Advertisements