Welcome to my(Q11) tutorial on hint brushes, part one. In this
tutorial I will explain the uses of the hint brush surface attribute, that are not covered
in the "Hint brushes
and sky bug" tutorial.
Hint brushes are a technique to
decrease in game r_speeds, the speed of game flow, and are extremely usefull in everything
from sp, to ctf, to even dm maps. I won't bother explaining why in this tutorial,
I'll leave that to my follow up. So to be blunt, hint brushes speed up yer level,
and there is no down fall except you can't always use it(that's where area portals come
in, but that's another tutorial as well).
Let's begin........
The hint brush surface attribute is
a flag, because by the defenition of flags and content surface markings it is a flag, but
most places describe content as "has to be all faces", and this is also true of
the hint brush. Hint brushes should be also marked as nodraw, and no other
attributes. You're best off just using id's hint texture found in every texture
directory.
The first thing you
need to understand is Line of Site(LoS). For our purposes this is mearly a straight
line(straight being the direction and angle we're looking in) from any pixel to any point
on the map. So we have to ask ourselves, at what angle can I stand and see only one
pixel, or row of pixels, at a time in that room from this hall? I'll use the first
indoor hallway in base1 as an example. Now id didn't use a hint brush here, but they
could have, and it's a perfect example. Here is the base drawing of the hall's basic
layout.
Room A is the starting room of base1, room B is the u shaped room attached to the canal
and the hall leading to the end. Now to the point. When walking from room A to
B, at what point would your LoS first see room B? Let's draw a line displaying this
imaginary point and LoS.
Keep in mind the limitations of pixels, this line is infinitly small and would all but
touch each wall. Point 1(in red) is the point of the player, though he could never
get close enough to the wall, this is the point we use. Without limitations, imagine
this perfect line and perfect spot. I won't explain why we need this info, but will
keep it simple and tell u what u should do now.
We will now draw a line representing the hint brush. It is the first game unit beloe point 1, and stretches all the way accross the hall and into the walls, but no further.
Keep in mind that the number 1 is a label to a point, not the point, the point is
infinitly small. Simple enough to add to a level, and very helpfull in speeds.
Now you don't actually draw the LoS line, u aproximat it's position, and when in
doubt put it ferther away from "point 1" in the direction the player is coming
from. You can now do the same thing as if the player was coming from the other
direction and it will not affect the first hint brush. This tool is usefull in any
situation when two rooms, with "portals" or door like holes, are seperated by a
hall. There will be more info on using hint brushes in my follow up tutorial, as
well as exactly why it works, if the tutorial is complete it will be linked below.
///Q11