Audio

It’s interesting to me that sounds people have complained about in some of the recent videos are samples that I intended to change. The pounding of metal on metal at the blacksmith is too loud, the river sounds like a trickling spring, and something about the people hoeing the crop fields sound incorrect. It’s nice to know that what I feel needs fixing is what people are picking up on as not quite right.

So I’ve been spending a little time polishing the audio and balancing some of the levels. If I don’t get it quite right, the game options do allow you to balance the volumes of user interface sounds, effects, ambient, and music as you like.

I’m not a really an audio person. I’ve implemented music streamers, computed 3D attenution and panning for surround audio, and used sound libraries to get audio to play on consoles, but I don’t know much on theory of sound, good practices, or what makes a game sound good or not. But as I’m making a game myself, and don’t want a silent game, I’ve been having to learn more.

I use some free samples for the game, but a whole bunch of the audio I do in my basement. It’s fairly quiet, and having a lot of hand tools, I can make all sorts of noises. I’ll pound on a metal plate with a hammer, or run a hoe through a large pot of dirt.

Sometimes though, I have to record outside. This is fine, except for picking up distant background noise. Where the river runs through my town there’s just too much road noise, even from a half mile distant. So I took my bike several miles down an old railroad bed along a river that’s got high canyon walls on both sides. I recorded about 10 minutes of riffles from several locations, and farther on I found an open field with great crickets and general bug sounds. These samples got chopped up, edited, volume balanced, and they replaced what I previously had. The water in the game sounds much more river like now.



I also found a pretty good sample of a crowd talking from a distance. The game now plays it as a background ambient in places with a lot of houses. This does a bit to liven up the established parts of town, instead of just hearing birds, crickets, the river, and whatever work people are doing.

The audio system in Banished is pretty simple overall – it just plays mono or stereo samples with some left/right pan and volume adjustments. There’s simple sounds attached to actions – someone chopping down a tree, or working in the soil. Events that occur during animations start these sounds and they are simply attenuated based on the camera position.

Ambient sounds work in a similar manner, but the attenuation works differently. If the audio system finds 10 river audio emitters in view, it will pick the loudest one and play a single looping effect. There’s also a fancier environmental ambient emitter that chooses which sounds to play based on the environment. If the area of the emitter contains mostly trees, it will chose to play an ambient of a forest – mostly birds and wind in the trees. If it the area is mostly open, an ambient of a field with crickets plays. If it’s mostly full of water, it will play the sound of frogs and the occasional water droplet. The environmental emitter also takes the season into account. When winter comes, the birds, crickets, and frogs fade away, and are replaced by the noise of wind and the noise of bare trees branches hitting each other.

There’s also an ambient emitter of just wind far above the landscape. When the camera zooms above the town, the attenuation of all the normal sounds becomes very low, and is drowned out and eventually replaced by just the sound of wind moving quickly.

One day (but not soon, as I’m really avoiding any new features or additions now), I’d like to do some research and try some filters on the audio. I’ve got ideas for things that might be neat. The audio during a snow storm could be muted and muffled, highlighting the sound of the wind. On a cold day sounds should be crisp and travel a long way. A humid summer should muddle the audio a bit. When the camera is far away from a sound, the samples should be have high end frequencies removed and leave the din of lower frequency sounds.

Funny thing about making this game, I can always think of ways to improve it…