Adding music and sounds to Canyon Bunny
Let's now add some music and sound effects to our game. First, we need to know what audio files are needed and then copy them to our assets
folder.
Note
All assets shown and discussed in this book, including any other project files, are provided in the code bundle, which can be downloaded from the Packt Publishing website.
The next two tables contain descriptions of each audio file and their function in Canyon Bunny.
For sounds (generated with bfxr), refer to the following table:
Filename |
Event |
---|---|
|
When the player jumps |
|
When the player jumps in mid-air (requires an active feather power-up) |
|
When the player picks up a gold coin |
|
When the player picks up a feather power-up |
|
When the player loses a life (for example, the player falls down into the water) |
For music (provided by Klaus "keith303" Spang), refer to the following table:
Filename |
Event |
---|---|
|