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.
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 ...