O'Reilly logo

Libgdx Cross-platform Game Development Cookbook by Alberto Cejas Sánchez, David Saltares Márquez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Audio and File I/O

In this chapter, we will cover:

  • Playing short sound effects
  • Audio streaming for background music
  • Optimizing audio files to reduce download sizes
  • Procedural audio generators
  • Engine sounds with dynamic audio
  • The 2D space sound system
  • The first approach to file handling in Libgdx
  • Using preferences to store game states and options
  • The XML parsing primer
  • JSON serialization and deserialization

Introduction

Audio plays an essential role in building a game's atmosphere. Every single title that intends to immerse you in its world puts a great deal of attention on sound effects and music, especially in classic horror games. You are in a corridor, it is dark, and you can barely see. The appropriate combination of sounds will make you want ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required