3D Audio

For the module titled 'Audio Programming' a game was created in Visual Studio 2010 with c++ using XAudio2 and X3DAudio. The game contains no visuals, relying on sound alone to play.

The player finds themselves locked in an underground cell in a castle’s dungeon. The lamps burned out a couple of hours ago and the other two prisoners are fast asleep, snoring in their cells. The dungeon is damp, dark and crawling with rats. The smell of sewage hangs in the air as the dungeon is connected to the castle’s sewage system. After countless days of trying to pick the lock on the cell door help comes from an unlikely source. An undercover guard unlocks the player’s cell and guides them out of the dungeon through the sewage system where their horse is waiting for them. With virtually no light to see, the player has to follow and listen to the voice of the undercover guard if they wish to escape from the dungeon.

The user only has control over the player. They can move the player through the dungeon and ask the guard where he went. The dungeon is laid out in a 2D grid as a system of narrow passageways. This limits the player’s movement to four directions: north, east, south and west.

The visuals in this video are purely for demonstration purposes. Wear headphones to distinguish the 3D audio better. Listen as the audio dynamically adapts as the player moves and rotates n the dungeon.

Due to the layout of the dungeon the 3D audio has an added degree of complexity. Since sounds cannot travel through the walls in the dungeon they need to travel along passageways and turn corners otherwise the player would not be able to locate themselves and objects properly within their environment. Suppose a sound is coming from a passageway ahead of the player, the player needs to hear that sound as if it was directly in front of them until they reach the passage way the sound is coming from. To achieve this, A* pathfinding is executed between the player and the sound so that the sound is able to travel along the passageways. The volume of a sound is noticeably reduced for every conrner it turns in the dungeon. This helps to make it obvious to the player when they are in line with a passageway that a sound is coming from.

Audio References

All Sounds. 2014. Rat Squeaks. [audio file]. Available from: https://www.youtube.com/watch?v=uyuvEawMHUc [Accessed 13 May 2015].

copyrighy free sound-effect. 2014. metal door open sound. [audio file]. Available from: https://www.youtube.com/watch?v=_r7cJiciN40 [Accessed 10 May 2015].

Dodds, A. 2015. player footsteps. [Sound recording].

Dodds, A. 2015. player water footsteps. [Sound recording].

Fowlfx. [no date]. Jail Door Keys Movement. [audio file]. Available from: http://www.freesfx.co.uk/ [Accessed 10 May 2015].

Foxen10. 2012. horse_whinny. [audio file]. Available from: http://www.freesound.org/people/foxen10/sounds/149024/ [Accessed 10 May 2015].

Iampagan. 2013 water_droplets. [audio file]. Available from: http://www.freesound.org/people/iampagan/sounds/177031/ [Accessed 26 March 2015].

Leask, C. 2015. Guard Speech. [Sound recording].

Thanks Andrew for your audio!