Game Development Reference
In-Depth Information
the camera's follow distance is 15 meters. What happens when a sound effect gets
played right at the feet of the player character?
Well, if the listener is at the same position as the camera, the sound will seem like
it's 15 meters away. Depending on the type of sound and its falloff range, it might
result in a sound that's barely audible, which is odd because it's something that's
happening right next to the player's character. Now if it's a sound effect that the
player is triggering, we can usually identify these sounds and treat them differ-
ently. However, if it's a sound triggered by an enemy adjacent to the player, we
don't have a simple recourse to the range problem.
One solution that might come to mind is to have the listener position and orienta-
tion set to that of the player character. Though this would solve the issue of sounds
being 15 meters away, it introduces a major problem. Suppose an explosion occurs
between the camera and the player. If the listener position and orientation inherits
that of the player, this explosion will register as “behind” the listener, and there-
fore come out of the rear speakers. Furthermore, if the game allows the camera to
rotate independently of the player, it may be possible to get into a scenario where
a sound emitter that's to the left of the player (and therefore, the listener) is actu-
ally on the right part of the screen. This means that if an explosion occurs on the
right part of the screen, it may actually come out of the left speaker. This seems
incorrect because we expect an explosion on the right side of the screen to always
come out of the right speaker, regardless of how the player is oriented.
In the end, for the melee-focused third-person game Lord of the Rings: Conquest ,
we arrived at a bit of a compromise. First, we based the orientation of the listener
on the orientation of the camera, rather than on that of the player. Next, instead
of placing the position of the listener precisely at the camera or precisely at the
player, we placed it at a location between the two positions. Or in other words, the
position of the listener was the result of an interpolation between the camera and
player position, as in Figure 6.3 . The percentage of the way between the two will
varydependingonthegame,butusuallysomewherebetween33%and66%works
well.
Search WWH ::




Custom Search