Introduction
The sound plays, like the lighting, the textures and the brushwork, an important role when it comes to atmosphere. A real life example would be an amusement park. You wouldn't be attracted to any rides if there wouldn't be music, the voice of the moderator or any noises at all. Wind effects are used (in some rotating attractions flying high in the air) as well as screaming voices (horror houses).
In the single player genre the best examples are well made horror games which would be nothing without well composed and timed sound effects.
Scene: You are walking along a long corridor. It's pretty dark in there. The light gets cut by a fan hanging from the ceiling. The blades are cutting the air. *Swoosh swoosh swoosh*. Steam comes out of pipes *Sssshhhhhh*. A lamp is flickering and only emitting some metres of light. In the background you hear moaning and evil laughter. The music plays a dark tune.
You go on into the corridor...
BAM. Suddenly a freaking creature with orange shining eyes jumps into your face and kills you immediately. If only the flashlight would still have had batteries... you think and reload the game.
Of course multiplayer games can do the same trick. Serious Sam rocks when it comes to background music paired with enemy voices. However a lot of Quake 3 Arena players turn off their music so they can hear their enemies running around and collecting items or weapons. Jumppads, Teleporters and opening doors are neat, too, because they are loud and reveal the position of the fiend. BUT what if the door is out of wood? It wouldn't do a good impression if you suddenly hear a mechanical sound.
This is where these tutorials come into play. We're going to add atmospheric sound effects and music to a map. I split the whole thing up into several parts, so you don't get lost somewhere.
You will need this pk3 file in order to follow the tutorials (don't forget to add the name of the shader file in your shaderlist):
- speakertut.pk3 (10.6 mb)
Note: You will find two versions in the maps folder. I wrote that tutorial mainly for a two button system, which only works in Defrag since there is an entity (target_fragsFilter) the basic Quake 3 Arena doesn't have. Though, the whole system also works with one button for Quake 3 Arena and is even simpler. Until the button/door part everything's the same for both games. I will colorise the text which is for Quake 3 only. I had to call the bsp file for q3a different than the map files, so the engine recognizes the map.
Info: These are consecutive tutorials. So, if you skip one part, don't wonder if you see entities you haven't added.
If you get errors when you are trying to load your sound files then check the latest error page:
Common errors and warnings
There should be every sound errors you can get.
These are my compile parameters for q3map2: -meta -skyfix -vis -light -bounce 4 -compensate 3 -fast -gamma 1.5 -samples 3
- Thanks to sst13 for the button/door trick and his windfly.wav
- Music made by Gustavo Crochenci from the album "In the Jungle" and was taken from jamendo.com (I just looped it); http://www.jamendo.com/de/album/39345
- Models are from the multiplant pack by Todd Gantzler (http://www.wemakemaps.com/mapmodels4.htm)
- Textures are from cgtextures.com (I was too lazy to tile it)
- Sound effects are from: http://www.freesound.org/, http://www.freesounds.net/, http://www.findsounds.com/
Important:
Music files MUST be in a stereo, 22050 hz (22 khz), 16 bit wav format.
target_speaker sounds NEED to be mono, 22050 hz (22 khz), 16 bit wav files.