C H A P T E R  4

Adding Sound Effects, Music, and Video

With a basic understanding of how to work with sprites and handle user interaction, you’re much closer to a full, playable game. Now you add some elements essential to an immersive playing experience: sound effects, music, and video.

It’s surprising, but many mobile games neglect sounds and music. Maybe the developers quickly added a couple of sound effects or put together a simple melody, but that’s it. The audio portion of a game can really make your work stand out. There is no excuse for poor performance in this area, because it’s one of the easiest Android game features to implement. The real limits are on what music you can create or purchase. Several sites already have taken care of this, though, by offering thousands of free sound files for commercial and noncommercial projects.

Video in mobile games has also failed to fulfill its promise. Much of this may be due to the small hard-drive space on handsets or the cost of data plans. Tablets, however, boast gigabytes worth of storage, along with the capability of quickly loading media from web sites and servers. You can use a quick movie to explain a game or entertain its player while the game assets load. Having a solid musical score and multimedia show for gamers definitely sets your game above the competition.

In this chapter, you create a new Eclipse project that incorporates sounds and media into your game. First, however, you address the framework that handles sounds.

images Note In the past, game developers were hesitant to spend time and money on sounds because they believed mobile-game players wanted to be able to play quietly. With tablets, gaming has shifted to become a more multiplayer and social occasion where multiple people can enjoy the game simultaneously on the screen; therefore noise is no longer a concern. Games must still make it possible for players to turn off the sound, however.

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

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