Book Image

Sparrow iOS Game Framework Beginner's Guide

By : Johannes Stein
Book Image

Sparrow iOS Game Framework Beginner's Guide

By: Johannes Stein

Overview of this book

Table of Contents (20 chapters)
Sparrow iOS Game Framework Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Afterword
Index

Chapter 9. Adding Audio to Our Game

In the previous chapter, we learned about artificial intelligence. We learned theory about finite state machines and fuzzy logic. We applied these elements to our game. We also implemented the remaining gameplay elements into our game. In this chapter, we are going to add music and sound to our game. Audio in itself is an important aspect to any game as it is part of the player's experience. Try to play your favorite game without music and you'll find yourself having a different experience when playing the game.

We will cover the following topics in this chapter:

  • Loading sound and music files

  • Generating our own sound effects

  • Playing audio

Let's add music and sound to our game, shall we?