|
Compiler and Viewer BSP Compiler (C++, MFC)
OpenGL Map Viewer
Download here Installation Place the MapEditor.exe, Maze.exe executables and the texture file brick.ppm in the same directory. Note that you will need the GLUT (OpenGL Utility Toolkit) to run or compile the Maze program. You can obtain GLUT here: http://www.xmission.com/~nate/glut.html How to Use Run MapEditor.exe to create a map. Click and drag the mouse within the window to draw the walls of the map. NOTE: When you view the map using the Maze program, you will always start in the upper left hand corner, facing the lower right. So you probably want to draw walls in the upper left hand corner of the window. See the screen shot at the top of the page. Now you are ready to create a BSP file which can be viewed with the maze program. Click on the BSP menu and select the Compile Map option. Your map will be saved in BSP format in the file "maze.bsp". Now you can run the Maze program. This program will automatically load the "maze.bsp" file and the brick texture (from the "brick.ppm" file). You can now move around the maze you have just created. Use the up and down arrow keys to move forwards and backwards, and the left and right arrow keys to turn. Press Q to quit the Maze program.
Other stuff You can use Clear All under the Edit menu to clear the map. Using the File->Save option will save the map as a binary MAP file. This format is *not* readable by the Maze program. You must compile the maze using the BSP->Compile Map menu option. The maze.bsp is a text file. Here's the file format: File Format Vertices in x, y, z format.
NOTE: You will need GLUT to compile and run the Maze Viewer.
You can download
http://www.xmission.com/~nate/glut.html Both projects were compiled with Microsoft Visual C++ 5.0 Map Editor Source
Maze Viewer Source
For More Information Chapters 59, 60 and 62 of Michael Abrash's Graphics Programming Black Book Special Edition provide an excellent introduction to BSP trees. Abrash is a noted optimization guru who was also a programmer on Quake. The book is out of print, but fortunately the author has allowed web sites to download PDF scans of the text. The BSP Trees FAQ can be found here. Dan Royer, co-author of Advanced Game Programming in DirectX 7.0, has a BSP tutorial at his site. Charles Bloom, a lead programmer at Oddworld
Inhabitants, has a BSP
Tips page.
return to my programming demos page.
|