Table of Contents
States are basically “mixer snapshots” or global offsets or adjustments to the game audio and motion properties that represent changes in the physical and environmental conditions in the game. Using states can streamline the way you design your audio and motion, and help you optimize your assets.
States as “mixer snapshots” allow for level of detail and control over the resulting sound output and can be combined with multiple states with expected results. When an object registers to multiple states, a single property can be affected by multiple value changes. In this scenario, each change of value is added up together. For example, when two states in two different state groups have a volume change of -6 dB, and both become active simultaneously, the resulting volume will be -12 dB.
When you create and define these “mixer snapshots”, you are really creating different property sets for a sound, music, or motion object without adding to memory or disk space usage. These property sets define a set of rules that govern the playback of a sound during a given state (or states). When you apply these property changes globally to many objects, you can quickly create realistic soundscapes that better represent the audio and enhance the game. By altering the properties of sounds, music, or motion already playing, you are able to re-use your assets and save valuable memory.
Example 6.1. Using States - Example
Let's say you want to simulate the sound treatment that occurs when a character goes underwater. In this case you could use a state to modify the volume and low pass filter for sounds that are already playing. These property changes should create the sound shift needed to recreate how gunfire or exploding grenades would sound when the character is under water.
The following illustration demonstrates how the properties for the volume and low pass filter for the gunfire and grenade sound objects are affected when the underwater state is called by the game.