O'Reilly logo

Android Game Programming by Example by John Horton

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. Tappy Defender – Going Home

We are on the home straight of our first game. In this chapter, we will draw a HUD to show the player in-game information, and implement the rules of the game so that the player can win, lose, and get fastest times.

After that, we will make a pause screen so the player can admire their achievements (or not) after they win or lose.

In this chapter, we will also generate our own sound FX and then add them to the game. Following that, we will enable the player to save their fastest time, and finally we will add a whole bunch of minor improvements, including a bit of difficulty balancing based on the screen resolution of the player's Android device.

Displaying a HUD

We need to start making our game a bit more rounded. ...

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