O'Reilly logo

Beginning Java Game Development with LibGDX by Lee Stemkoski

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 4

image

Adding Polish to Your Game

This chapter builds on the Starfish Collector game introduced in the previous chapter. The core game play remains the same; the additions include background music and sound effects, as well as a user interface with customized bitmap fonts, image-based buttons, and other UI controls.

Audio

Incorporating audio into your game is a straightforward process, thanks to the built-in functionality of the LibGDX libraries. Supported file types include MP3, OGG, and WAV. LibGDX provides two interfaces for this purpose, Sound and Music, each of which can be created from the audio object of the Gdx class. (The classes ...

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