Game Development Reference
In-Depth Information
they just heard, or to see which gunshot animation doesn't have a sound attached
to it.
What the tool must provide. Visualizing sound data is not limited only to show-
ing the sounds that are currently playing. We can also use this tool to show sounds
that were not able to play. Furthermore, we can show any invisible sound geom-
etry, such as splines used for a controlling a sound's movement, reverb areas, or
sound-pack loading zones. With this tool the designer must be able to
turn the visualization on / off for sounds;
toggle showing sound event names above these visualizations;
choose to show or hide invisible sound geometry;
enable or disable showing invisible geometry names or properties;
have the option to show the sound properties of a collision polygon being
pointed at.
Tool design. The information displayed by the tool should be rendered on the
game screen so that the sound designer can move through the game world and see
sound data as it relates to game objects. As with the snapshot tool, we can either
have the user interface as a separate GUI application, which communicates with
the game, or give the designer some simple menu options on the game screen. As
there are fewer designer options with this tool, there will be fewer benefits to having
a separate GUI application to manage to designer interactions.
Each game object that requires visualization must inherit from a base class
called VisualizerObject. Each VisualizerObject has a category and is registered
with a global VisualizerManager on construction. The VisualizerManager class is
the game-side class that maintains several lists of VisualizerObjects that have been
constructed. There is one list per category of VisualizerObject. Once per frame,
the VisualizerManager must iterate through each of its categories. If we want to
render that category of VisualizerObjects, then we iterate through that category's
VisualizerObject list and call the virtual draw method on each VisualizerObject
within that list. Care must be taken to ensure that the VisualizerManager is con-
structed first before any VisualizerObjects are created. Listing 11.4 Shows a sample
VizualizerObject base class implementation.
enum VO_CATEGORY
{
VO_SOUND=0,
VO_REVERB,
VO_GEOM,
VO_MAX_CATEGORIES
};
Search WWH ::




Custom Search