Doom Wiki

Slime trail

3,481pages on
this wiki
Add New Page
Add New Page Talk10
E1m1 slime trail

The slime trail in Doom's E1M1: Hangar may have inspired the name of this phenomenon.

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.

As a note for map builders, most slime trails can be repaired by moving sectors around and changing the place of the vertexes. However, since they are natural bugs in the engine node builder, slime trails sometimes can simply not be removed - the WAD will end up having a small "flaw". Just like it is stated above, though, most players will not mind slime trails, if they notice the flaws at all.

Also on Fandom

Random Wiki