Slime trail

A slime trail is vertical band of texture which "bleeds" out towards the edges of the screen. It can occur when a level has not been built properly because of a bug in the node builder, but will also occur frequently as a natural consequence of the Doom engine's map format even in perfect node builders.

Within the map, vertex coordinates are only stored as integers. In normal map editing, vertices may only be placed at integer coordinates. During BSP building, however, lines may need to be split into segs at a location that has non-integral coordinates. The BSP builder ends up having to chop a significant amount of precision out of the coordinates of its generated vertices, and as a result, segs may end or begin far short of where they need to be placed for a mathematically correct BSP. This results in an open subsector, and the flat of the subsector will bleed out at the location of the offending vertex. Any open subsector will display similar behavior.

A slime trail can occasionally be so severe as to span the entire screen, in which case the floor texture can be seen to meet the ceiling texture in the center of the screen. This type of slime trail is very rare, but one can be spied when the view angle is tangent to one of the sides of the star near the exit of Doom II MAP09: The Pit.

Lee Killough initially created an optional heuristic in the algorithm of the BSP node builder utility which would attempt to avoid seg splits which would result in a high degree of round-off error. This fix can seal up a vast majority of slime trails that other node builders would generate, but it is far from flawless.

When Lee began work on the MBF port, he decided to investigate a possible engine-side fix to the problem. Within the game engine, vertex coordinates are converted to fixed-point numbers. Using the law of cosines, MBF and its descendant ports attempt to project vertices which are used only by segs (and not by the ends of linedefs) back toward the linedef to which the segs belong.

Slime trails are not usually associated with lines that are exactly horizontal or vertical, because round-off error on those lines will place the vertex at some point along the line, generating no opening. MBF avoids testing vertices along such lines in interest of maximum efficiency.

Note that even MBF's algorithm cannot repair all slime trails, and thus they must remain an accepted part of editing maps for the Doom engine.

ZDBSP's extended nodes (supported by ZDoom-derived source ports but also by PrBoom+/GLBoom+, use fixed point coordinates for vertex position, allowing to greatly reduce the loss of precision for compatible source ports.