Version

menu_open

Managing dynamic dialogue

Many games today, including real-time strategy, sports, and adventure games, have an audio component that is dynamic or driven by the Action that is taking place in game. With all the different variables and outcomes that can exist in a game, this type of audio certainly represents a unique challenge for scriptwriters and audio designers. To cover all the different combinations of dialogue for each condition or outcome, you may need thousands of assets and complex Switch Container hierarchies. This can be very costly in terms of memory usage. In an effort to streamline the development process and reduce the overall memory consumption, Wwise introduces the dynamic dialogue system.

The dynamic dialogue system is a lightweight and efficient method for building and managing dynamic audio in Wwise. It uses a set of rules within a decision-tree structure to determine which piece of dialogue to play at any particular moment in game.

Additional features, available in the Wwise SDK, allow you to build on this already powerful system by creating runtime dynamic sequences, which are ideal for play-by-play commentary in sports games. In Wwise, you can break down dialogue into individual words or small phrases and then assign these pieces of dialogue to specific paths within the decision-tree structure. As the game is being played, the specific words are submitted to the sound engine where they are dynamically stitched together to form free-flowing sample accurate sentences. Because words and small phrases exist separately, they can also be combined and re-used in a variety ways. For more information on integrating dynamic sequences into your game, refer to the Wwise SDK documentation .

[Note]Note

Although Dialogue Events were initially created to handle game dialogue, they are not reserved explicitly for dialogue and can be used for a variety of other purposes in your game, including footstep sounds on a variety of ground surfaces.

Understanding the dynamic dialogue system

At the center of Wwise's dynamic dialogue system is the Dialogue Event, which is basically a set of rules or conditions that determines which piece of dialogue to play. The Dialogue Event allows you to recreate a variety of different scenarios, conditions or outcomes that exist in your game. To ensure that you cover every situation, Wwise also allows you to create default or fallback conditions.

All these conditions are defined using a series of State Groups and States. These State Groups and States are combined to create paths, which define the particular conditions or outcomes in the game. Each path is then associated with a specific sound object in Wwise. As the game is played and Dialogue Events are called, the game verifies the existing conditions against the paths defined in the Dialogue Event. The paths that match the current situation in game along with the mode, probability, and weighting of each path determine which piece of dialogue is played, if any.

For example, the following Dialogue Event contains the State Groups related to the names of each player in a sports game. The values of each State Group are combined to create the different paths or conditions that may exist. In this particular example, the commentator can use either the player's last name or full name.

To deal with situations where there are no states that match the current situation in game, you can create a path with a default or fallback state. These “fallback” paths contain one or more State Groups instead of States and are usually associated with a more general sound object. In the previous example, the fallback path is associated with the sound object “Them” instead of one of the player's names.

After you have recreated all the conditions in the Dialogue Event, it can be integrated into the game engine. When the Dialogue Events are called by the game, the sound engine resolves the Dialogue Event by returning the audio structure that corresponds to the matching path. The sound engine can then decide whether to insert the audio structure into a dynamic sequence for playback. The relationship between returning an audio structure and inserting it into a dynamic sequence does not have to be 1:1. This means that for each resolved Dialogue Event, a returned audio structure can be added to the dynamic sequence as many times, as necessary.

[Note]Note

When creating dynamic dialogue, it is important that you work closely with your audio programmer, since many of the functions are only available in the Wwise SDK, including the ability to stitch words or phrases together into sentences.

Since the game engine uses the Dialogue Event name, you can create the events, integrate them into the game and then build and fine-tune the contents of each Event without ever having to re-integrate them into the game again. This gives you a great deal of flexibility to add or remove states, and to experiment with different sounds, all without additional programming.

[Caution]Caution

Adding, removing, and moving State Groups within a Dialogue Event will automatically modify the paths. Although this is easily done in Wwise, this type of change will require programmer intervention because the code will need to be updated as well.

To help you easily identify a Dialogue Event in the interface, it is represented by the following icon.

Icon

Represents

Dialogue event

Using Dialogue Events - example

Let's say that you are creating a hockey game with a play-by-play commentary. When a player shoots and scores, you want the play-by-play commentary to correspond to the Action in game.

To set up the different possibilities and outcomes in Wwise, you will need to create Dialogue Events for Players, Actions, Transitions, and so on. Each of these Events will contain a set of corresponding State Groups and States that you have created for your game. You must create a path that defines each condition or outcome and then assign an appropriate voice object to each path. During gameplay, the game will match the current states against the paths you defined in Wwise to determine which voice object to play.

The following illustration demonstrates how Dialogue Events created in Wwise can generate a play-by-play commentary that says “Cross shoots and scores”.

The previous illustration was simplified to show you how State Groups and Dialogue Events can be used in your game. In most cases, however, your game will require more sophisticated Dialogue Events that contain many different State Groups and States. Wwise allows you to set up a variety of complex scenarios that can make the dynamic dialogue in your game more realistic.

The following example shows you a more sophisticated example of the Player Dialogue Event. Notice how this Dialogue Event has several State Groups. When you have several State Groups, the selected states create the path. You can create a path for each combination of State Groups and States and then assign an object to each path. When each State within a particular path is met in game, the voice object that is assigned to that path will play.


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise