The question still remains, however, what IS a 3D game? This is not an easy question to answer. Most people would say that the hit MYST is a 3D game. Although it is, it is in a different class than we are interested in. We are interested in REALTIME 3D games. These games calculate all of the view data as the program is running. It should be flexible enough that it can be extended and modified in the future, and robust enough to be useful. Games such as Doom, Descent, and Quake are good examples of this genre of 3D games.
3D games have become a way of life. People now spend hours of time looking down cooridoors, exploring tunnels and viewing intricate extraterrestrial planets. All of this is possible because of recent developments in computer hardware. It is now possible to do these things, but it still requires a lot of effort, on the programming side, to get it looking respectable. In the following articles, I will begin to cover the essence of our 3D engine.
|
Thinker: I'm thinking of a number between one and one thousand. Try to guess it. Guessor: 500? T: Higher G: 750? T: Lower G: 625? T: Lower G: 562? T: Higher G: 593? |
T: Lower G: 577? T: Higher G: 585? T: Higher G: 589? T: Higher G: 591? T: Higher G: Then it must be 592. T: You're right! |
A BSP tree breaks the "Space" of a level up recursively into chunks. From the partition information, it can quickly eliminate surfaces that are impossible to see. Perhaps later I will cover this in more depth.
The game Quake, also by ID Software uses a very similar scheme, except that it uses a three dimensional BSP tree rather than the 2D tree of doom. This allows complete freedom in level design. The downside is that it has an order of magnitude of more stuff to keep track of. Also, the BSP tree is really only suited for "indoor" scenes. Never in quake do you go ouside and look across long distances...
In this series, we will create a generic 3D graphics engine. This engine is capable of displaying any type of objects, indoor or outdoor. As the series progresses, we will add features and details to objects that we can render. I will try to make the mathematics behind it clear as much as possible. I will not just skip the math, because it is good to see why some things work, and understand the basis behind it.
Since I didn't actually cover any material in this article, I refer you to the following commercial games: