Appendix C: Bot Navigation

Currently unwritten. See Noxdrop/Smart Path Finding Grids



Just like there can be vis "leaks" in a map there can also be clipping leaks. Two things can be wrong when the BSPC tool outputs that a map leaks.
  1. There are no entities in the map at all, or all entities that are actually in the map are placed in solid locations (see Test Solid below). In this case the BSPC tool outputs: "WARNING: no entities inside." The map must contain at least one player start entity to load in the game.
  2. There is a spot in the map where players can go outside the map into the void. This is bad, players should never be able to fall out of a level. In this case the BSPC tool outputs: "WARNING: entity reached from outside." The BSPC tool also writes a mymap.lin file that can be loaded in the Q3Radiant editor to show lines that go through the actual leak.

Make sure the .lin file is stored in the same folder as where q3radiant stores the .bsp file. Load the map in q3radiant and use the menu > File > Pointfile... to load the .lin file. A thick red line will be shown in the map. Follow this line to find the leak.

Useful Map Information

The following information is given as a reference for bot capabilities. The area file information is used by bots. It tells them when and where they can make jumps. Human players don't have this information readily available to them, so you may want to be more forgiving when designing tricky jumps.

Map Boundaries
Currently all the contained area of a Quake III Arena map should fall within the bounds (8192, 8192, 8192) - (-8192, -8192, -8192) for the bspc tool to compile. These are the same bounds as the Q3Map compilers.

Game Physics
Player Dimensions
Model size: The player model's actual size is a bounding box 30 units by 30 units square with a height of 56 units. In the game world, eight units roughly equal one foot (30.5 cm). From this, we deduce that the characters are a heroic 7 feet tall (2.13 meters).

Step Heights
For scale purposes, "normal" steps should be no higher than 8 units. However, the maximum value that a player may step up is 18 units (just keep steps 16 units or lower).

Normal Jumps
The maximum height for barriers the bots will jump on is 32 units.

Water Jump Heights (or "Everyone, out of the pool!")
The maximum distance that a bot may jump to exit water is 18 units. This is the height difference between the water surface and the adjacent floor that the bot is jumping onto. If the water jump height is made higher, human players will have a hard time getting out of the water.

Rocket Jumps
With normal gravity and without the quad, the maximum rocket jump height is around 280 units (you can sometimes jump a few units higher but this is a safe value for reference). In practice, except for especially tricky jumps, this value should be substantially lower. Test rocket jumps repeatedly before settling on a final height.

Math for Map Makers
Here's some math to calculate some other values of interest:

Gravity = 800;
Jump velocity = 270;
Max vertical rocketjump velocity = 670;
Max run velocity = 320;
Max step height = 18;
Max jump height = 0.5 * gravity * (jumpvelocity/gravity)*(jumpvelocity/gravity);
Max normal jump height = 45 units
NOTE: even though this is the mathematical maximum jump height always keep the the 32 units maximum barrier height for bots in mind when building maps.
Maximum horizontal jump distance over a gap from one spot to another when both are at the same height:

Because players use a bounding box we can jump a full bounding box width further in the ideal case. (15 units at the jump starting position and 15 at the landing place).

Again, remember that this is the mathematical maximum which players can only reach under ideal circumstances.