Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
peach freak

TNT Map30 Cyberdemon stuck on stairs

Question

About midway through Map30 of TNT, you get to a big room that has the Red Key up on a tower, and the Cyberdemon placed in front of the switch that builds the stairs around the tower. In front of the switch is a set of stairs. I've noticed that the Cyberdemon never completely comes down the stairs (and won't come out into the big, open area), and will stay on the stairs or go up to the top areas and fight you there. At first, I assumed that one of the lines on the stairs was marked as block monster, preventing him from crossing that step, but none of the lines on that set of stairs are marked as block monster. It's a tall area, so his height isn't an issue either.

 

After taking another look, I noticed the floor height from the ground to the first step increases by 16 units, while the remaining steps increase by 8. What is the height limit for how far down a monster can drop from one sector to another? I know the player can climb up sectors as long as the floor height difference between the two sectors is no more than 24 units, but this would be the opposite. Is that the same limit for how far a monster can drop down from one sector to another, or is it a lower threshold? Could the size of the Cyberdemon also be an issue here, as he might be over several sectors at once, which might tell the game that one of the stairs is too much of a drop for him (he's 80 units wide, each step is 32 units wide, so his bounding box can be in three of those steps at once, correct)?

 

Thanks.

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 0

24 units is also the maximum height a monster can step both up and down. This has an extra wrinkle, if the steps are too narrow for the monsters radius, the relevant step height can be too big for the next step to be allowed.

Share this post


Link to post
  • 0

Monsters basically have a step height limit of 24, but with one additional caveat: The step must be wide enough to actually fit their entire self up/down it. In other words, to traverse the step, they must be able to fully "stand" on the step.

 

So basically, the fact he's 80 wide means he couldn't possibly go down a 32-wide step. It'd instead try to put him on a step below that, which then fails the step height check.

Share this post


Link to post
  • 0
6 minutes ago, Dark Pulse said:

Monsters basically have a step height limit of 24, but with one additional caveat: The step must be wide enough to actually fit their entire self up/down it. In other words, to traverse the step, they must be able to fully "stand" on the step. 

They can handle multiple height changes, as long as they don't exceed 24 units. So you can have 8 units tall steps that are half the monster's width.

Share this post


Link to post
  • 0

Ok, that makes much more sense. I took a screenshot of the section of the map and put the Cyberdemon in a hypothetical spot. I marked the floor height differences in between each sector that the Cyberdemon is standing in here. The four sectors where the Cyberdemon's box is in have a floor height difference of 32, from the leftmost one to the rightmost one. The green line shows how far down the steps I've seen the Cyberdemon get down, before turning away and heading back up.

 

Does the game calculate that the area the Cyberdemon wants to walk into has a >24 floor height difference between all of the sectors his body will be crossing into, and then denies him that?

cyberdemonstepstnt.png

Share this post


Link to post
  • 0
47 minutes ago, ViolentBeetle said:

They can handle multiple height changes, as long as they don't exceed 24 units. So you can have 8 units tall steps that are half the monster's width.

That's what the "It would then fail the step height check" part addresses.

 

The floor the Cyberdemon is on is -64. Each step down is -8 (except for the last, which is -16), and to fit the cyberdemon's width, you need 80 units. The stairs do nominally meet this (the linedefs are 192 wide by 32 long), but we're actually looking at the step LENGTH in this case, not the width, since that's the direction the Cyberdemon is traveling, so it breaks down like this:

  • The first step's front linedef is at (160, -672). This isn't enough to fit the monster, so it goes to the next one.
  • The second step's front linedef is at (128, -672). This isn't enough to fit the monster, so it goes to the next one.
  • The third step's front linedef is at (96, -672). This isn't enough to fit the monster, so it goes to the next one.
  • The fourth step's front linedef is at (64, -672). This is finally big enough to fit the Cyberdemon (160 - 80 = 80). However, to step down past this line, it's a height difference of 48, so the game fails the step check. It then would look to the next-most previous one, which is 24 high but not big enough to fit the cyberdemon's width.
  • The end result: The Cyberdemon doesn't step down, because the game thinks it doesn't have enough room to fit it; the step distance at 24 units gives only 64 units of width for the Cyberdemon total, which isn't enough to allow it to move.

Basically, if these stairs were 40 wide instead of 32, the Cyberdemon should walk right down them with ease (as then it's 120 units of length at the 24 height distance, and 80 - exactly what it needs - in the worst-case scenario of the first two steps). 32-long ones, however, are too little for it to move with that much height variation.

 

33 minutes ago, peach freak said:

Ok, that makes much more sense. I took a screenshot of the section of the map and put the Cyberdemon in a hypothetical spot. I marked the floor height differences in between each sector that the Cyberdemon is standing in here. The four sectors where the Cyberdemon's box is in have a floor height difference of 32, from the leftmost one to the rightmost one. The green line shows how far down the steps I've seen the Cyberdemon get down, before turning away and heading back up.

 

Does the game calculate that the area the Cyberdemon wants to walk into has a >24 floor height difference between all of the sectors his body will be crossing into, and then denies him that?

cyberdemonstepstnt.png

Basically, yes. The total width of it must be able to fit within that 24-height limit, or it will not proceed. With that, its back end is 32 higher than its front end would be if the game were to allow the step, and so the game logic won't let it go. (Similar logic is actually what allows a player to travel up 24-unit high steps, but not down them if the ceiling is under 56 units height difference - the game performs the "forward" check before the height one in both cases, IIRC.)

 

If the steps were a bit longer (again, 40 units would fit it on exactly two steps), it should be able to completely traverse the staircase, as then its entire width would fit on steps that are guaranteed to have a height step distance never greater than 24, which is what the game needs to have it fully traverse the staircase. In a nutshell, as long as no part of the monster's bounding box will have a difference of more than 24 units at any one time, it will be able to fully traverse the stairs, but the instant that moving forward would need a height difference of more than that, it will balk and double back.

 

EDIT: Just tested that change, and yes, the Cyberdemon walked both up and down the stairs with zero issues.

Edited by Dark Pulse

Share this post


Link to post
  • 0
On 4/4/2021 at 3:12 AM, peach freak said:

Ok, that makes much more sense. I took a screenshot of the section of the map and put the Cyberdemon in a hypothetical spot. I marked the floor height differences in between each sector that the Cyberdemon is standing in here. The four sectors where the Cyberdemon's box is in have a floor height difference of 32, from the leftmost one to the rightmost one. The green line shows how far down the steps I've seen the Cyberdemon get down, before turning away and heading back up.

 

Does the game calculate that the area the Cyberdemon wants to walk into has a >24 floor height difference between all of the sectors his body will be crossing into, and then denies him that?

cyberdemonstepstnt.png

 

Back in 2017, scifista42 posted a good explanation of enemies climbing/descending stairs. Basically, it boils down to this: the monster's entire hit box cannot cover a height difference of more than 24 units in one movement. There's some additional details regarding speed, which is why fast monsters with wider hotboxes (like demons) are more likely to run into these sorts of difficulties, but those additional details are better described in the aforementioned scifista post.

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
×