How To Compile Your Maps

If you want to learn about mapping or if you have problems with certain maps you are in the right place!
Post Reply
Xinored
VIP
VIP
Posts: 162
Joined: Fri Sep 01, 2017 7:24 pm
Answers: 0
x 19
x 200
Been thanked: 66 times
Contact:

How To Compile Your Maps

Post by Xinored »

The final stage of making a map is saving and compiling it.

A map must be compiled into format that can be runned by the engine before it can be played. This process involves calculating visibility, so that the computer can quickly work out which parts of the map need to be drawn at any given time, and calculating static lighting such as that from our light entity.

1. Before everything make sure to save your map and even to make backup copy if necessary. Make a habit to save often and before compilation because Hammer is crashing all the time for any reason. Also when you save for first time you gonna have 2 files - .rmf and .rmx. The .rmx file is actually a backup file and you can access it by renaming the ".rmx"extension to ".rmf".
You can easy save your map during mapping using "Ctrl+S" without having to open the menu and clicking "Save".

2. Now with that being said Click the "File" menu and choose "Save As...":
Image

Save as type .map, because this is the file that Batch Compiler need to run.



Remmember not to put spaces or symbols in your map name, and also don't make it long (more than 32 letters). Another thing that you need to know is than when you use "Save As" and save your file .map type then all the changes that you make in hammer will be saved in that file and not the .rmf file, so when you are ready to compile your map don't make changes after the save, just close the hammer or open your map from the .rmf file. Don't use .map extension to save your file in the process of creating your map, only use it to save different file for compilation that is separated from your main .rmf file. I hope i made it understandable enough.

3. Next step is to start your "Bath Compiler". Remember to open it as administator or it will give you compilation error. You can use the preset i put in the first guide to use the setting i use or you can see how i configure it from the screenshots.



4. Before you proceed with the copiling go to the CSG tab and check if the textures you are using in Hammer for your map are added aslo in the Batch Compiler!



Do not start copiling before you check that because if the textures are not added there, then the map will compile without them. That means the missing texture will be replaced with "white" texture in your map or if its a "special" texture with properties then your map may not compile at all!
REMEMBER WHEN YOU ADD NEW TEXTURES OR CHANGE THE EXISTING ONE IN HAMMER THEN DO THE SAME IN THE BATCH COMPILER!
In future guide i will explain how to add more texures to hammer and how to create them by yourself!

5. The next important setting you need to check is "Vis type" in the "VIS" tab. Down below in batch compiler its described what it does, but simply explained when you use "Full VIS" force the compiler tool to make more calculation about your map's geometry improving your fps in some areas, but SIGNIFICANTLY increasing your compile time. To put it ever more simple, if you want to compile map like nojarq_neighbourhood using your old laptop with Full VIS it would take a MONTH (probably even more). The fast setting is the exact opposite - fast compile, shittyfps at some areas of map. If possible always compile your maps in normal or full VIS.


(Optional: before starting compiling you can include “Additional game parameters:” in your map if you feel the need for that, but that's for more advanced mappers)

6. Now its the time to start compiling the map. Click on button "Run" and the compilation process will begin. The Compile Process Window will show the progress of the compile (though it may stop updating if it takes a very long time). In the meantime your CPU will be loaded to 99%, so be carefull if you compile on laptops that easy overheat! Also processing something that requre similar high use of CPU ( like games, rendering software, etc.) may cause crash of the Compiling Process or even your PC! When the compile is complete you should see something like this:



If you see the console and the notepad ending with "----------------- END hlrad ----------------" that means your map was successfully compiled and can be played in cs 1.6!

More About Compiling

The process of creating a playable counter strike map starts with an editor file. This file contains all the polygon data (aka brushes), entity data and texture data that will define how your finished map looks and acts. Once you have built a level in your Hammer and saved it to disk for safekeeping you will want to playtest it in CS 1.6 to see how it turned out. To make sure that all your entities are working properly, that your lighting is correct, and that you have no bad "brushwork".
Compiling means converting a raw .map 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: CSG, BSP, VIS and RAD. When pressing "Run", your Batch Compiler is started executing the four stages after reading your .map file:

1. Executing CSG (Constructive Solid Geometry) program against your .map file. One of the main things it does is "doing" everything about the textures in your map.

2. Executing the BSP (Binary Space Partition) program against the .map file. - reads the data of the objects in your map and checks for data errors.

3. Executing the VIS (Visibility Index Set) program against the new .bsp file - makes a compiled BSP map and embeds visibility data into it. VVIS tests which visleaves can see each other, and which cannot.

4. Executing the RAD (Radiosity) program against the .bsp file to add lighting information - akes a compiled BSP map and embeds lighting data into it. VRAD's static and pre-compiled light is bounced around the world with a radiosity algorithm.
7 .On your desktop you can see bunch of filles that was created during the compilation. The only one that conserns you is the .bsp file. The next step is moving your now finished .bsp to your cstrike/maps folder and then trying it in CS 1.6 by typing "connect 'mapname' " in your game console. If your map start normally or if its laggy depends all of the way you edited it in Hammer before compiling. If you done everything correctly then congratulations - you have compiled your first map! If you see compilation error of somekind, don't fall in despair that happens all the time, you just have to figure what the error is from the compilation log and fix it in the Hammer editor.

OPTIONAL STEP FOR MAPS THAT ARE READY TO BE COMPILED FOR SERVER USE
If you want to add your map in existing server you need to add one more tool to your Batch Compiler. That tool is RESGenerator. To expain it simply you ff a player connects to a server with your map, and doesn't have your custom WAD file, sound file, or any number of other files, this RES file helps the server automatically send it to them (this also depends of the hosting). RESGen utility helps you in building a RES file for you. To use this tool, simply click and drag a .BSP file into the application icon of ResGen. A window should pop up and signal that a .RES file has been created in the same folder where the same .BSP file is located. Basically, .RES files provide what .BSP files require in order to function properly (this includes .WAD files). You can also include it in your Batch Compiler to use everytime when you compile a map. When the compilation is complete you need to copy both .bsp and .res files.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests