Leaks, Pointfiles, and You
The goldsource .lin problem has now been noted further down thanks to Muzzle, ZL, and Pepper.
As mappers, at some point in our mapping careers we have had a leak.
Leaks can be found all over from being simple "duh." mistakes that can be fixed instantly, to being extremely
annoying small holes that sometimes take hours to find.
Luckily we no longer have to 'find' them. Hammer now does it for us by generating what are called pointfiles.
Pointfiles do exactly what you might think from the name. They "point
" a mapper to the exact placement of the hole causing your leak, reguardless of how technically hard it is to find. It will even point out leaks that happen through unsealed displacements.
Where Do We Start?
First we will start with a basic example of a pointfile.
We'll start by making a classic box room. In it should be a light
of some form and an info_player_start
. Now, and this will be the only
tutorial at twhl that will say this, punch a large gaping hole or two into the side of your box. With that out of the way, go ahead and compile your map. Just make sure "Don't run the game after compiling
" is checked, as we dont need to open the game over the course of this entire tutorial. (Hit F9 or click on the compile button.)
Now take a minute to look at your compile log. In it somewhere you'll find a line that looks something like:
- Entity light_environment (188.72 257.11 1.00) leaked!
Note that your entity might not necessarily be an light_environment
, but it will be an entity. This can be a point or a brush entity.
Now navigate to this entity in your 3D camera view and leave the camera looking at it. We will now load the pointfile. Go up to the top left of your hammer screen and click on Map
, then navigate down and click on Load Pointfile
A box should now come up asking if you want to "Load the default pointfile
". Every time you compile a map with a leak in it, the default pointfile is overwritten with the pointfile of the last map you have compiled. This means, when you click yes, the pointfile is automatically loaded for the map you're working on. Conversely, if you compile a map with no leaks, the default pointfile is deleted.When using any goldsource version of hammer, click no when prompted to loading the default pointfile. When the file selection box comes up, select the default .lin file instead.
Your pointfile should now be loaded. If you'll look at your 3D view (which should be aiming at the leaked entity from earlier), there will now be a red line coming from it. This red line also appears in all of your 2D views. This red line is what pointfiles are all about. If you follow this red line, it will lead you directly
to your leak. (It's important to note that pointfiles dont compile into your map in-game. The red line only appears in hammer.) While this example leak is extremely
obvious, your map's leaks might be a bit harder to find.
Opening a pointfile works the same in any map that you're working on. The only difference is that your pointfile might require a bit more camera navigation skill to follow your red line. Another thing to mention is that pointfiles are somewhat unpredictable in terms of how many leaks it will reveal at any given compile. Some pointfiles have shown me every single leak in a map while others show only one leak at a time. The leaks being right next to each other doesn't make a difference. The same rules apply to all holes in the map reguardless of where they are located.
Pointfiles and Cordoning
If it shows you every leak, consider yourself lucky. It doesn't happen that often. On the other hand, if it's showing you only one at a time, you're probably not going to want to compile your map over and over again if you have several leaks.
A solution to this is cordon compiling. It allows you to section off portions of your map for specific area compiling and pointfiling as opposed to your entire map. If your map is large and detail intensive, the odds of you having the time and patience to compile over and over again to find a single leak each time is very little.The cordon compiling tutorial will be written.. eventually.
Until then, mess with the two black/yellow caution tape buttons towards the top of hammer.
Use cordon boundaries to section off portions of your map that are likely to have leaks in them and use pointfiles in that way. Yep, i'm sectioning off almighty cylinder room first. (Imagine this map is really detailed and that the compile time is huge)
Now you should have a pretty good grip on how to use pointfiles. If in the future you find this tutorial to save you a lot of leak finding time, feel free to tell me about it in the comments :>