Version
This method will apply if:
The game has a large number of in-memory media assets.
The media requirements are difficult to predict in advance by the sound designer.
The project uses Switches and States to determine which sound or motion objects will play for a specific Event.
Sounds can't easily be split into defined sections.
Games can be very complex and the triggering of sounds and motion can be based on a variety of different factors, including game textures, the time of day, the movement of game objects, and in some cases the Actions of other players for online multiplayer games. In an Event-based or object-based environment, sounds could, for example, be loaded into memory based on the proximity of some other game objects. Every game object could have a list of SoundBanks that must be loaded when they are within a given range or simply because they exist.
Also, Switches and states can determine which objects are played. When an Event playing such objects is added to a SoundBank, all possible media is automatically added to the SoundBank as well. For example, you might have a single Event called "Play_Footstep". This Event will play the appropriate sound based on the current texture of the ground, which is specified by changing the Switch. Although this works well, it can be a waste of memory keeping the sounds "footstep_sand.wav" or "footstep_winter.wav" ready in memory when the gameplay is happening inside a building in London.
To avoid wasting memory in this case, you can add Events and/or object structures to a SoundBank and then specify which corresponding objects are included in the SoundBank. For example, let's take footstep sounds on different textures. In this case, we could create the following SoundBanks:
The "EventBank", which would contain the "Play_Footstep" Event and structure.
The "Winter_Footstep_bank", which would contain the media for the footsteps that only occur in some part of the game (winter).
The "Desert_Footstep_bank", which would contain the media for the footsteps that only occur in some part of the game (desert).
The "Common_Footstep_bank", which would contain the media for the footsteps that can occur anywhere (wood, concrete, and so on).
Let's say you have three different textures in your game (snow, sand, and concrete). In Wwise, you have a Switch Container, that plays one of three Random Containers, based on the Switch "ground_texture". Each of the three Random Containers has four variations of the footstep sound on a given texture.
To create SoundBanks in Wwise that micromanage your media:
Create a SoundBank called "EventBank" and load it into the SoundBank Editor.
Drag the "Play_Footstep" Event to the Add tab of the SoundBank Editor.
Deselect the "Media" check box for this Event, but leave the Events and Structures check boxes selected.
Create the three other SoundBanks, one for each texture.
In each SoundBank, drag the Random Container associated with this texture.
Note | |
---|---|
It would work as well if instead of drag and dropping the Random Containers we would drag and drop each of the sounds individually. But the advantage of using the containers is that all the sounds in the container will automatically be added in the SoundBank instead of having to make all the changes manually if the container's content changes. |
Deselect the "Events" and "Structures" check boxes for each of the three texture SoundBanks, leaving only the Media type checked.
Generate the SoundBanks and copy the generated SoundBank folder to the game application.
At this point, we have four SoundBanks, one that contains the Event and the structure data related to the audio that is to be played, and three others that contain only media associated with a particular ground texture.
For integration details, see Micromanaging Media in the Wwise SDK documentation.
This was only a very specific example of one of many possible things that can be done using this technique. Since it is possible to decide object by object and Event by Event what is included in every SoundBank, you have complete control over the contents of each SoundBank. Although you could create a separate SoundBank for each object in your game, this would be very difficult to maintain as every new sound or motion object would require new code to load the SoundBank at the right place in the game. The goal for each game is to try and find a good balance between granularity and ease of integration in the game.
Note | |
---|---|
If you are interested in a sound by sound loading scheme, you might want to prepare Events instead of loading entire SoundBanks. For more information on preparing Events, refer to Preparing Action Events. |
The following table lists the pros and cons of micromanaging your media.
Pros |
Cons |
---|---|
The best option to optimize memory usage. Gives you full control over what media is loaded at any point in the game. Gives you SoundBank backward compatibility with the typically larger media SoundBanks. |
Requires a lot of communication between the sound designer and the game developers to determine which SoundBank must be loaded, and when. |
Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !
Visitez notre page d'AideEnregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !
Partir du bon pied avec Wwise