11. Sound
This is the final chapter that deals with the underlying technology we need to make Sir Lamorak’s Quest and most 2D games. Sound is one of the most important elements in a game. Although it’s possible to create a game that has no sound at all, sound really can take your game to a new level.
Many of the games in the early 1980s didn’t have sound, or the sound was as simple as clicks and buzzes. Even though the sound was not that advanced, just having something really made a difference to the player’s experience.
During this chapter, we review the SoundManager class and look at how we can play both music and sound effects. This involves using both the AVAudioPlayer class and OpenAL.1
Sound Project
The project for this chapter introduces ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access