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 O’Reilly online learning.

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