Subject: RE: Game Boy Advance Doom based on Atari Jag versi
Author: Fredrik Olsson (h13n2fls32o815.telia.com)
Date: 10-18-2001 12:43
WAD files is the Doom equalent for PAK files in Quake. Not to clutter up the harddrive with thousands of files they are instead but into a WAD/PAK. WAD Was somewhat simplier made up of data chunks while PAK files works more like an actual file structure.
BSP = Binary Space Partinioning. BSP in an algoritm for structuring geometry data for faster usage. The word "Tree" comes from the fact that the BSP structure resembles of a Tree with branches.
A BSP tree consist of Nodes and leaves. A node points to two other nodes or leaves and a leaf contains actual geometry.
You build a BSP tree by dividing ALL geometry in two halfes "the front" and "the back" you then step down on both sides and split them two until there in a node is no more geometry in front or back of each other and you then make a leaf instead.
Now when drawing the geometry you take your first node and check. Can I see the front? If not Hurray! You can ignore 50% of the geometry data. If you can you step down to the next node and do the check again. If you happen to step down into a leaf you just draw the geometry to screen. Best thing is that in this way the geometry comes out sorted front to back or back to front automaticaly.
In quake a level in general consists of 100.000 polygons or more, using BSP there is only need to handla aproximately 500 at a time.
For more information I refer to the online BSP faq or my article due for release in next UCM.