Chapter 8

3D in a Browser

In the first part of the book, we learned how to make 2D games. For many, many years of browser game development, 2D games were the most advanced cutting-edge technology that one could use. 3D games are the result of a natural evolution process that aims to make the game look as realistic as possible. The only limiting factor that doesn't allow us to run Skyrim on a smartphone is, of course, the processing capabilities of portable hardware.

3D engines require much more processing time compared to regular 2D engines. In a 2D engine, the rendering job is relatively simple: take pixels from image, copy them to canvas; if there is transparency involved, calculate the composite color. For a 3D engine, on the other hand, ...

Get Pro Android Web Game Apps: Using HTML5, CSS3 and JavaScript 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.