Well, after 8 years in development Off Limits is finally released! Cue party banners, fireworks, finger foods etc. Off-Limits is a total conversion modification for Half Life 2 that I did the audio for. It’s basically an entirely new game made out of the engine used to make Half Life 2. I’ve spent a number of years on and off adding audio to this mod and am really proud of the guys for getting it out.
Off-Limits is a multi-player game where two teams have to capture spawn points across the map to dominate the other team. Whilst doing this each team has a Juggernaut. The Juggernaut is a large character that struts around with a beast of a weapon, a large chaingun/minigun.
In celebration of the beasts release I thought I’d do a blog post on how I made the minigun whir, sing and sound like it could tear through a 6ft wide steel plate.
When approaching this sound I made a checklist in my head of how I wanted it to sound. I looked at images of the minigun itself (it appears to be a very clean, modern looking minigun) and did some research, looking into other games and movies and seeing how they’ve approached designing the sound. I also looked up various videos on YouTube on how it sounded in real life, but I wanted to steer clear of creating a wholly realistic sound. I needed the minigun to sound like a feared, powerful weapon. I came to the conclusion that the minigun audio should be separated into 3 parts; the motor sound (for the spinning of the minigun), the latching mechanism when the minigun spins up/spins down, and the firing itself.
I decided that the miniguns motor and latch audio should sound very clean, almost like a surgical instrument that is whirring up and about to perform a task that requires precision. Then I wanted to firing audio to be the complete opposite, a sound that appears as though it could tear through anything.
The first part of the sound I started to design for the minigun was the latch audio. The latch is a small mechanism inside the gun that clips onto the barrels to stop them from spinning when the motor is switched off, you can also hear the latches at work when the motor starts up. This was a fairly simple sound to achieve, I had a recording I had previously made out in the field of a metal latch on a door being played with. When pitched up and with a lot of the low end removed it sounded pretty nice, but it was lacking a certain metallic tonality to it. To achieve the extra tonal structure I “clanked” two milk bottles together, then after some adjustments to the pitch and EQ it sounded great. Once this was done I then sped up both files and it sounded like the small latch mechanism I was after!
Next up was the motor sound, this sound was the one I wanted to sound most like a surgical tool. I managed to achieve this by recording the motor from a treadmill, pitching it up and then blending it with a pitched up car motor to provide me with the extra colour and frequencies that the treadmill motor was lacking.
Lastly was the big boy himself, the sound of the weapon firing. I wanted this to sound like absolute madness compared to the sounds that preceded it. This sound was easily the hardest to create, it took me a number of days working on and off to come up with the final iteration that I was happy with. I ended up with three main sounds for the fire audio, one was the motor humming along in the background which had already been developed.
I thought I would have to layer a large amount of files together to create the sound of the bullet leaving the weapon, but in the end I only had to use one, heavily manipulated sound. This sound was actually an impact sound, the sound of a large sack hitting the ground. To get the characteristic of the minigun I had to do a lot of processing on the sound. To achieve this what I did was -
- EQ out the characteristics of the sack
- Pitch the audio up slightly
- Compress the low frequencies to really bring out the thud
- Compressed the entire sound eliminating whatever dynamic range there was to make sure everything was LOUD
- Distorted the top end to give the sound the characteristic of a weapon (if you’ve ever heard a gun fire in real life you’ll know that our ears naturally distort the sound)
- Enhanced the stereo signal, making it sound much bigger
- Compressed the entire sound one last time to really push as much as I could out of it
Once this was done it felt like it was lacking something, an almost metallic property. I wanted some tones that could ring on the high end to just add to the overall experience. To achieve this I recorded myself playing with some keys, pitched the sound up and EQ’ed out anything below 1000khz. I then compressed the sound to get rid of any dynamic range that would otherwise be lost in the mix.
After adding some adjustments to the mix I was happy with the sound. I ended up with four files, the start up sound, the engine sound, the firing sound and the wind down/finish sound.
Off Limits is built on the Source Engine made by Valve (there is a nice article over at wikipedia that details the Source Engines capabilities and shortfalls - http://en.wikipedia.org/wiki/Source_(game_engine)). It is not like implementing for other games where you have a fancy design toolkit such as FMOD and Wwise (both of which I thoroughly enjoy using as they make implementation so much easier!). To implement audio in Source you have to script the audio into the game yourself, for beginners into the implementation world, this can be a tricky task.
It essentially works the same way as other audio design toolkits where you create an event, and within the event it contains the relevant information and files. So for instance if I wanted to make a dog bark, I would create an event such as “dog.barking.1″ and then within that string I would add where the relevant audio files are and what additions need to be made (such as looping, playing at random, pitching up/down, volume etc). This then allows you complete control over what audio you want to play for certain events and the coders only have to worry about typing the event string (and not all the stuff we’ve entered). It makes their life easier, and gives us far more control over the way the game sounds.
It’s at this point I need to point out that whilst Source engine supports looping, you have to add the loop points yourself which is a simple, yet unnecessary task (one of the downfalls of the Source engine). I needed two files to have these loop points in, they were the engine audio (for when the player runs out of ammunition) and the firing loop itself. To add the loop points you either need to get a copy of Sony Soundforge or GoldWave (both these programs also have free trials). The loop points were easy enough to add to these sounds as I wanted it looping from start to finish. I use Sony Soundforge as my wave editor anyway, so already had a copy. To add a loop point all you need to do is click on Insert – Marker, drag the marker to the start of the sound file. Then repeat but drag the marker to the end of the file, Save your wav and you’re done!
Now you might be asking, what program do I need to script the audio into the game and how do I go about doing it? Well all you need is notepad, and hopefully some good documentation from the engines coders! For Source it’s fairly simple to do, for implementing the minigun, the following lines of script were used (the numbers correspond to the image on the right)
- The title of the sound, this is reference for you only, when anything within these files has two dashes (//) in front of it, the engine ignores those lines.
- This is the event. If the coder wants to attach this sound to the weapon, this is the line of script he will use.
- This is the channel that the audio will be played on, think of the game as a large mixing desk, with each sound playing on a specific channel. Custom channels can be added, but there is a limitation. Having channels also means greater control over the audio, and allows the engine to process the audio more efficiently.
- Volume, this speaks for itself. In Source if volume is set to “0″ then it’s silent, if it’s set to “1″ then it’s the original sound files volume. Anything in between (such as “0.6″) is an adjustment.
- Sound Level Attenuation, the best way to describe this is to say that this is how the engine decides how fierce the sound is. For instance on this example it’s set to 185db which is incredibly loud (this was not used in the final game, it is just an example). This allows the engine to work out how far in the map the sound should travel, and how it should sit on the overall mix (if you stood next to a character who had a weapon with an attenuation of 185db, then a lot of audio underneath 185db would get drowned out).
- Pitch adjustments, which is fairly self explanatory (Source allows editing between 0-255, whereby 100 is the sounds original pitch. If I wanted to pitch the audio down, I would enter a number below 100).
- This line tells the engine where it can find the sound file it needs to play. You may notice that after the inverted commas there is a bracket “(“. This bracket tells the engine that the sound file is a stereo sound file, but also that the engine can choose to pan the audio if the player is hearing it to the left/right of themselves. If this bracket is not entered, then the player would hear the sound playing normally, even if it was initiated to the far left/right of where they were standing.
And there you have it! We now have our sound locked, loaded and ready to be played!
Concluding this post, once the sound had loaded into the game and I was able to test it. I found that the latch audio was not working well at all with the weapon. The weapons engine slowdown animations speed depended on how long the weapon had been fired up for (so if the player was firing for 5+ seconds then the slowdown animation would take 4 seconds, whereas if the player was firing the gun at a shorter time, then the slowdown animation would be far shorter). Unfortunately there wasn’t an easy way to rectify this, due to time restraints and the fact that the project only had one coder I was unable to get the request of a more non-linear way of implementing the audio for this particular weapon (such as 3 audio events for the slowdown, one for each slowdown speed etc). I had to sacrifice the latch audio which I enjoyed making, but creating work you like then having to get rid of it is very common in this industry and something I’m used to.
If you made it this far in the post then I’m sure you’ll want to hear how it sounds! Well click play below..