Skip to Main Content
HTML5 Game Programming with enchant.js
book

HTML5 Game Programming with enchant.js

by Brandon McInnis, Ryo Shimizu, Hidekazu Furukawa, Ryohei Fushimi, Ryo Tanaka, Kevin Kratzer
May 2013
Beginner to intermediate content levelBeginner to intermediate
220 pages
5h 16m
English
Apress
Content preview from HTML5 Game Programming with enchant.js

CHAPTER 7

image

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

James L. Williams

Publisher Resources

ISBN: 9781430247432Purchase book