Jump to content

What we don't know about Doom


Zed

Recommended Posts

When you exit a level, your body vanishes into thin air, only to reappear at the next level. Pretty simple logic, but eh, just a thought. =3

Share this post


Link to post
  • Replies 121
  • Created
  • Last Reply

Top Posters In This Topic

The linedef skips explanation is not quite complete.

scifista42 said:

But what if the player was originally standing right in front of the linedef (possibly touching it, but still being on the same side of it), and was moving across it with a high-enough speed so that his bounding box would be completely off the linedef in his next position? The answer is: The function would abort itself near the beginning, collision wouldn't be detected, contact with a special line wouldn't be detected either, the linedef wouldn't be added to the array of touched special linedefs, the engine wouldn't find the linedef in the array when it checks the array later, so it would never check it for being potentially crossed, and that's how the special linedef gets skipped.


This part is correct for the south and west directions based on some testing I just did.

scifista42 said:

EDIT: Since player's movement speed is capped at 30 mu/tic, and his radius is 16, then putting 2 special linedefs behind each other with an exactly 15 map units wide gap between them should 100% guarantee that at least one of them will always be activated when the player runs across them. Actually, 14 map units would be too little and 16 map units too much for the gap to be truly foolproof.


16 map units would most likely be fine for most cases because in order to be in between both linedefs you'd need a .000000 coordinate which would be quite difficult. However, movement speed could go beyond 30 mu/tic with wallrunning, which is where this explanation fails. East and north linedefs generally are not crossable with the same method; even if you are close to it on the first tic and beyond it on the next, you won't skip the linedef (except in a couple examples I encountered while sliding alongside a wall, one is a bonus demo for my Scythe map 31 NM-Speed on the normal exit). In general, you need wallrun speed (at least 32 mu from what I heard) to cross linedefs east and north, and the rules are unclear to me personally. That said, I'm not sure if you can skip two linedefs that are 15 units away from one another that way anyway as I am not sure what the exact requirements are for the skip to happen at all.

Also, I'm not sure how this extends to diagonal linedefs because of the fact that different orthogonal directions work in different ways.

Share this post


Link to post
DoomzRules said:

When you exit a level, your body vanishes into thin air, only to reappear at the next level. Pretty simple logic, but eh, just a thought. =3


Freud said something about the mind repressing the unpleasant memories from your head. It's pretty obvious that we are simply replaying Doomguy's memories of storming various places, and that the trips in between them must have been so unspeakably horrible, we don't see those; Doomguy blotted them out from his memory. All the time we thought we was a badass marine without fear? Well, the second part is wrong, Doomguy only wants to remember the times he wasn't so afraid.

Share this post


Link to post
Royal_Sir said:

Freud said something about the mind repressing the unpleasant memories from your head. It's pretty obvious that we are simply replaying Doomguy's memories of storming various places, and that the trips in between them must have been so unspeakably horrible, we don't see those; Doomguy blotted them out from his memory. All the time we thought we was a badass marine without fear? Well, the second part is wrong, Doomguy only wants to remember the times he wasn't so afraid.


That theory actually sounds fairly reasonable. Even the most badass marines suffer from PTSD (Post-Traumatic Stress Disorder). Doomguy probably suffers the worst case, because of all the fucked up shit he's seen in Hell, the demons, and other shit.

Oh and Sgt. Ramirez... bro, the names and back stories you came up with for the demons.... it makes me lol so hard whenever I play Doom and I encounter those demons. I just keep picturing that shit in my head. XD

Anyway, yeah Doomguy probably represses the traumatic shit, because well... there's probably a lot more horrible gory stuff that goes on that we don't see.

Of course Brutal Doom touches on this a bit, but not too much (I mean the gore is designed to be cartoony and over-the-top, not realistic and scary. =P)

So yah.

Share this post


Link to post
4shockblast said:

1. 16 map units would most likely be fine for most cases because in order to be in between both linedefs you'd need a .000000 coordinate which would be quite difficult.
2. However, movement speed could go beyond 30 mu/tic with wallrunning, which is where this explanation fails.
3. East and north linedefs generally are not crossable with the same method; even if you are close to it on the first tic and beyond it on the next, you won't skip the linedef
4. That said, I'm not sure if you can skip two linedefs that are 15 units away from one another that way anyway as I am not sure what the exact requirements are for the skip to happen at all.
5. Also, I'm not sure how this extends to diagonal linedefs because of the fact that different orthogonal directions work in different ways.

1. I consider super-perfect bots / TAS tools of the future as well as super-lucky scenarios nowadays to be possible, so I'd only be satisfied with such a foolproof solution that is perfect, and 15 units should have been perfect in theory.
2. Alright. What's the very maximum wallrun speed per tic? If it's finite and specific, then there must exist a finite and specific amount of linedefs that, when put behind each other with a gap of 15 units, should form a perfectly unskippable setup.
3. Really? I wonder if that's actually true (have a demo?) and how is that possible? Is the (player's) movement logic for moving east/north somehow radically different from moving south/west?
4. With a speed higher or equal to 46 mu/tic, the skip could succeed under perfect conditions. In theory, that is.
5. The gap between the 2 (or more) linedefs could be larger, up to 16*sqrt(2) map units for a 45-degree line. Again, in theory. And I'm still quite curious how exactly is it possible that skips work differently based on direction.

Share this post


Link to post

The speed is only capped to 30 mu/tic in either X/Y direction. Their vector sum is 42 mu/tic and only achievable if you travel at an angle of 45+90n degrees, so treatment of movement direction in Doom is NOT isotropic, which leads to all sorts of glitches like slides, glides etc.

Share this post


Link to post
Maes said:

The speed is only capped to 30 mu/tic in either X/Y direction.

If the player's movement speed is capped at 30 mu-tic in either X/Y direction even during wallrunning, then 2 linedefs with a 15 unit gap between them (or 2 diagonal ones with a little larger gap) should be truly unskippable.

Share this post


Link to post
DoomzRules said:

That would make for a good theory. Everyone here should make a reddit account, and start posting Doom theories. Why? The more Doom theories that MatPat sees, the more he sees that there is a huge Doom community, and makes a Doom video.

I mean he makes Zelda videos for the Zelda fans (you and I included). So surely he can make Doom videos for us Doom fans!

=3 Come on guys, we can rip and tear the Internet a new one! (ok that didn't sound right. =P)


I've never heard of MatPat before this thread, and frankly I'm not interested in it. You've made your call for action once, please let's leave it at that.

(edited to be a bit kinder)

Share this post


Link to post
ABRACADABRA said:

in the Visit to id video it's clearly seen that exit rooms is actually airlocks, since they contain another large mechanical door in it. so, basically, when you hit the switch, you shut the lock down. they probably removed the doors to not confuse people.


It makes sense since the intermission map shows the different bases so spread out apart.

Share this post


Link to post
Jon said:

I've never heard of MatPat before this thread, and frankly I'm not interested in it. You've made your call for action once, please let's leave it at that.

(edited to be a bit kinder)


MatPat is a Youtuber who makes videos on his channel called "Game Theorists" where he basically explains the ridiculous and seemingly impossible things in video games with logic, such as science and reason.

Sometimes though... he does happen to be wrong, like the whole Link is Dead bullshit video he made... Link isn't dead in Majora's Mask! He'll never be! He was always alive!

*mumbles to self*

Anyway, I did make my call to action once, I'm just asking people to help me out on Reddit and hopefully see if whether or not we could get Game Theorists to make a Doom theory video, besides he has like over a million subscribers. A million potential Doom customers.

^_^

Share this post


Link to post
scifista42 said:

1. I consider super-perfect bots / TAS tools of the future as well as super-lucky scenarios nowadays to be possible, so I'd only be satisfied with such a foolproof solution that is perfect, and 15 units should have been perfect in theory.
2. Alright. What's the very maximum wallrun speed per tic? If it's finite and specific, then there must exist a finite and specific amount of linedefs that, when put behind each other with a gap of 15 units, should form a perfectly unskippable setup.
3. Really? I wonder if that's actually true (have a demo?) and how is that possible? Is the (player's) movement logic for moving east/north somehow radically different from moving south/west?
4. With a speed higher or equal to 46 mu/tic, the skip could succeed under perfect conditions. In theory, that is.
5. The gap between the 2 (or more) linedefs could be larger, up to 16*sqrt(2) map units for a 45-degree line. Again, in theory. And I'm still quite curious how exactly is it possible that skips work differently based on direction.


1. I made a test wad with 16 units between two consecutive linedefs and bruteforced a demo where I land exactly 16 units away from the first linedef and I don't trigger that one, but I do trigger the second one on that exact tic by being exactly on it, so 16 units should be fine. This isn't too surprising knowing how tricks like Plutonia map 25 work where you trigger a teleport linedef by gliding into the wall to the exact coordinate of the teleport (I did a similar trick in one of the Abyssal sessions).

2. Max wallrun speed in an orthogonal direction is 60, twice the normal movement cap, though with standard strafe50 you can reach about 46-47 or so.

3. It's actually true and I have tested it, along with many other runners; I could create a demo where I try the same trick you would try with a south/west linedef and not skip it, though I don't have one off-hand. Even with manual testing, it would be easy to figure out that you're going to get far fewer linedef skips east than south just by trying both types of skips many times with strafe40. I do have a demo where I don't need wallrun speed while sliding on a wall; it's for Scythe map 31 and available as a bonus file for my NM-Speed.

As for how the skips in different directions work differently, it probably has something to do with how movement in general works differently in those directions for many tricks (glides, grabs, and wallruns), and I'm not sure why because I'm not familiar with the Doom source code. As far as I know, wallruns are believed to work because Doomguy's momentum is counted twice, but I dunno what effect this may have here. Wallruns also work differently east as opposed to north (north ones are significantly easier), so I'm not sure if that difference is reflected in the mechanics linedef skips in some way either. In the same way, south and west may have differences that are more subtle.

It's also possible to wallrun one tic south (and possibly west?) as shown in the Scythe 2 episode 2 UV-Speed TAS for the rocket jump on map 2 of the episode. I don't know if it's possible to wallrun any further south, but the speed as seen in XDRE on the wallrun is over 50 units in one tic, which may also be exploitable for linedef skips.

Share this post


Link to post
DoomzRules said:

Seriously, that's another problem I have with my generation today. People don't think for themselves, they'd rather be a byproduct of some massive Orwellian corporation or whatever. And people would rather listen to crappy generic boom boom rap shit, then listen to some awesome heavy metal, death metal, or thrash metal.

=(

I don't know man, I recognize a lot of what you're saying from when I was your age back in the mid-to-late 90s, namely in relation to music. Don't think it's just your generation.

Royal_Sir said:
Freud said something about the mind repressing the unpleasant memories from your head. It's pretty obvious that we are simply replaying Doomguy's memories of storming various places, and that the trips in between them must have been so unspeakably horrible, we don't see those; Doomguy blotted them out from his memory. All the time we thought we was a badass marine without fear? Well, the second part is wrong, Doomguy only wants to remember the times he wasn't so afraid.

That's a neat theory - I always just thought that the game cut out a boring, uneventful trek across an empty, rocky waste (on Phobos and Deimos at least), but your suggestion works really well for Hell.

Share this post


Link to post
4shockblast said:

1. I made a test wad with 16 units between two consecutive linedefs and bruteforced a demo where I land exactly 16 units away from the first linedef and I don't trigger that one, but I do trigger the second one on that exact tic by being exactly on it, so 16 units should be fine.

This actually does depend on the direction you were running into, even in theory, because even if you're standing right on top of a linedef, the engine has to decide whether you're on the right side or on the left side of it (no middle value allowed), and it basically performs a test whether you're on the right side of the line, and if not, it proclaims you to be on the left side of the line. If you land on top of a linedef, and the engine decides that you're still on the same side as you were before, it wouldn't get triggered. So, 16 units aren't 100% fine for the gap width.

EDIT: Proof:

Spoiler

//
// P_PointOnLineSide
// Returns 0 or 1
//
int
P_PointOnLineSide
( fixed_t	x,
  fixed_t	y,
  line_t*	line )
{
    
    [...]
	
    if (right < left)
	return 0;		// front side
    return 1;			// back side
}


//
// P_TryMove
// Attempt to move to a new position,
// crossing special lines unless MF_TELEPORT is set.
//
boolean
P_TryMove
( mobj_t*	thing,
  fixed_t	x,
  fixed_t	y )
{
    
    [...]
    
    // if any special lines were hit, do the effect
    if (! (thing->flags&(MF_TELEPORT|MF_NOCLIP)) )
    {
	while (numspechit--)
	{
	    // see if the line was crossed
	    ld = spechit[numspechit];
	    side = P_PointOnLineSide (thing->x, thing->y, ld);
	    oldside = P_PointOnLineSide (oldx, oldy, ld);
	    if (side != oldside)
	    {
		if (ld->special)
		    P_CrossSpecialLine (ld-lines, oldside, thing);
	    }
	}
    }

    return true;
}

Share this post


Link to post
scifista42 said:

This actually does depend on the direction you were running into, even in theory, because even if you're standing right on top of a linedef, the engine has to decide whether you're on the right side or on the left side of it (no middle value allowed), and it basically performs a test whether you're on the right side of the line, and if not, it proclaims you to be on the left side of the line. If you land on top of a linedef, and the engine decides that you're still on the same side as you were before, it wouldn't get triggered. So, 16 units aren't 100% fine for the gap width.


Perhaps, but I just did a quick test in the west direction, and it doesn't matter there either, so 16 units is fine in the relevant directions (i.e., the ones that don't require wallrunning). That's assuming that you can't make use of really fast south wallruns for a single tic, which I still don't know the exact rules for.

Share this post


Link to post
dsm said:

I don't know man, I recognize a lot of what you're saying from when I was your age back in the mid-to-late 90s, namely in relation to music. Don't think it's just your generation.
That's a neat theory - I always just thought that the game cut out a boring, uneventful trek across an empty, rocky waste (on Phobos and Deimos at least), but your suggestion works really well for Hell.


Yeah that's true. I think everything started going to shit in the mid 90's for music to be honest.

Anyway, the whole Doomguy repressing his traumatic memories really works out IMHO, because to be honest... I think Doomguy would suffer PTSD but like a thousand-fold.... poor Doomguy.... I wonder how the fuck he goes on after Doom 2....

Share this post


Link to post
4shockblast said:

Perhaps, but I just did a quick test in the west direction, and it doesn't matter there either, so 16 units is fine in the relevant directions (i.e., the ones that don't require wallrunning). That's assuming that you can't make use of really fast south wallruns for a single tic, which I still don't know the exact rules for.

I think you can abuse the south/west wallrun for a tic (or longer) to skip two line defs that are 16 units away from each other.
As far as I know, the max speed for doomguy is sqrt(60²+60²) ~ 84.85distance/frame which is fast enough to go through walls. Not counting the 'warp' in the void when the x and y coordinates flips to the other side of the map.

Share this post


Link to post

Regarding why the revenant is too big to be a human skeleton, it's because it's not human. The manual describes it as a demon that was reanimated after death to fight again.

That fucking tank looks scary.

Share this post


Link to post
Looper said:

As far as I know, the max speed for doomguy is sqrt(60²+60²) ~ 84.85distance/frame which is fast enough to go through walls. Not counting the 'warp' in the void when the x and y coordinates flips to the other side of the map.


There's no way you can achieve such a speed with regular inputs, not even when exploiting SR50 and wallrunning, and not even by propelling yourself with a rocket.

Even if you can exceed the thrust amount imparted by controls alone (BTW, I made a table of the effective speeds, expressed mu/tic, measured by coding an actual per-tic tachometer into a source port), your speed will be dynamically limited by the MAXMOVE constant in P_XYMovement(), which prohibits moving more than 30 units in either the x or y direction. I don't know where you got that 60 mu/tic figure from.

However, it is possible that the vector sum of x an y exceeds 30 mu/tic, resulting in that 42 mu/tic number.

Share this post


Link to post
Maes said:

There's no way you can achieve such a speed with regular inputs, not even when exploiting SR50 and wallrunning, and not even by propelling yourself with a rocket.

Even if you can exceed the thrust amount imparted by controls alone (BTW, I made a table of the effective speeds, expressed mu/tic, measured by coding an actual per-tic tachometer into a source port), your speed will be dynamically limited by the MAXMOVE constant in P_XYMovement(), which prohibits moving more than 30 units in either the x or y direction. I don't know where you got that 60 mu/tic figure from.

However, it is possible that the vector sum of x an y exceeds 30 mu/tic, resulting in that 42 mu/tic number.


Wallrun speeds go up to 60 because they are double normal max movement, which is why the fastest theoretical wallrun speed would be diagonal and would be sqrt(60²+60²). I'm not sure where you get the max wallrun speed in that post, as it isn't limited by 30 in orthogonal directions even with normal strafe50 which goes up to about 47, i.e. double the normal max strafe50 speed.

Share this post


Link to post

I'm actually in the process of researching / compiling a big post about Doom player movement to put an end to this confusion and misinformation once and for all.

Share this post


Link to post
4shockblast said:

I'm not sure where you get the max wallrun speed in that post, as it isn't limited by 30 in orthogonal directions even with normal strafe50 which goes up to about 47, i.e. double the normal max strafe50 speed.



In p_local.h:

#define MAXMOVE		(30*FRACUNIT)

In P_XYMovement() in p_mobj.c:
//
// P_XYMovement  
//
#define STOPSPEED		0x1000
#define FRICTION		0xe800

void P_XYMovement (mobj_t* mo) 
{ 	
    fixed_t 	ptryx;
    fixed_t	ptryy;
    player_t*	player;
    fixed_t	xmove;
    fixed_t	ymove;
			
    if (!mo->momx && !mo->momy)
    {
	if (mo->flags & MF_SKULLFLY)
	{
	    // the skull slammed into something
	    mo->flags &= ~MF_SKULLFLY;
	    mo->momx = mo->momy = mo->momz = 0;

	    P_SetMobjState (mo, mo->info->spawnstate);
	}
	return;
    }
	
    player = mo->player;
		
    if (mo->momx > MAXMOVE)
	mo->momx = MAXMOVE;
    else if (mo->momx < -MAXMOVE)
	mo->momx = -MAXMOVE;

    if (mo->momy > MAXMOVE)
	mo->momy = MAXMOVE;
    else if (mo->momy < -MAXMOVE)
	mo->momy = -MAXMOVE;
		
    xmove = mo->momx;
    ymove = mo->momy;
	
    do
    {
	if (xmove > MAXMOVE/2 || ymove > MAXMOVE/2)
	{
	    ptryx = mo->x + xmove/2;
	    ptryy = mo->y + ymove/2;
	    xmove >>= 1;
	    ymove >>= 1;
	}
	else
	{
	    ptryx = mo->x + xmove;
	    ptryy = mo->y + ymove;
	    xmove = ymove = 0;
	}
....

The parts which limit the maximum possible momentum/impulse are right at the start, while the parts which cause a speed decay to MAXMOVE/2 are right afterwards (it doesn't help that the concepts of momentum/force and speed are not clearly separated). No matter how high of an impulse you impart to Doomguy, the maximum final achievable speed will never exceed 30 mu/tic in either x/y direction, even with the -turbo options (which do however improve acceleration and top speed), but top speed is really the product of a delicate balance between dynamic slowing, friction etc., it's not as easy as saying "with impulse X you'll get speed X".

Actually, the impulse values used for running and walking (40/25) result in effective mu/tic speeds of about a third of their values (16.667 and 8.333 accordingly).

I'm not sure exactly how wallrunning defeats the second check (which SHOULD limit speed to even less than 30 mu/tic, to about 15 mu/tic in either direction), but it certainly never exceeds MAXMOVE mu/tic in x/y, or sqrt((MAXMOVE^2)+(MAXMOVE^2)).

I guess the easiest way to check any of the above is to measure player position before and after his thinker function has been called, and display the speed in the HUD.

Linguica said:

I'm actually in the process of researching / compiling a big post about Doom player movement to put an end to this confusion and misinformation once and for all.


What for? Some random lamer is gonna post "Doomguy runs at 60 mph" and a whole new can of worms will be opened up, while our posts catch dust.

Share this post


Link to post

Maes, I guess the "double of the capped speed per tic" happens as a result of P_XYMovement being called twice in the same tic, or maybe the "do { } while" loop repeating itself inappropriately. Don't ask me where and how, I don't know, but 4shockblast seems to be certain about it being real.

Share this post


Link to post
scifista42 said:

I guess the "double of the capped speed" happens as a result of P_XYMovement being called twice in the same tic.


Still, the checks would catch that, and still limit the nominal impulse to 30 mu/tic per axis. However, they would indeed double the distance travelled distance, so even with the forced speed and distance, Doomguy would effectively travel the full 30 mu/tic per axis.

I guess that there must be some other mechanism which bypasses P_XYMovement's checks or cumulatively adds speed by calling it multiple times per tic, so effectively, the rules in P_XYMovement (which are pretty clear, and seem foolproof, at least under "normal" circumstances) no longer apply to a single whole tic but rather to 1/2, 1/3 or even 1/4 of a tic.

Share this post


Link to post

I'm not familiar with the source code at all, so I don't know how it works in theory. What I do have is experienced TASing and I've seen these speeds in XDRE, so I am not a "random lamer" as you said. Nor is Looper, who is even more experienced in TAS than me.

Share this post


Link to post
4shockblast said:

so I am not a "random lamer" as you said


Well, you didn't say that Doomguy runs at 60 mph, so no, you're not :-p

In any case, if practice shows a major discrepancy with the theory, then there must be some element missing, in particular, the assumption that P_XYMovement gets called exactly once per tic must be somehow wrong, because otherwise the function itself looks quite clear cut. TBQH, most explanations of how wallrunning work etc. do not explain how they manage to circumvent that anal, conservative guardian that is P_XYMovement()... any new insights would be helpful here.

However, as pointed out, a hint might be that speed seems to build up only in multiples of the "kosher" allowable speed as per P_XYMovement.

Share this post


Link to post

It has just occured to me that P_XYMovement calls P_TryMove to execute the movement. P_TryMove is the function that both detects special walkover linedefs and executes their actions immediately if the movement succeeds. Even if P_XYMovement was called twice a tic, it shouldn't make special linedefs any more skippable than if it was called just once in a tic and then for the second time in the next tic. So if it does so in practice (but does it really?), the explanation must be elsewhere... At least probably.

Share this post


Link to post
Maes said:

What for?

Because your post is wrong, that's why.

Here's a hint: P_XYMovement limits player "momentum" (which is a bad term to use for it, but whatever) to <= 30. For a momentum >= 15, it sets a value to half the momentum, and then if P_TryMove with that halved value fails, it calls P_SlideMove. Check P_SlideMove and see what momentum value it uses: is it the halved value from P_XYMovement, or is it the FULL value of the player momentum?

Anyways, this sort of thing is why I am researching it to write up a big post that goes through the movement code and explains how everything happens: straferunning, wallrunning, thingrunning, door trick, item bumps, bar glides, linedef skips, void glides, etc.

Share this post


Link to post

Due to doubts of east/north linedef skips I'm going to post the testwad I was using for linedef skip testing and a demo where the skip fails northward in a situation in which it would pass in the south or west directions. In the demo, on tic 94 player speed is ~22.7, and the distance from the linedef I am trying to skip (linedef 6) is ~2.9. On the next tic, the distance from that line is ~19.9, which is greater than 16, and yet I still activate the linedef.

Link to demo and wad: https://www.dropbox.com/s/szydwyp42fbhgwf/north_skip_fail.zip?dl=1.

Share this post


Link to post
Maes said:

There's no way you can achieve such a speed with regular inputs, not even when exploiting SR50 and wallrunning, and not even by propelling yourself with a rocket.


Yes you can. I think your table is correct except the wallrun values should be doubled. 60, not 30. 84, not 42.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...