Wallrunning

Wallrunning can occur when a player runs along a straight wall (either normally or by straferunning) while in contact with it. The player will be accelerated to a speed that is greater than normally attainable.

Wallrunning is triggered when the following criteria are met simultaneously:
 * The player is running North along a North-South wall, or East along an East-West wall
 * The player's northbound or eastbound speed exceeds a specific threshold.
 * The player is moving against the wall in order to "slide" alongside it, without losing momentum in the northbound or eastbound direction.

The player will begin moving at approximately twice the appropriate speed, ceasing only when the player stops running, encounters a corner, or changes direction (e.g. by being hit by a monster).

Wallrunning in deathmatch
An agile player can exploit this bug as a speedrunning or deathmatch tactic, taking advantage of North-South and East-West walls to dodge projectile attacks or move quickly between distant areas of a map. Its use in deathmatch play is limited however, because it requires that:


 * The level must contain a straight north-south or east-west wall in the appropriate place(s);
 * The player must determine which way is north, possibly during a fast-moving firefight;
 * The player must rapidly orient himself at the desired angle to the wall and;
 * The player must wait for the acceleration to begin.

Exceptions
On rare occasions, wallrunning can also be done westward along a one-sided wall, or along walls of other orientations (for instance, West-North-westward along linedefs 106, 119, and 39 of DMPRTL2.WAD from Maximum Doom). In addition, because sprite “footprints” on a map are square rather than round, this same acceleration can occur along one edge of a long row of aligned obstacles, where it is referred to as “thingrunning”.

Technical
When a player encounters an obstacle, the game will attempt to "slide" the player alongside the obstacle. Presumably to improve the accuracy of collision detection, at high speeds the game will not simply try update the player's position using their full momentum, but instead halves the momentum, and then uses that halved momentum to move the player twice in a row, with the idea being that two half-steps are equivalent to one full step. However, if the game determines that during the half-step it must slide a player along the wall, it will calculate the amount of sliding distance using the original momentum, not the halved momentum. The same process is repeated for the second half of the player's momentum, thereby effectively doubling the player's effective momentum and thereby the distance traveled.

The bug only occurs when the player is traveling quickly enough to the North and/or to the East. This happens because the player's path is not split into segments unless his X or Y movement is greater than a certain amount. However, no check is performed to see if the player's speed is smaller than the negative of that threshold (i.e. the player is traveling just as fast South and/or West), so the bug is not invoked.

Wallrunning can only happen moving within a narrow range of angles relative to the wall, because the player's northbound or eastbound motion must be fast enough for the bug to occur. When a player slides alongside a wall, the velocity or momentum is adjusted to slow the player down. If the player is moving nearly parallel to the wall, then he will not slow down a significant amount, allowing him to move at the required speed continuously to invoke the bug.

It is possible for wallrunning to occur on angled walls, but this is very rare because it is more difficult to maintain the required speed in the North or East direction, and also because elastic collisions with walls can frequently disrupt the player's movement unpredictably.

Demo files

 * [[Media:d213wrb.lmp|The wallrunning bug]] (file info) on MAP13: Downtown
 * [[Media:e3m6wrb.lmp|The wallrunning bug]] (file info) on E3M6: Mt. Erebus