Chapter 1. Player 1 UP

The terminology used by old arcade and pinball machines "1 UP" was a kind of notice to the players that they were playing (up) now. It was also used to indicate earning an extra life. Are you ready to build three great games?

We will build three cool games together. Every line of code for these three games is shown in this book; you will never have to refer to the code files to see what is going on. Also, the entire file set required to build all three games is included in the download bundle that can be obtained from the books page on the Packt website.

All the code, Android manifest files, and the graphical and audio assets are included in the download as well. The three cool games are progressively more challenging to implement.

The first project uses a simple but functional game engine that clearly demonstrates the essentials of a main game loop. The game will be fully working with the home screen, high scores, sound, and animation. But by the end of the project, as we add features and try to balance the game play, we will soon see that we need more flexibility in order to add features.

In the second project, a hard retro platformer, we will see how we can use a simple and flexible design to build a relatively fast and very flexible game engine, which is extendable and reusable. This flexibility will allow us to make quite a complex and well-featured game. This game will have multiple levels, different environments, and more. This in turn will highlight the need for being able to draw graphics more quickly. That leads us on to the third project.

In the third project, we will build an Asteroids-like game called Asteroids simulator. Although the game won't have as many features as the previous project, it will feature the super-smooth drawing of hundreds of animated game objects running at over 60 frames per second. We will achieve this by learning about and using the Open Graphics Library for Embedded Systems (OpenGL ES 2).

By the end of this book, you will have a whole repertoire of design ideas, techniques, and code templates that you can use in your future games. By seeing the strengths and weaknesses of the different ways of making games on Android, you will be able to successfully design and build games in the most appropriate way for your next big game.