Game Development Reference
In-Depth Information
Figure 12.1. Screenshot of the custom Minimaxima Editor.
12.5.2 An XML-Based Toolchain
After prototyping a few different audio-based game mechanics, I finally landed on a
pong-ish, arcade-style boss fight that was driven by the audio of a song (see Color
Plate VIII for a screenshot of Minimaxima . I decided to name it Minimaxima
since I would be scrubbing the waveform data, extracting FFT frequency data, and
performing beat detection. Depending on the type of song that was used, it was
necessary to tweak gameplay values (e.g., watching a different frequency subband
for beats). In the end, I wrote a custom editor that could read the iTunes Library
metadata and allow for importing of specific songs into the game and tweaking
gameplay values. With XML data binding, I was able to use the same classes for
serializing the song list to be used in the game, keeping custom gameplay values,
and for writing out a binary runtime version of the data. For the sake of brevity, I'll
spare you the 1000+ lines of code and leave it to you to take a look at the project
filesshownin Figure12.1 .
12.6 Conclusion
XML can be used in a flexible way for game development tools. With XSLT, you can
transform XML data from one format into an easier-to-parse format (e.g., something
 
Search WWH ::




Custom Search