Why Air Hockey?

Air hockey is a simple, popular game often found at bowling alleys and bars. Although simple, it can also be incredibly addictive. Some of the top sellers in Google Play, Android’s app market, are based on one variant or another of this enjoyable game.

As we develop our game of air hockey, we’ll learn quite a few OpenGL concepts along the way. We’ll learn how to define and draw a table to play on, as well as how to add detail with colors, shades, and textures. We’ll also learn how to respond to the user by acting on touch-screen events.

The Rules of the Game

To play a game of air hockey, we need a long rectangular table with two goals (one on each end), a puck, and two mallets to strike the puck with. Each round starts with the ...

Get OpenGL ES 2 for Android now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.