Chapter 5. Sounds
In this chapter, you will learn how to create realistic sounds for your game. You can download, purchase, or record the sound effects necessary for your game. Just as it was important to learn how to manipulate graphics, I will show you how you can edit your sound effects and export them into a format best suited for an iPhone game.
What Is Sound?
Sound is a form of energy, similar to that of light and electricity, and is created when air molecules vibrate. You might have heard of the term “sound waves,” and that is because sound moves through the air in a wave pattern. These waves are created from differences in air pressure, as shown in Figure 5-1. Think of when you clap your hands, you basically create differences in air pressure, which causes sound waves to be emitted. When the sound waves reach your ears, they are interpreted by your brain, and then you recognize the sound as clapping. In the case of air hockey, we want our sounds to be recognized as those that we might hear while playing on a real air hockey table.
Sound is recorded using a microphone, which has a small membrane that is free to vibrate. The air vibrations are converted into electrical waves, such that when higher pressure is measured it produces higher voltage. The electrical waves can then be recorded onto either an analog device such as a tape recorder, ...