Blitz3D Newbies: BSP Tutorial
by Comfixit

Part 1 Getting Started

Purpose:

This tutorial will take you from installation of all tools, configuration and finally your first BSP map loaded successfully into Blitz Basic 3D.

What's Needed:

To complete this tutorial you will need the following installed on your computer.

Step 1. Getting Started, Installation:

I would recommend installing your programs in the following order. Assuming that BB3D is already installed and running the latest update.

    • Install Quake 3
    • Install GERadient
    • Install Mini Python
    • Install Quark

Step 2. Configuring your applications:

Assuming that you have installed the applications correctly and in their default locations the following should get you well on your way to creating your own Q3 bsp maps.

    First thing I would do is put the Quark icon on your desktop since the install program does not appear to add the icon to your start menu. (But this is a personal preference)

    Open Quark and you should see a screen similar to the following:

    Click on the Games menu and set it to Quake 3 (It is set to Quake 2 by default)

    Now open the Games menu again and click on Options. If you installed the retail version of Quake 3 with the default settings you will want to set it up as it appears on the next page, if you used another installation path or are using the demo version your settings may very.


Once you have selected the correct paths to your q3map.exe and bspc.exe files then we are ready to configure our output directory. Click OK to close the window.

Now that you are back at the main Quark screen. Click on the Games menu again and this time select Output ectories (You will see the screen below)

I recommend changing the default directory that the files are saved in. If you elect not to change the temporary directory you will want to look in your Quake 3 directory under TempQuark. On my system it looks like C:\ProgramFiles\Quake III Arena\TempQuark\

Now that we have finished the hard part, lets make a bsp map to load into BB3D. Click on the Map button. It is the first picture icon along the top if you go from the left side to the right side. If successful you should see the screen on the next page:

Before we continue with the tutorial I would like to explain some of what you're seeing. The orange section is a top-down view of our map. The upper section with the yellow background is a side view of our map. On the lower left area you will see a "worldspawn" master object with sub objects below it.

That's all I am going to comment on the editor for now. You can go to the quark web site and read the tutorial for more information on general functions of the Quark map editor. In future tutorials I will be including information specific to editing these BSP maps for BB3D.

Now lets get back to work!

Step 3.Compiling your first level:

If you look at the hierarchy on the lower left corner you will see three objects branching off the "worldspawn". The borderwalls make up the room, the light represents (well a light) the lighting information for your world. But the info_player_deathmatch object is unnecessary for our BB3D program so lets delete it.

Time to compile. The most frustrating lesson I had to learn about bsp files is that they can be compiled with different options that add lighting and visibility information to the level. You need not concern your self much with this fact other then to know that you should follow four steps to successfully compile your level. Click on the Quake 3 menu and you should see the image below:

The four steps to successful compilation:

    1. Click on the "Prepare used Textures" menu option. This will effectively take all the textures included in your map from the Quake pak library of textures and place them into a Texture folder in your chosen temporary directory.
    2. Click on Q3Map (.bsp file creation). This is the first necessary compilation and will put the geometry information among other things into a file called newmap.bsp. When compilation is done you can proceed.
    3. Click on Q3Map -Vis. This will add visibility information into the level. This is a necessary component to making the level work, if you don't add the -Vis information you will get an illegal memory error when trying to use it in BB3D. When compilation is done its time to move onto the last compile step.
    4. Click on Q3Map -light. This adds all the light projection information into your map file. Mark Sibly says that it will work without this compile but your level will be slower. So I recommend going through this extra step. And once the last compilation is done its time to gather our files and move them.

Step 4. Gathering all your files:

Go to the output directory that you selected in steps 6 and 7. In there you will find several sub folders. The two folders that you're interested in are the Map folder and the Texture folder.

The Map directory: In the map directory there are two files of significance. The newmap.bsp file is what you have worked so hard to achieve. Take that file and copy it into a new directory that you will set aside for your BB3D BSP testing. The other file newmap.map is the file that you would load if you wanted to open and further edit your creation.

The Textures directory: Inside the textures directory you will find a bunch of $#%#^&# subdirectories for which you will have to copy each and every texture file from and paste into that BB3D Bsp test folder that we created so that all the textures are in the same directory as the newmap.bsp file. Just in case you were wondering, if you don't copy all the textures correctly your bsp file will be loaded without texture information. (One tip that I read on the BB3D forums is that you should put all your textures into a .pak file and use them in the editor so you can just unzip them to your final directory without all these copy hassles, I will cover that in a later tutorial.)

NOTE: Your bsp and all your textures must be in the same directory to work properly in this version of BB3D.

Step 5. Loading your file into BB3D:

Preparing the program: Now its time to load this thing into BB3D, but since this tutorial is long enough as it is I am going to cheat a little and use Mark Siblys BSP demo code so that Mario can explore our new creation without us having to do much coding.

Take Mark Sibly's files from the BSP demo and copy them into your BB3D Bsp testing directory. I also need you to copy the start.bb file that I believe is located in your BB3D Samples folder into your BB3D Bsp directory that you created.

Now open up the .bb file that contains Marks BB3D Bsp demo code. You will need to make two changes.

    • In the include statement use just include "start.bb", no need for the extra path information.
    • Second you will want to do a find for "loadbsp" and change the information in the quotes to "newmap.bsp"

Go ahead and run the program. If your lucky you will see Mario in the middle of the world that we have created. Hopefully it's textured. If you look up you will see the sky from the world outside of your bsp file. There is actually an interesting artifact that can be used to create windows from your bsp worlds out into your overall BB3D universe. But that will all be covered in a more advanced tutorial.

For now enjoy, run around and throw some fireballs!

When you're done you will probably want to do two things:

    1. Go back to the editor, click on one of the walls, a texture will appear in the lower left corner, double click on it and choose a different texture for your walls and/or floors and ceilings. (Remember to go through the four compile steps anytime you change anything and copy over all the same files, just to be safe)
    2. Go to the Quark website and take a look through the tutorial and learn of some of the basic features of the editor.

Final Note:

You will want to clean out the temporary output directory (at least the texture files) so that you are not copying over more files then are necessary.

Have Fun and feel free to e-mail me with comments or questions:

Comfixit

Joe@y-media.com


For a printable copy of this article, please click HERE.


This site is Copyright© 2000-2004, BlitzCoder. All rights reserved.