December 2007
Beginner to intermediate
300 pages
7h 49m
English
In this chapter we’ll look at a technique for using CSS and JavaScript to build a first-person-perspective maze, in homage to old-school adventure games like Dungeon Master and Doom.
In truth, the scripting involved is fairly complex, and it won’t be possible for me to spell out every nuance of the code in this single chapter. In fact, I won’t even list every method used in the script, as some of them are quite long. What I can do, though, is introduce you to the principles of creating shapes and perspective with CSS, and the task of using JavaScript to generate those shapes on demand to create a dynamic, three-dimensional perspective from a static, two-dimensional map.
The script, and ...
Read now
Unlock full access