I will deliberately take a contrary position just for the sake of writing incredibly long arguments
This thread is probably going to be pretty useless for all the expert runners here, but I'm new to glides and still struggling to understand them so I'm writing this post mainly to help me solidify what I've been able to figure out so far. But, if this helps somebody else too, great! Comments are welcome.
It seems to me that there are two very distinct categories of glides that depend on different quirks in Doom's engine to work. They may almost be different enough to be considered as completely separate tricks. But, I'll stick closer to convention and call them "standard" glides and "wobble" glides.
Standard glides are those where the player squeezes his way through a 32-unit-wide gap. This gap must be aligned with the x- or y-axis of the map. To perform one of these glides, the player must line himself up with the gap, and move directly into it.* If there are no fractional components to the player's position or direction, and if the player is persistent in making small forward movements into the face of the gap, eventually the engine decides that there's really no reason that the player shouldn't be allowed in. Typical attributes of standard glides include:
- A smooth entrance into the gap
- Very little "wobbling" (vertical movement of the player's viewpoint, like when the player runs) or weapon bobbing
- Occasionally some jerky movement of the weapon sprite, as the engine struggles to decide what the player's position and velocity should be
- Unusually shaped gap entrances (ie. gaps where at least one of the linedefs that forms the gap is not orthogonal to the map's axes) may also trigger some elastic collision code when the player tries to enter them, pushing the player a small distance backward from the gap.
Wobble glides are perhaps an even more curious beast. I was recently flabbergasted by Mickaël Girard's DV.wad MAP02 UV SPEED demo because he uses a sort of glide that I didn't realize was possible at all. Previously I had only been aware of standard glides and glides through impassable double-sided linedefs, and this one was of neither sort. On second thought, though, I think that Mickaël Girard's glide and impassable linedef glides work for the same reason, and can be grouped together under the umbrella term "wobble glides."
First, I need to justify my use of the word "wobble." I believe that an important part of these glides is the fact that a wobble (again, vertical movement of the player's viewpoint) is momentum-preserving. Or, more accurately, when the engine considers the player as having momentum, even though the player may be standing still but pushing against some object, this momentum will display itself through visible wobbling. Furthermore, if the player is wobbling, and if the object in the player's way is removed, the player will instantly reach the full speed he would be moving at had the object not been in his way in the first place; there's no period of acceleration, like there normally is when the player starts moving from a stand-still. To see some "momentum-preserving wobbles" in action, read this thread and watch Grazza's demos. Also, a momentum-preserving wobble plays a significant part of my DV.wad MAP02 NIGHTMARE! SPEED demo - after teleporting to the top of the tower, I briefly build up a wobble against an impassable linedef, then slide off of the end of the line at the right moment, allowing me to shoot like a bullet towards the gate.
So, what do wobbles have to do with glides? I wouldn't know either if I hadn't fortuitously stumbled across some relevant info today. Included with Sylvain Chabert's built CO-OP NOMO run of MAP03 in 13 seconds (available on this page) is some very extensive documentation, which I only skimmed through to be honest. But, to summarize, it seems that when the player is moving quickly, it is possible for him to "cut corners." As long as the player's position is legal in successive game tics, Doom doesn't care if the player is partially inside a wall or other object "between" tics. When the player is moving at his top speed, this quirk is especially useful, because the player can be at two very different positions in two consecutive tics; there could be some seemingly-impassable object between these two positions, yet as long as each position is in itself legal, then Doomguy can just shoot past it.
This finally leads me to why wobbles are useful for glides. "Wobbling" allows the player to run at his top speed, while standing still! Therefore, if the player's current position is legal, and if there's another legal position not too far away, and there's a small obstruction in the way which the player can wobble against, then the player should be able to "run" past the obstruction, and thus perform a "wobble glide."
However, a tricky matter that I haven't quite been able to resolve is: exactly what obstacles can a player wobble against? It seems to me that the player can always get a good wobble going against impassable double-sided lines that the player would be able to move through if the lines weren't marked impassable (ie. the floor height on the opposite side of the line isn't too high for the player to step up) and against things. A great many already-existing wobble glides, to apply my term retroactively, are through "railings" and similar constructs, and it's no coincidence that these are typically built from impassable linedefs, which make for good wobbling. Fewer wobble glides involve things, because usually when a thing is in your way it'll either move or get killed, but a classic example is the "torch trick" - a wobble glide against a thing used in some speedruns of Doom 2 MAP19. Unfortunately, there's no clear rule about when you can wobble against impassable single-sided lines, or against high floors, or against low ceilings. It seems that at least two different linedefs usually have to be involved, and they must be arranged in some way that makes the Doom engine consider movement past this arrangement as plausible. I'm theorizing here that Doom's movement code makes a pair of checks before allowing a player movement. First, Doom looks at whether there's potentially enough room for the Doomguy in the direction that the player is trying to move, and if there is, then Doom gives the player thing some momentum and the wobble that comes with it. Then, Doom looks up some other data and decides whether the Doomguy actually moves. I can't read the source code so I can't confirm this theory, but it seems clear that the player's momentum and the player's movement depend on separate checks, whatever those checks may be.
Anyways, typical attributes of wobble glides include:
- A pronounced visible wobble as the player attempts the glide
- An instantaneous burst of speed when the glide succeeds
- Glide attempts are more likely to succeed if the player pushes into the obstacle with a higher movement speed.
- The exact angle of player movement is less important.
- Additional "momentum" from external sources makes these glides more likely to succeed, like when the player is struck by a cyberdemon's rocket during a glide attempt.
*There are exceptions to this second requirement, but they can probably be explained by differing map geometry. See my attached demo of a "slanted" standard glide on DV.wad MAP02.
This has been downloaded 29 time(s).