Saving and Compiling
The final stage of making a level is saving and compiling it.
A map must be compiled into the format read by the engine before it can be played. This process involves VBSP creating the map, VVIS calculating visibility, so that the computer can quickly work out which parts of the map need to be drawn at any given time, and VRAD calculating static lighting such as that from our light entity.
- Click the “File” menu and choose either “Save” or “Save As...”:
- Since this is the first time you’ve saved the map, a “Save As...” dialog will open no matter which option you chose. Type a name for your map into the “File Name” field.
- Click the “Save” button to save the map to disk.
The map is saved in the uncompiled .VMF file format.
You have saved your map to VMF, which is a text format. You will need to compile it before it can be played in a game. Compiling means converting a raw VMF file into the binary BSP format. The map’s geometry is processed and the proper lighting and shadows are pre-calculated by a series of compile programs: BSP, VIS and RAD.
- Open the File menu, and choose “Run Map...”.
- The dialog that appears is used to set up a compile:
- Make sure that “Normal” is set under “Run BSP”, “Run VIS”, and “Run RAD” settings.
- Under “Additional game parameters:”, type “
-toconsole -dev -console +sv_lan 1”.
- Now click the “OK” button to start the map compile process.
The Compile Process Window will show the progress of the compile (though it may stop updating if it takes a very long time). When the compile is complete, the game you are mapping for will automatically launch and load your map in the engine.
Congratulations, you’ve made your first map!
Here’s a shot of the compiled map running in Half-Life 2: Deathmatch. It isn’t much to look at yet, but it has the basic pieces you need to get started making your own maps.