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
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
7
Platformer – Guns, Life, Money, and the Enemy
Index

Chapter 9. Asteroids at 60 FPS with OpenGL ES 2

Welcome to the final project. Over the course of the next three chapters, we will build an Asteroids-like game using the OpenGL ES 2 graphics API. If you are wondering exactly what OpenGL ES 2 is, then we will discuss the details later in this chapter.

We will build a very simple but fun and challenging game, where we can draw and animate hundreds of objects at a time, even on quite old Android devices.

With OpenGL, we will take our drawing efficiency to a much higher level, and with some not-too-tricky math, our movement and collision detection will be greatly enhanced compared to our previous projects.

By the end of this chapter, we will have a basic working OpenGL ES 2 engine drawing our simple but temporarily static spaceship to the screen; at 60 FPS or higher.

Tip

If you have never seen or played the '80s arcade hit (released in November 1979) Asteroids, why not go and check out a clone of it or a video now?

Free web game at http://www.freeasteroids...