O'Reilly logo

Windows Phone 8 Game Development by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Audio support

The current version of your game does not play any music, neither background nor sounds. In this part, you will learn how to play audio files: both as the background music (for the whole game) and sounds (played in special situations, such as crashing the rocket).

Background music

Many games have the background music played all the time while the game is running. Similarly, in your project, you will play the .mp3 file.

At the beginning, you should copy the suitable file into the Assets directory (inside the managed project), include it in the project, and ensure that the Build Action property is set to Content. Then, you need to make some modifications in the game code, mainly in the App.xaml and App.xaml.cs files, because the music ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required