Sound effects
Mars Runner is playable at this point, but like all of our games, so far it is completely silent. The audio queue provided by sound effects synced to the action in a game contributes greatly to the immersive feeling a player experiences. We can build an easy-to-use class to play sound effects that could be added to any of our games.
Note
Generating sound effects
There are numerous sound effect libraries on the Internet that offer downloadable effects, but rarely are the license terms for these libraries very clear on the permitted usages of the sounds, especially as many of them are compilations of sounds found elsewhere and not original creations. As with graphics resources, http://www.opengameart.org is a great source for music and sound effects with clearly specified licenses. Alternatively, you can generate or record your own sound effects. The sound effects included with the audio package for this chapter were all generated using the sfxr sound generator program, available...