menu
Table of Contents
-
Modules
Fortunately, a lot of the sounds generated during gameplay are unimportant to the player's experience. For example, a monster walking 100 meters away might have footsteps playing quietly in the distance, but the player probably won't hear them when there are ten other monsters two meters away hurling magic gems. Meanwhile, those distant footsteps require just as much processing power as the nearby magic sounds. To avoid this type of unnecessary processing, you'll define a volume threshold that sounds must reach before they are rendered through a voice.
-
From the menu bar, click Project > Platform Manager.
The Platform Manager opens, which lets you configure settings for each game platform independently. For example, a Nintendo Switch has less processing power than a PlayStation 5, so you might want to assign different values to those two platforms.
The default setting for Volume Threshold is -80 dB, meaning that only sounds louder than -80 are assigned to a voice. To reduce the processing power required by your design, you can increase the Volume Threshold. However, keep in mind, some of the sounds you want to hear, such as subtle ambience, might be cut off.
Max Voice Instances defines the maximum number of voices that are allowed to play at any one time. You can lower this value to reduce the processing power required by your design. However, similar to increasing Volume Threshold, some of the sounds you want to hear might be cut off, especially in the heat of battle when there’s a lot happening in the game. But don't worry, you’ll learn how to retain the most important sounds later in this exercise.
-
For the platform you're working on, set the Volume Threshold to -50 and Max Voice Instances to 40, and then click OK.
A sound that would normally play but is silent because of either of these settings is referred to as a virtual voice. Virtual voices are monitored by the sound engine and can become audible physical voices if their volume increases or the overall voice count decreases. As conditions change in a game, voices often go back and forth between virtual and physical.
-
From the menu bar, click Layouts > Designer (F5).
-
In the Project Explorer, expand Actor-Mixer Hierarchy > Default Work Unit > Magic, and then select the PoisonGem Magic Actor-Mixer. Then in the Property Editor, select Advanced.
For the poison gem, you'll limit the number of voices to four. You can set the scope so that the limit applies to each game object, meaning that each poison gem would have four voices available, or you can set it globally, meaning that no more than four poison gem sounds could be heard at the same time. In this case, you'll make the scope global because it's unlikely the player would be able to distinguish more than four poison gem sounds at the same time.
-
In the Property Editor, select Limit Sound Instances, set the Sound Instance Limit to 4, and then set the Limitation Scope to Globally.
Now you'll give sounds a priority according to how important they are to the player's experience. This way, when the sound engine must kill voices, it doesn’t silence essential sounds, like player dialogue or music.
-
In the Project Explorer, collapse the Magic Actor-Mixer. Then select the Cube_Main_Theme object and in the Property Editor, select Advanced and set the Priority to 80.
Now it’s very unlikely the music will ever be silenced during gameplay.
The Use Offset Priority check box and setting specify a value by which the priority of an object is offset when it reaches the Max distance value specified in the Attenuation Editor. This is helpful for objects, such as footsteps, that are high priority when they are close to the listener but low priority when they are far away. The Attenuation Editor is covered in Module 8: Using 3D Spatialization.
Now that you've made some adjustments to optimize processing, you'll profile the game again to see if there's any improvement.
-
Similar to the previous exercise:
-
From the menu bar, click Layouts > Profiler.
-
From the toolbar, click the Start Capture button.
-
Return to Cube, collect a poison gem, click and hold until the gem count reaches 0.
-
Return to Wwise and click the Stop Capture button.
-
-
In the Performance Monitor, drag the yellow time cursor to the left until you find the highest peak in the Number of Voices (Physical) band. In the pane on the right side of the Performance Monitor, scroll down to see the exact value of that parameter at the time of the peak.
-
Compare the Number of Voices (Physical) captured after you optimized your project with the number captured before you optimized your project.
In this example, the highest value captured after optimization is 9, much lower than the value of 21 captured before optimization. Note, the voice count is still greater than the limit of 4 you put on the Poison Gem Actor-Mixer because it includes other sounds that were playing at that time, such as the teleporter in the distance or possible footsteps.
In the Capture Log, there are occasional indications that a Sound SFX was stopped because the playback limit was reached. This confirms that the changes you made reduced the number of voices. Well done!
-
To exit the game, press Esc, use the up and down arrow keys to select quit, and then press Enter.
Congratulations! If you've gone through all 20 modules, you've not only read about integrating audio into video games, you've exercised the key principles yourself by building sound into the game Cube! With your new found knowledge, reflect back on the earlier modules and take an opportunity to experiment with some of your creative ideas that could make Cube sound even better! You might even want to generate the SoundBanks once more and play through the completed game.
While there's certainly much more to learn about Wwise and game audio in general, the core ideas you've discovered here will serve as a solid foundation for you to move forward. When you're ready, take advantage of the additional Wwise Certification courses, such as Interactive Music, Performance Optimization & Mobile Considerations, and Wwise Unity Integration.