Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Hellbent

I can go up the stairs, but not down. (?)

Recommended Posts

In Doom (at least zdoom, maybe it's different in vanilla) you can't fall into a 32 wide impression, but you can step up out of one. Hence, when you go up stairs that are 32 in depth with ceiling 56, you can go up the stairs, but not back down. Well, I always wondered why this was and never was able to see the logic of it, until I tried going down the basement stairs at my new apartment I recently moved into. I have to duck in order to go down the basement stairs so as to not hit my head. But I have no problem going up the stairs. I don't hit my head and I don't need to duck. Why is that? I don't know. Nevertheless, I guess it does make sense that I can go up 32 deep stairs with 56 ceiling but I can't go down them.

Share this post


Link to post

You are right, fraggle, and Hellbent is also right, because he means 32 as the step width, not height.

Share this post


Link to post
Hellbent said:

you can't fall into a 32 wide impression

Yes, you can. It's kind of like a glide though, requiring precise positioning and some degree of fiddliness.

Share this post


Link to post

Thanks Memfis. So, then, what is the logic for this programming? And why do I hit my head walking down the stairs in my apt, but not going up them? Hmmmmm.

@Grazza: can I load that .lmp in zdoom using a -complevel setting?

scifista42 said:

You are right, fraggle, and Hellbent is also right, because he means 32 as the step width, not height.

Yes, thank you scifista42. I don't know how to better word it. If I say "32 wide" then it might sound like I am talking about a really narrow staircase, and I am not.

Share this post


Link to post
scifista42 said:

You are right, fraggle, and Hellbent is also right, because he means 32 as the step width, not height.

Oh right, I misunderstood the meaning of "depth" in this context. Apologies.

The notion of stairs you can go up but not down is kind of interesting. Has this been used in any levels at all?

Share this post


Link to post
fraggle said:

The notion of stairs you can go up but not down is kind of interesting. Has this been used in any levels at all?

I hate the stairs in Doom E4M6, they are almost the same. Located left side in the moat, behind a secret(?) door.

Share this post


Link to post
fraggle said:

Oh right, I misunderstood the meaning of "depth" in this context. Apologies.

The notion of stairs you can go up but not down is kind of interesting. Has this been used in any levels at all?

I've done it accidentally a few times. I recently made a DM map where I did it intentionally to block access to an area from one direction.

Share this post


Link to post
Hellbent said:

I don't hit my head and I don't need to duck. Why is that? I don't know.

When you're moving forward, you're leaning your body forward as well. The result:

The stick figure climbing the stairs is leaning in the same way as the roof, while the figure going down the stairs is leaning the opposite way and bumping its head on the roof as a consequence.

Share this post


Link to post

I really wish you'd misspelled the title differently, I could have wowed you with my vast knowledge of sitars.

Share this post


Link to post
Grazza said:

Yes, you can. It's kind of like a glide though, requiring precise positioning and some degree of fiddliness.


I don't think this synced up right because all he did for me was fall into the river and wiggle about. I opened it in PrBoom+

Ignore this I didn't realise it was meant to be opened with MM2

Share this post


Link to post

Yes, I suppose that is what it is, Gez. I don't notice my tilt going up and down the stairs, (though I am a stick figure) so this concept didn't really occur to me.

Share this post


Link to post
fraggle said:

The notion of stairs you can go up but not down is kind of interesting. Has this been used in any levels at all?

That wiki page began, indeed, because yours truly had just seen it somewhere in Maximum Doom or D!ZONE 150.  (By the ergodic hypothesis, every possible vanilla trick was used once in shovelware.)

Whether it was deliberate is harder to say of course, although IIRC it was a gotcha in that you needed a certain key/switch to open the door at the top, and if you'd missed it, you were forced into a huge backtrack (since you couldn't just turn around and go down the stairs).

Share this post


Link to post

That wiki page ought to be rewritten for clarity.



Basically you need at least two steps, each no wider than the player (and possibly considerably narrower). The engine moves the player by taking the player's current momentum and determining how far it should move in the next tic, and then checking that spot to see if it's a valid place for the player to move. On the way up, it first checks the player's horizontal movement and then makes sure there's no floor/ceiling stopping it, which there isn't, since the final position is valid.

Of course, there's the STEP ITSELF in the way, but the engine is specifically written so that if a step is 24 units or less the player will instantly teleport to that new height level. Notably, there is no such special clipping logic for if the player is going to bump his head on a small outcropping in the ceiling. So when trying to come down, it checks the player's horizontal movement and notices that there is a ceiling hanging down to bang the player in the forehead and gives up.

So is it possible to "fix" this? Of course! We could just change:

	if ( !(thing->flags&MF_TELEPORT) 
	     && tmceilingz - thing->z < thing->height)
	    return false;	// mobj must lower itself to fit
to something like:
	if ( !(thing->flags&MF_TELEPORT) 
	     && tmceilingz - thing->z < thing->height - 24 * FRACUNIT)
	    return false;	// mobj must lower itself to fit
And then the player will automatically "duck" under the top edge of the low step ceiling and go back down just fine!

Share this post


Link to post
Linguica said:

That wiki page ought to be rewritten for clarity.

Perhaps the same could be said of most religions wiki pages.

Share this post


Link to post
fraggle said:

The notion of stairs you can go up but not down is kind of interesting. Has this been used in any levels at all?

iirc, Map08 of Alien Vendetta uses this.

Share this post


Link to post

I've used them in D2INO MAP07, in Mancubi/Arachnotron teleport closets (inaccessible by the player) to force the Mancubi/Arachnotrons moving into a certain way but not back. The stair widths were equal to diameters of said monsters, 96 and 128 respectively.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×