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
The project for this chapter introduces ...