|
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. |
|
copyright © 1997 illusion graphics all rights reserved