May 2013
Beginner to intermediate
220 pages
5h 16m
English
CHAPTER 7
![]()
Creating a Stand-Alone 3-D Game
The arcade shooter we created in Chapter 6 is an example of a two-dimensional game. Sprites, labels, and even the scenes in a standard enchant.js game exist on a flat plane, as seen by the existence of only an x and y axis within the game. Although we can stack entities on top of each other, this is simply to manipulate visibility. There is no “depth” that can be controlled.
Enchant.js comes with a plug-in called gl.enchant.js, which enables three-dimensional games to be created. In this chapter, we explore how to use gl.enchant.js to create a 3-D version of the Whack-A-Mole game we created earlier. On ...