Book Image

Android Game Programming by Example

By : John Horton
Book Image

Android Game Programming by Example

By: John Horton

Overview of this book

Table of Contents (18 chapters)
Android Game Programming by Example
About the Author
About the Reviewers
Platformer – Guns, Life, Money, and the Enemy

Chapter 10. Move and Draw with OpenGL ES 2

In this chapter, we will implement all the graphics, game play, and movement. In just over 30 pages, we will complete everything except collision detection. We can achieve this much because of the groundwork we laid in the last chapter.

First, we will draw a static border around our game world, then some blinking stars, followed by adding movement to our spaceship as well as some bullets. After that, we will quickly add controls for the player and we will be whizzing around the screen.

We will also make some noise by implementing our SoundManager class with some new sound FX.

Once this is done, we will add randomly shaped asteroids that move across the world while spinning around at the same time.

Then, we can add a HUD to highlight the touchable areas of the screen and provide a tally of the remaining player lives and asteroids that need destroying before the next level.