Sound effects

Sound effects add a level of feedback to your game that, when missing, will be very noticeable to players. Even in situations where sound effects are not realistic (you would not actually hear explosions in space), their absence would feel wrong while playing.

Generating and finding sound effects

There are a number of sound effects freely available on the web that can be tracked down with a little searching. Locating truly royalty free sound effects is a bit harder. Most of the sound effects archives on the web are not the actual originators of the sound files, so their true licensing requirements may be difficult to track down.

You can always record your own effects if you have a way to simulate sounds. In the case of Asteroid Belt Assault, the sound effects were generated using a program called "sfxr". This application, available at http://www.drpetter.se/project_sfxr.html includes full source code, and produces basic sound effects via random generation.

Sound in XNA

There are two different approaches for implementing sound in XNA. The first option is to use XACT, Microsoft's Cross-platform Audio Creation Tool. XACT includes an authoring tool that allows you to build sound banks containing multiple audio tracks. XACT can be used in Windows and Xbox 360 projects, but not on the Zune or the Windows Phone 7 platforms.

The 3.0 release of XNA introduced a new method for implementing sound: the SoundEffect and SoundEffectInstance classes. These classes are much easier to use than XACT, and are available on all of the XNA platforms. We will use the SoundEffect classes in AsteroidBeltAssault.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.218.230