In this post we share tips for optimal sound design and performance in your game and app – imperative info for game developers and sound designers!
When implementing audio on devices that has limited memory (such as a mobile device) it’s very important to be smart with how the audio is set up – otherwise audio clutter and poor audio/game performance can happen. Thankfully with a little bit of attention to detail and some planning, many of these audio problems can be side stepped. (Image from John Locke)
Audio Crash Logs for Apps & Games
It always surprises me when I join a project already in development and I see zero log features implemented – neither a crash log or audio-specific log. It happens more than you might expect, especially in the mobile/handheld game scene. This is just silly!
Set up a crash log that archives the game’s activities, which help narrow down the causes of a crash. Likewise having an audio log that runs on the side of the screen while playing the build can show how the audio channels are behaving. A perfect example was on one project where almost all of the audio channels were becoming clogged (due to not offloading the sounds) and then crashing the game. Since we had an audio log it was easy to pinpoint that something in the audio engine was causing the game to crash. Folks that were not running the audio log had no clue and were getting alarmed but all of us in the audio department were able to calm nerves, quickly identify and resolve the issue. For peak app performance (and to save yourself numerous headaches) do yourself a favor and implement an audio and crash log upfront. (Image from MediaFly)
Setup a Buffer for Audio Loads
Set up some backup scripts that will take charge if your audio channels start to get too full. How much is too full? Depends on your device and game but do some testing to see how much audio load starts to negatively impact the game’s performance.
Cycle Sound Calls to Free Audio Channels
For sounds that happen often, combat sounds being a good example, look into ways to limit or kill sound calls that are the oldest once the audio channel buffer gets slim. To elaborate – let’s say 20 laser sounds are called in very close succession to each other. By the time laser call 15 happens the audio channels are getting pretty full. Just kill laser call 1, if it is still sounding.
Odds are the other laser sound calls will cover up cutting off the first call and this will help keep audio channels clear.
Limit the Number of Voices
In some cases just killing off the older sound calls will fix your problem. But let’s say there are many duplicate calls of the same sound – again the laser sound illustration can work well here. Putting a voice limit on each type of sound can really help avoid poor audio playback and channel clutter. I’ve used this method many times on UI sounds – for example a short rollover sound where the user could rollover very quickly and call many instances of that sound. In most cases it doesn’t sound good and it can impact performance.
Put a voice limit in place and avoid both issues. Again this can take some testing because making the voice limit too low can take away some of the impact of hectic situations, but setting the voice limit too high can allow for clutter and problems to persist.
Make Special Sounds for Special Events
I once worked on a game where the player could fire off a “super” weapon, which basically fired EVERY weapon in the inventory at once. Not only did this clutter up the channels almost instantaneously, it sounded really bad.
Multiple instances of the same sound calls create audio phase, which do not sound good. In this case, I would suggest creating a unique sound that emulates the “super” weapon but only uses one audio channel and avoid the phase issue. (Image from GamingBolt.com)
Randomize Audio for Peak Performance
This doesn’t necessarily keep audio channels clear but is closely related – pitch and volume randomization can really help make things sound fresh and organic. This helps the audio engine “recycle” audio assets (like footsteps for example) and helps make each new instance of that sound a bit more unique instead of sheer repetitions. Be careful to use a smaller pitch and volume randomization range – otherwise it can start to sound outright silly.
Another positive to this method is that it can help keep audio footprint low and reduce the cost of having a sound designer create hundreds of unique variations. Let the coding do the work for you!
Prioritize Sounds in Your App
Is that babbling brook sound effect really important or even heard when there are ten tanks firing off at each other? Nope. Just kill that sound when a more important sound event takes place. Then once the combat stops, bring back in that babbling brook sound. Not only does this help keep clutter at bay, it’s realistic to how we hear things in the real world. A win-win!
Mash Things Together
The final approach is embedding audio together when possible. Most often this revolves around placing an ambient sound bed into a music track mix. This way the device is streaming one file but emulating an ambient sound bed as well as a music track. In most cases this helps improve performance, free up clutter and makes more space for event/game driven sound calls.
There are some instances where it doesn’t work as well – if the game’s background changes but the music doesn’t then the embedded ambient sound bed may or may not fit. If the music cues need to change then a pause or gap in the ambient sound bed could become noticeable. But for situations where the music and the background (or setting) of the level doesn’t change during gameplay, this is a quick and easy way to free up audio channels.
Don’t Forget About the Middleman
One response I get from some teams when detailing these solutions is “this is great, but we don’t have the manpower right now to build all of this in the project.” Don’t forget that there are many middleware solutions available on the market that can take care of this for you and often at very reasonable rates! Some of the really big ones are FMOD, Wwise and Miles.
Some only support PC/console projects and some support the mobile/handheld market as well. In some cases, a project might have a proprietary system as well. Do some research and see if one of these audio solutions can fit the bill for your project!
Nathan Madsen is the owner and composer/sound designer for Madsen Studios LLC, a full production audio house that has been supplying audio content for video games, films and other forms of multimedia since 2005.