Chapter 6

Rendering Virtual Worlds

In the previous chapters, we learned how to render the animation, control the timing, and react to the user’s input. The next interesting topic is rendering of the game world. This may be a trivial task if you are creating a game like chess, but what about role-playing games or strategies where the worlds are huge? Obviously, keeping the map and the game objects in your smartphone’s memory is not an option—too much data, too many bytes to send over the net and too slow to render.

The next two chapters are dedicated to rendering of virtual worlds. First we will cover the basic techniques of drawing vast 2D spaces on the smartphone screen. We will explore several different approaches to optimize the rendering ...

Get Pro Android Web Game Apps: Using HTML5, CSS3 and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.