# LEAKS This "tutorial" will hopefully educate you on the problem of leaks and how to use QERadiant to track down and fix them. As a rule of thumb, the more experience you gain as a mapper, the less leaks you should see. Following some simple guidelines and knowing what causes leaks is therefore our goal here. There are 4 reasons for a map to leak: 1. There is a gap between two or more brushes. The simplest cause of leaks is also the easiest to prevent. Keep your snap-to-grid to a minimum grid strength of 8 (keyboard shortcut 4). When clipping (carving) world brushes, ALWAYS carve to the grid. NEVER carve with a grid setting of less than 8. Maps don't need to be constructed at smaller settings unless you're doing detailed prefab work. Although I’m religious about using the snap-to-grid, odd-angled brushes may not mate perfectly. A slight overlap will fix the problem, but your map should be flexible enough to allow you to modify the brush. You have to ask yourself, ‘Do I really need this 31-degree angled wall?’ 2. Lava, water, slime, and other "non-solid" textures are not sealed up in "containers" to hold them. The rule of thumb for lava pits, water pools and such: build your structures just like you would the real thing. Build the swimming pool first. Once the "mortar" is dry (compiled), fill it with water. 3. Doors or plats do not have world brushes surrounding them. If your leak line is anywhere near a door or plat, this is the cause. Before I build elevators, plats, and doors, I compile the map first to check for leaks. Once done, I go back and start adding these entities. Build your elevator shafts first. Beginning mappers build with the idea that no one will see the bottom of a platform shaft. Then, when they run the BSP, that’s the first place Radiant finds a leak---right through the bottom of the shaft! 4. Entities are in the void. Most mappers make this mistake inadvertently. Lights, target_speakers, monsters, and misc_teleporters, will cause leaks if they are in the void. Other entities, such as plats, doors and misc_teleporter_destinations can be in the void when you run the compile. They will not cause leaks. If you get a leak error and you don't see Radiant's red line pointing to the leak, check for entities that you may have accidentally stuck inside a brush exposed to the void. ### Building A Leak-Proof Map I’ll assume you have a floor plan of your masterpiece. Shame on you if you don’t. Even if you don’t have the aptitude for drawing, or are using a CAD program for preliminary work, you can use Radiant. How? By laying down all the floors, or at least most of them. The screenshot below shows all the floors for the rooms, hallways & pits to be used in the map. Figure 2: All the "floor" areas are ready However you decide to lay down your ideas, make sure there’s some kind of plan. If you go about simply plopping down brushes, you’ll quickly find yourself wanting to change things because you didn’t plan for them. The second step is actually building the map one room at a time. Textures can be applied at this point, but they’re not necessary. As you build each room, seal the openings and run a FULL VIS –NO QRAD. Once the map checks good for leaks, remove the temporary plug(s) and construct the next section. Repeat this as you continue to add rooms. You NEVER want to try and build a complete map and then try and compile it for the first time. Figure 3: Completed rooms & hallway and textures applied--ready to move on! So what do you do when you finally get a leak? When you fail the VISibility check, Radiant will come up with the following error: In plain language, this spells L-E-A-K. Go to the FILE menu and select POINTFILE. A red line will instantly appear in your map. The camera will be placed somewhere near the leak, usually looking towards it. Follow the leak with the camera (cursor keys) until you find it. After you think you've fixed the problem, select File/Pointfile again to get rid of the red line. I usually open a DOS window and type QBSP3 mapname.map. If there's a leak, I then Alt-Tab back to the map editor and run File/Pointfile. CTRL-S to save the map and Alt-Tab back to DOS. Hit F3 to repeat the command. Repeat until you stop getting the leak. You'll generally find this method faster for leak hunting. Sometimes the camera will get positioned looking straight up or at some odd angle after running the PointFile command. If the 3D preview window proves too disorienting, press the End key to level the camera. AFTER YOU FIX A LEAK YOU MUST RE-RUN QBSP3 TO RE-COMPILE. Once the QBSP is re-done, and you show another leak, select FILE/POINTFILE again and repeat the process. You’ll know when all the leaks are fixed when the compile finishes without any error messages. That’s really all there is to it. Plan your maps. Use a large enough snap-to-grid. Stay away from overly ambitious brush shapes that make up your exterior brushes. Be meticulous in your work. Check often for leaks. Don't forget to let the wife know you're still alive.
Copyright 1999, by Terry DeLaney. Permission is granted to distribute this file as long as the author receives credit.