Game Development Reference
In-Depth Information
Figure 6.1 Explosion sound cue.
As for how this metadata might be stored for game use, there are a number of pos-
sibilities. One option is to store it in a JSON file, which might look something like
this in the case of the explosion cue:
{
"name": "explosion",
"falloff": 150,
"priority": 10,
"sources":
[
"explosion1.wav",
"explosion2.wav",
"explosion3.wav"
]
}
The JSON file format is covered in further detail in Chapter 11 , “ Scripting Lan-
guages and Data Formats .” But any format will work as long as it allows for
enough flexibility. In any event, during the course of parsing the data, it can be
directly mapped to a class implementation of the sound cue, like so:
Search WWH ::




Custom Search