Book Image

Learning LibGDX Game Development- Second Edition

Book Image

Learning LibGDX Game Development- Second Edition

Overview of this book

Table of Contents (21 chapters)
Learning LibGDX Game Development Second Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

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 picks up a feather power-up

live_lost.wav

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

keith303_-_brand_new_highscore...