O'Reilly logo

Beginning Android Games by Mario Zechner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. 2D Game Programming Tricks

Chapter 7 demonstrated that OpenGL ES offers us quite a lot of features to exploit for 2D graphics programming, such as easy rotation and scaling, and automatic stretching of our view frustum to the viewport. It also offers performance benefits over using the Canvas.

Now it's time to look at some of the more advanced topics of 2D game programming. Some of these concepts we used intuitively when we wrote Mr. Nom, including time-based state updates and image atlases. A lot of what's to come is indeed very intuitive as well, and chances are high that you'd have come up with the same solution sooner or later. But it doesn't hurt to learn about these things explicitly.

We will look at a handful of crucial concepts ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required