Game sound effects
From FreeGameDevWiki
The use of sound effects in games allows to create atmosphere (eg. scary or happy sounds) or to convey information (directional sounds) and can even become a central topic of a game.[1]
Contents |
Implementation
Sound effects audio files are often decoded to memory before playing.[2][3] This prevents undesired lags between game action and according sound.
Variation
By having slightly variating versions of a sound, repetitive audio (for example foot steps) can be prevented from becoming annoying. The difference between sounds should be slight, otherwise it might suggest to the player that the difference occurred due to a different action and be confusing this way.
A pseudocode implementation of a random sound player:
listOfSounds = ( 0 = loadSoundFile("step1.wav"), 1 = loadSoundFile("step2.wav"), 2 = loadSoundFile("step3.wav") )
function playSound
soundToPlay = random( 0, ( listOfSounds.length() - 1) )
playSound( listOfSounds[soundToPlay] )
end function
Procedural generation
An alternative to recording or manual synthesizing of sounds is the procedural generation of sounds, either real-time or for recording to files.
Phya
Dylan Menzies' physical audio library Phya analyzes a sound recording and creates physically calculated variations of it.
Pure Data
Andy Farnell describes how to hook Pure Data, a graphical programming language for generating audio, into a game for game sound prototyping. Synthesizers are also provided.
sfxr
Dr. Petter's sfxr application generates simple game sounds that can be manipulated by using sliders or by pressing randomization buttons. The results can be saved as WAV files.
Resources
| Site name/link | Sounds | Details | Status | File formats | Licenses |
|---|---|---|---|---|---|
| INDEPENDENT LJUDBANK | 626 | Sounds for films | Archive | mp3 | PD[4] |
| OLPC Sound Samples | 8458 | Mostly instruments | Archive | wav | CC-BY 3.0 |
| OpenGameArt Sound Effects | 207 | Game-ready and raw files | Active | flac, ogg, wav | Various |
| public domain sounds (backup) | 673 | Raw recordings | Active | flac, mp3 | PD |
References
- ↑ Be The Wumpus an audio-only game
- ↑ LÖVE documentation: Sound
- ↑ Pyglet documentation: Playing sound and music
- ↑ Free-for-everything use conditions, see INDEPENDENT LJUDBANK translation
