Game Development Reference
In-Depth Information
someone on the other side of a pillar, the sound will diffract around the pillar. One
interesting result of sound obstruction is that the split waves may arrive at slightly
different times. So if the waves travel toward the pillar and split, the ones on the
left split may arrive a little earlier than those on the right split. This means that
someone standing on the other side of the pillar may experience interaural time
difference, because she will hear the sound in each ear at slightly different times.
One way to detect both occlusion and obstruction is to construct a series of vectors
from the emitter to an arc around the listener. If none of the vectors can get to the
listener without passing through another object first, it's occlusion. If some of the
vectors get through, then it's obstruction. Finally, if all of the vectors get through,
it is neither. This approach is known as Fresnel acoustic diffraction and is illus-
trated in Figure 6.7(c) .
Implementing this requires being able to determine whether or not a vector inter-
sects withanyobject intheworld,whichwehavenotcovered yet.However,many
types of such intersections are covered in Chapter 7 . Specifically, we can use ray
casts to determine whether the path from emitter to listener is blocked.
Summary
Sound is an important part of any game. Typically, we want to have some sort of
sound cue system that allows the use of metadata that describes how and when
different sound files will be played. DSP effects such as reverb can be applied to
sound files on playback. For 3D sounds, we care about the position of the listen-
er in the world as well as the sound emitters. Finally, some games may have to
implement the Doppler effect for fast-moving objects or sound occlusion/obstruc-
tion, depending on the environment.
Review Questions
1 . Describe the difference between source sound data and the metadata asso-
ciated with it.
2 . What advantage do “switchable” sound cues provide over regular sound
cues?
3 . What are listeners and sound emitters?
4 . When deciding on the position of the listener in a third-person action
game, what problems must be taken into consideration?
5 . What type of scale is the decibel scale?
Search WWH ::




Custom Search