Book Image

Learning Java by Building Android Games

By : John Horton
Book Image

Learning Java by Building Android Games

By: John Horton

Overview of this book

Table of Contents (17 chapters)
Learning Java by Building Android Games
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preparing to make the retro squash game


Now we are ready to discuss the making of our next game. We actually know everything we need to. We just need to think about how to use the different techniques we have learned.

Let's first look at exactly what we want to achieve so that we have something to aim for.

The design of the game

Let's look at a screenshot of the game as a good starting point. When you design your own games, drawing sketches of the in-game objects and mechanics of the game will be an invaluable part of the design process. Here, we can cheat a bit by taking a look at the end result.

The UI

Starting from the top, we have Score. Every time the player successfully hits the ball, a point is added. Next, we have Lives. The player starts with three lives, and every time they let a ball go past their racket, they lose one life. When the player has zero lives, their score is set to zero, lives are set back to three, and the game begins again. Next to this, we have FPS. FPS stands for frames...