Creaphis
I will deliberately take a contrary position just for the sake of writing incredibly long arguments

Posts: 4051
Registered: 10-05 |
Something that I've suspected (and have been too lazy to confirm) is that the reason guided glides are still difficult is that it's actually harder than you'd think to get right next to a wall. While studying my west-to-east guideless glide demos, I noticed that as my y-coordinate slightly increased as I slowly approached the center of the gap from the south, my x-coordinate was such that there was always a tiny gap between me and the bars I was pushing directly into. I believe this can also be explained by what I know about Doom's movement code. When a player is moving directly into a wall that he's very close to, there comes a point where even the smallest possible forward movement is large enough to put the player inside the wall, meaning that the Doom engine will reject that movement and simply "slide" the player instead, in a direction parallel to the wall itself, so that the player remains just as far from the wall as when he started.
This is why we must rely on "drift" (the tiny amount of sideways movement when moving in a direction that is nearly orthogonal) to get ourselves into position, even when performing guided glides. The standard procedure for these glides is to move against the guiding wall, face the gap (or face 90 degrees away from the gap if strafing in) and make small movements into the gap until the glide succeeds. What's going on "behind the scenes" is that, first, the player gets close to the guide wall by moving into it, but doesn't quite manage to touch it. Then, as the player makes slow forward movements against the wall with the gap, Doom takes the sideways component of each of these movement vectors and tries to slide the player. Every individual sideways vector will be either be larger than, smaller than or equal to the distance between the player and the wall. When the vector is larger than the distance to the wall, Doom rejects the resulting player position as illegal and thus the player doesn't move. When the vector is smaller, the player will slide that much closer to the guide wall. When the vector and the distance are the same size, the player finally ends up exactly next to the guide wall, and thus can move freely into the gap.
Because it's possible to move only a single "micro-unit" (see my previous post on guideless glides) with sideways movement vectors, it should be impossible for a guided glide to "fail." Success is just a matter of feeding the Doom engine tiny forward movements until the sideways components of these movements slide the player all the way to the guide wall. Then again, there might not be a reliable way to move only a single micro-unit to the right while recording in vanilla Doom, as the player can't face 0.01 degrees to the right of a map axis unless his angle has been altered by punching/chainsawing. This would imply that guided glides where the guide wall is on the right side of the gap are more difficult. If this is actually the case, then an alternate method to handle these glides would be to make small backward movements, away from the gap, until the sideways components of these movement vectors move the player all the way to the guide wall. Then, the player should be able to slide cleanly through the gap, as long as he doesn't break contact with the guide wall. The important thing is that the player reaches the wall; this doesn't have to happen right at the gap's entrance, but can happen anywhere along the length of the guide. Once the player is touching the guide, he can slide through the gap smoothly, as many times as he pleases.
This explains why Paska is able to glide repeatedly and easily in his first "walless" demo. However, there's something else going on in these demos that I can't account for; I have no idea where the momentum wobble is coming from. Simple walls like these are not usually wobble-friendly surfaces. Maybe once you're directly touching a wall it's possible to build up momentum against it, but even that only explains the wobble in the first demo. Anyways, I'd like to just clarify one more thing: the glide in Paska's "walless2" demo isn't a guided gap glide - it's a wobble glide, which works for the same reason that the "Nirvana glide" is possible in the first place. As far as the engine is concerned, the player is running from one legal position inside of the yellow key doors to another legal position outside of them. The player has enough momentum when just inside the doors for his next position to be completely outside of the doors one tic later. The only difference between this wobble glide in this demo and the usual Nirvana glide is that in the normal case, the player's momentum comes from a run-up, while in this case, the player is able to build up momentum by running directly against the yellow doors for some weird reason.
|