procedure - empty pit

I took a very object oriented approach tot he implementation of the Pit. When a wall was going to be used in multiple instances, I often named a wall I previously defined and then re-used them wherever I could. Thus, the Pit has wall definitions of 8 different solid walls and 2 glass walls.

By reusing existing objects, the browser needs to interpret less new objects and thus, performance improves. This also increases readability of the code. However, over use of such a technique can quickly become convoluted. Theoretically, I could use one wall object and scale/rotate the wall to fit all my needs but this is difficult to interpret for another person when maintaining the code.

The definition of the walls is quite arbitrary but there is a method to the madness. Starting from the wall on the right of the pit next to the glass arc, the walls are numbered incrementally counter clockwise.

To maintain readability of the code, I adopted a standard naming convention where each object or property begins with a header (e.g. xxxxxWall). The standard is as follows:

shapeXXXX - shape such as wall or cubicle
appXXXX - appearance property like the color of a wall
lightXXXX - a light source node

objects page | next object

introduction

procedure

the pit

problems

in the works

last word
objects

empty pit

cubicle

bulletin board

table

door

copyright © 1997 illusion graphics all rights reserved