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

jump.wav

When the player jumps

jump_with_feather.wav

When the player jumps in mid-air (requires an active feather power-up)

pickup_coin.wav

When the player picks up a gold coin

pickup_feather.wav

When the player ...

Get Learning LibGDX Game Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.