New Space
Until now, we have been working only in a two-dimensional space. This means that we were able create game objects with height and width. This works well because our computer screens are also two-dimensional. As we move into three-dimensional space, we need the ability to add another dimension to our objects: depth. As computer screens don't physically have a third dimension in which to display pixels, this is all accomplished by mathematical wizardry!
In Chapter 8, Expanding Your Horizons we discussed several methods that have been used (and are still used) to simulate three-dimensions in a two-dimensional display:
Objects that are farther away can be made to appear smaller than objects that are close
Objects that are farther away can be made to move more slowly than objects that are close
Lines that are parallel can be drawn to converge toward the center as they are farther away
These three techniques have one major shortcoming: they all required the programmer to write code that makes...