A nod to the late great Prof Hawking, you can print this out if you like and put it on your coffee table to pretend you've read it.
So before I launch into any GG specific sound stuff I am going to cover some of the basic stuff, it is difficult to know where to start so I cover all readers so please forgive me if this seems too much like teaching granny to suck eggs.
Firstly humans hear sound using two 'ears', I know this sounds (pun intended) obvious but we must keep in mind that video games are designed for human beings to play. Some creatures 'hear' sound through their feet (elephants and spiders for example), some through their jaw bones (mainly reptiles) and some lucky ones use their entire bodies (Shark anybody?) but I'll stick to the human method.
The interesting thing about the 'two ear' method of hearing is that although it's obvious how having two ears can help you to figure out whether a sound is coming from the 'left' or 'right' anybody reading this who has two functioning ears will attest to the fact that they can also tell (to some extent at least) whether a sound is 'in front' or 'behind' them!
How on earth does this work you may ask? Well it is very clever, the big flappy things on the side of your head are in fact very complex mechanisms that 'shape' sound in such a way that the other highly complex bit between them (your brain for the slower of you) can detect which direction a sound is coming from (a very important trick when half the creatures you share the planet with are trying to eat you!).
The flappy bit does several things, it changes the frequency of the sound, it alters the volume of the sound and it delays the sound. All of these (very subtle) changes are used by the brain to figure out the position that the sound is coming from.
Anyhow, what we are really interested in is how we can 'fake it' such that sounds we play in a video game are realistic enough to fool the brain into thinking that the sounds the player is hearing are actually coming from the visual entities within said game.
In addition, as we probably don't all possess a hugely expensive sound studio in which we can make these sounds, we need to be able to make the most out of sound samples that we can get from online libraries.
There are basically two kinds of sound sample we can use:
Stereo samples - These are produced by placing a couple of microphones in roughly the positions your ears would be and recording the sound from each into a 'left' channel and a 'right' channel. Again this sounds obvious but the point here is that the position of the sounds recorded wrt to the 'ears' is fixed at the time of recording, this means that these samples when played back will only be realistic if the position and orientation of the player *exactly* matches the position and orientation of the microphones at the time of recording wrt to *all* visible (or logically placeable) sound producers.
Mono samples - These are produced (usually) by placing a single microphone pointing straight at the sound producer and recording on a single channel, in cases where the sound producer is moving these samples can either be made by tracking the microphone with the sound producer or by a static microphone, in the latter case the amplitude and frequency of the sound will change in relation to the movement.
So stereo samples are not very useful except in the following cases:
1) Background atmospheric sounds, i.e. sounds so far away that the player cannot relate them to any visible or logically placeable entities in the level.
2) Mood music, except when that music is coming from (or supposed to be at least) a visible or logically placeable .. well you must be getting the idea by now.
3) Situations where the player position is fixed, for example when getting instructions from a quest giver.
What do I mean by 'logically placeable'? Well the best way of answering this is to give an example; let's imagine you have a factory building in your game and as you enter it there is a entity by the door which should be 'noisy', maybe a generator or air compressor, but when inside the building the player can't actually see this entity. The player will know where sound from the entity should be coming from even after they have entered the building and can no longer see it.
Mono samples are far more useful as they can be attached to an object and the 'stereo' effect will be produced by the engine (GG iow) dependent on player position relative to the entity (with a few restrictions that I will cover in the next post).
tbc
Been there, done that, got all the T-Shirts!