Designing audio for video games, part 1
I find the value of audio in video games immensely important, on par with graphic representation. It enables you to pull the player into the world you designed and help him immerse in the way you imagined it to exist.
I believe implementing sound is usually left as the last thing to do (when you work alone) unless you are making a music-based game, but when my inexperience with implementing audio into a video game is taken into account, there’s no moment too early for this. Fortunately, i know a thing or two about sound since i’ve been spinning records, releasing vinyls, CD’s and digital releases and designing sound for almost two decades in my spare time.
I don’t have time for some in depth research of various arcade cabinets, consoles and home computers’ technical specifications, but back in the day when i owned Amiga 500 i only had 4 audio channels (i remember making music in Octamed with 4 channels, it was quite a challenge). In shooter type video game practice, you have one channel for music, one channel for player bullets, one channel for enemy bullets and one channel for explosions, each with one voice, which means, if the explosion channel needs to play another explosion, it will either stop the current explosion sound playing and play the new explosion sound, or it won’t play it at all.
Needless to say, (as far as i know) live audio processing was not available until more modern engines and computers that could process it all appeared. Game would simply play the sound in a predefined manner – and that’s it.
The things i can do with Unity nowadays are incredible. I can have zounds of channels and voices as well as live audio effects and audio source positioning, but i don’t really need that much in a 2D game of this type. With all that power, (i can’t point out this enough) we must be careful not to overuse the possibilites given to us.
I decided to go with the relatively simple approach. Audio mixer compoment has a master bus with sub-bus for music and sub-bus for sound effects. Sound effects bus also has a few more categorized sub-buses (enemy shots, player shots, pickup sounds, explosions and so on). This enables me to fine tune the control of each and every sound via integrated tools since once you import the sound into Unity, you’re done fiddling with it except applying effects (unless you use some of the assets which enable you to do so, which i don’t. This one looks particularly cool, but i’m unable to afford it at the moment).
But an asset i am using is for managing my sounds and music in an organized manner with some added perks. It’s called Master Audio (one of the most popular audio assets on the Asset Store), a fine tool that enables you to do some great stuff which would take a lot of time to code. I highly recommend it since it really saves a lot of time.
It allows you to set (code-free) number of voices per sound, which is very important as you need to strike a fine balance between a sound being cut by another sound played or (more prominent today) a complete cacophony of sounds clashing together. Another useful perk is making of sound variations which i use profusely in the game, mostly by changing pitch and volume of most of the sounds lower or higher by a very small amount, so no sound played is exactly the same. They don’t differ that much, you can easily hear a bullet is fired from the same gun, but you won’t get ear fatigue from listening the same pitched sound of the same volume over and over.
Modern technology enabled us to add more and use more of everything – almost unlimited number of channels and effects, but my experience and experiences of many other, more advanced audio producers and musicians say that less is more. It’s about the same as in game development: cut, cut, cut again.
We’ll talk more about that in part 2.