Creating sounds for AngryBots game
Out of numerous freely available demo games crafted using the Unity engine AngryBots stands out as the most exciting one to me. It has one complete level of gameplay with lots of different rooms and quite a few crazy robots that want to kill you or die trying.
My task was to create completely new sounds for the game, including ambient noises, player’s and enemies’ movement sounds, shooting and explosion noises and so on. The task consisted of three parts:
a) replace existing sounds with the new ones,
b) add new additional sounds, including music, to enhance the gameplay even further and,
c) adjust the levels, pitch and other parameters of the sounds so they blend together nicely (similar to mixing a tune).
First task is most time-consuming and requires you to be very organized in your file management. There are 51 sounds to create. And there are few different ways of how you can go about this task.
These are the most popular ones. In my blog I explained this in more detail.
Foley Recordings (sounds recorded in the recording studio)
Location Recordings (recordings done outside the studio)
Sound Libraries (when you don’t have time to do the recordings yourself)
Sound Creation (Audio editing) (manipulating and mixing prerecorded sounds)
Sound Creation (Synthesis)
Outsourced sound creation (contracting someone else to do the work)
Any combination of the above.
For AngryBots game I used foley recordings (in my basement studio at home), location recordings (train station, shower, firework display, car park etc.), audio editing, synthesis and sampling. No sound libraries were used and not a single contractor contributed anything towards this project.
Second task was to be commenced towards the very end of the project when the majority of sounds were loaded into the game.
Third task has been an ongoing during the whole process but finalized only after tasks one and two have been completed.
AUDIO CUE SHEET
When I opened an initial AngryBots project within the Unity game engine the first thing to do was to get rid of the sounds that were not used in the game, which meant they didn’t have to be replaced, but deleted instead. The quick way of doing it is to right-click on the sound and “find references in the scene”. If you can’t find no references it means that this sound was not used. Delete it. After you have deleted it is time to make a list of all the sounds that are used in the game. This list is called Audio Cue Sheet.
This will help you to be very organized and keep track of many different assets (sounds). In this sheet you write down all the information about each sound: the file name, the length, where it is located. To log down the correct location is very important, you will need to place your own sounds in there and it is quite a long task.
THE NARATIVE OF THE GAME
After the Audio Cue Sheet is finished you need to have a look at it and decide which method of sound creating you are going to apply for each sound. I don’t mean to say you have to replicate the way the original sound was made but rather try to improve it if possible. Also, if you have in mind a particular theme for the game, it might guide you in choosing sounds that are more appropriate. Try to play game a few times and then later do it with audio muted. Try to envisage the narrative of the game. What is it all about. How does the story unfolds. Where is the main conflict and what’s the solution?
For example you might decide that the action of the game is taking place in the distant future. You can emphasize this by creating all your sounds using synthesis.
The first sound I created was player shooting sound. This sound is most prominent throughout the game. There is only a few seconds in the game where the character doesn’t have to unleash the shower of bullets from his machine gun. Therefore it had to be a really massive and “macho” sound that would signal the player’s brain to release a big dose of adrenaline into the blood stream and make the player want to go forth and shoot everything that moves. The sort of sound that could brainwash anyone into a killing spree. The sort of sound that would make you feel big and important even if you are an acme-ridden-glass-wearing-teenage-computer-geek in real life.
The sound is made out of three sounds. Kick drum sound, hammer hit hammer sound and white noise modulated by LFO on ES-1synthesizer on Logic Pro.
In the sample editor in Logic Pro I selected a very short slice of kick drum and extended this loop to go on for 8 seconds
Recorded couple of takes of hitting one hammer with another one and edited it the same way as the kick drum. Matched the length of the sample slice with the kick drum sample and extended the loop again to 8 seconds.
The kick drum sound makes the gun sound big, the metallic sound of hammer replicates the sound of the moving parts inside the gun and the white noise makes it sound, well, noisy.
Next important sound was explosion. Every type of enemy robot has its own explosion sound. One for Spiders, one for Flying Buzzers and one for Patrol Mechs. Spiders also detonate themselves so there’s different sound for that too. My explosions for robots usually consist out of four different sounds: balloon popped, bucket hit, glass shattered and some white noise to represent a rush of air. You can add more sounds to make the explosions more complex and more realistic. Try to imagine what sounds would be heard during the real explosion and write your ideas down. Here is a rough guide that helped me to design the explosion sounds. You don’t need to follow it to the letter (I didn’t) but it helps to formulate some ideas:
Stages of a car exploding:
This is the initial release of energy. The relevant sounds will include the initial impulse and the beginning of the shockwave sound.
This is the first stage of reactive sounds. Objects and materials inside the car begin to move from the force of the shockwave. Metal and plastic bend and break, material rips and objects collide.
At this stage the shockwave and objets will move beyond the car. Glass will shatter outwards, the body of the car will be torn apart and objects will be pushed away from the car as the shockwave continues to expand.
The final stage is where the shockwave will fade out as it looses energy; objects and pieces of the car will fall to earth having lost the energy of the shockwave. Everything should return to state of rest (the car may be on fire at this stage but this is a separate event).
I created various explosion sounds for different enemy robots. For the PatrolMech explosion I combined sounds of balloon pop, hammer hit on a bucket, light bulb crashing on the concrete floor and synth sub-bass with modulated pitch.
And this is PatrolMech explosion sound
For the Spider robot I used similar technique but without sub-bass. I pitched the samples up so the explosion sounds smaller, which suited better for the Spider.
Very often I’d take my Tascam DR-40 portable recorder on my journey to college and record various sounds. Noise inside the train before its departure, hum of air conditioners in different college’s rooms.
I had this general resolution that, if I was going to record some foley, it had to be done using only the simplest household items. For example for the rain sound I didn’t actually go outside but recorded the sound of my shower instead.
And this is the sound of my shower ‘rain’:
Or the character’s footsteps on metal were done by hitting the axe head with the pair of pliers.
When those sounds are synced with the visuals the gamers brains won’t be able to perceive that as two different events. The brain will glue them together nicely. So it’s just to prove the point that people are easily deceived. Which is good news because you can achieve good results with a small budget.
For the big Patrol Mech footsteps sound I combined a toy tractor electric motor sound, metal bucket hit, ES-1 and EFM-1 synthesizers. I set both synths to produce a low frequency percussive hit. EFM-1 – more metallic one and ES-1 – with some white noise. Bucket hit and EFM-1 synth were synced and ES-1 synth was delayed slightly to create an illusion of the real foot sound: heel and toes are heard slightly apart.
For Spider’s footsteps I just recorded a few hits of the hammer onto the concrete floor in my basement. The script in the game plays a random sequence of these four audio files.
For the PatrolMech and Spider alert sounds I decided to use Speech Synthesizer in Mac’s System Preferences.
Zarvox voice for the Patrol Mech
and Whisper voice for the Spider
You can record Speech Synthesizer as audio file straight into your DAW (digital audio workstation). I used Logic Pro. But it is quite tricky. You need to route the output of the speech synthesizer into Jack router and output of the Jack router into the Logic Pro. The process of doing this (plus recording a screen cast video) is described very well in here:
You can download Jack router from here: http://jackaudio.org/download
And if you can’t be bothered with the routing, you can just use the microphone and record the sound coming out of speakers. But then it might not be as clean as you’d like it.
For the ambient sounds I mostly used my Tascam DR-40 portable recorder and recorded various sounds around me: inside of the train carriage when it’s moving or standing still, inside of my shower cabin, outside on the street, the hum of an air conditioner unit in the local cafe, fireworks show on the Bonfire Night at a friend’s house and so on. Some sounds I used in the game and others I binned. Carrying the Audio Cue Sheet with me everywhere I went helped me to keep track of what sounds still need to be captured.
This is a ambience sound recorded on a train. I added some reverb using Space Designer plugin in Logic Pro. You can also here a passenger breathing. This added a more sinister feel about it:
And here is the hum of air conditioner outside the toilets of the college I go to.
To create some other ambiences I used synthesis. The mechanical whirring heard in places I combined EFM-1 and ES-1 synthesizers.
For the computer’s ambience I used three synths: ES-2 for the modem style crackling, EFM-1 for the mid frequency whirring and ES-1 for the low frequency hum.
I also use synthesis to create Flying Buzzer attack sound. Flying Buzzer shoots some sort of electrical bolt when attacking the character and I thought it should have a sound similar to a laser shot. For this I used EFM-1 synthesizer. I was messing around with it for a while and had quite a few possible sounds but then eventually settled down for this sound:
You can see EFM-1 settings here:
I also added a short sweep sound with ES-1 synthesizer and a low frequency “kick” with ES-M synthesizer.
SYNCHRONISE SOUNDS TO THE ANIMATION
There were a few doors/airlocks in the game that needed appropriate sounds attached to them. If you watch it closely you would see that the opening of the big round airlock door is the sequence of three visual events: 1) disc turning in the middle of the door, 2) metal rods retracting and 3) door sliding down into the floor.
I really wanted to synchronise sounds to the animation. So I recorded a short screen cast video where I could see the airlock door opening and closing and then I imported the video into Logic Pro session. This allowed me to attach sound to video with higher precision.
The disc turning in the middle of the door was represented by the sound of battery powered drill sound. Flex time mode really helped me to sync the sound and video better.
The metal rods retracting animation was represented by the sound of hammer hit onto the keyboard stand. I then loaded audio into the ESX24 sampler and triggered the sound simultaneously at three different pitches to create a fatter, bigger sound.
And finally the door retracting into the floor animation was represented by the sound of me dragging a plastic bucked across the concrete floor. I added some white noise to for the “escaping air” sound. The closing of the door sound was a combination of the same three sounds (except white noise) but in reverse order.
I repeated the same process with other two doors. Recorded a short video of gameplay and imported it into Logic Pro session.
And for “sliding door close” sound I combined the slamming of my car door with some white noise and some synthetic hum from ES-1.
The locked door opens and doesn’t close again. For the “opening” sound I used a very pitched down sound of battery powered drill plus some hum from ES-2 synth.
Because this is only a demo game, eventually it becomes obvious that there are lots of things that can be improved. But I’m only going to mention a few things that concerns sounds only. I thought the Flying Buzzer could do with some sound that would give us a clue of the machinery that’s keeping it airborne. If that machinery is an anti-gravity type, the sound could be a UFO-like pulsating sine wave. If it’s a hovercraft, the sound might have a mix of mechanical whirring and the rush of air. It all depends on the sound designer’s imagination. I created a sound that resembles a small helicopter.
The other object that needed sound was the lift in the main computer room. I used the same battery powered drill sound but slowed down even more.
Music in the game helps to enhance the gameplay experience by creating a particular psychological mood which affects the player. I tried a few different stiles of music for this AngryBots game and it appeared to me that it doesn’t need very loud and overwhelming music because it will interfere with explosions and other diegetic sounds.
After little bit of experimenting I decided to have a minimalistic ambient music in the areas where there’s not too much action, and more intense music in the areas where the Patrol Mechs are patrolling. I created a Logic Pro session with 13 stereo tracks and recorded a 4 minute music.
Then I bounced the whole session into 6 stereo stems, each of them playing different arrangement of those 13 tracks. I then placed those 6 stems into the 6 places in the Unity engine in such way that they overlap slightly.
So when you go through the game you are hearing different tracks of the same tune. Stems 1; 2 and 6 are more intense musically with the sound of distorted guitars and stems 3; 4 and 5 are less intense.
PUTTING SOUNDS INTO THE GAME
Bellow is a short video of how to put your audio files (assets) into the Unity engine.
If this is still not clear enough I will provide some screenshots of the process.
The audio programmer, when working with the audio file in Unity engine, can select ‘3D sound’ mode or ‘2D sound’ mode. If the the ‘3D Sound’ box is ticked (screenshot bellow) the audio file becomes 3D.
This gives audio programer access to more parameters in the Inspector window. One of them is ‘3D Sound Settings’.
In simple terms 3D means that the sound is diegetic (part of the game world). I am now going to explain what those red lines and green curves in the screenshot above do and how you can control the audio to create one particular effect. For example, I want my audio loop to play at a constant loudness until the Character gets about 30 meters away from it and then the sound fades out at a set rate. The red vertical line shows the distance of the Character (listener) from the sound source (numbers 0 to 40), the red diagonal line represents the loudness of the audio in relationship to the distance from the sound source. The green curve is called Pan but it’s more complex than just that. If the Pan value is set to ‘zero’ then this audio behaves like 2D sound; and if the Pan value is 1 than this audio behaves like 3D sound. When the Pan is at ‘zero’ (2D) the Volume setting does not affect the sound, and when the Pan value moves from zero to one, the Volume setting becomes active. So, when the Character is about 30 meters from the sound source, the Pan curve starts moving up and the Volume line starts affecting the level of sound. As the Character keeps moving away from the sound source, the Pan value keeps rising rapidly, thus affecting the loudness of the audio through the Volume setting.
It is important to ensure that the right end of Volume line is at ‘zero’. If not, then the sound will still be heard even after the Character is more than 40 meters from the source.
This, I think, completes my log about how I put my own sounds into the AngryBots game using Unity game engine. I’ll keep updating this blog if I remember any other relevant information, or you can just ask me a question and I’ll try to answer it in here.