Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Creaphis

I need expertise on vanilla engine quirks.

Recommended Posts

I remember playing some map once where something interesting happened. I was on an elevator sector, moving upwards, and far above me was a small sector next to the elevator which contained a shotgun guy. This shotgun guy was firing constantly, and I mean constantly - he fired over and over again, always as soon as possible. None of these shots hit me, of course, because of a vast height difference between us.

Yesterday, I tried standing within melee range of a shotgun guy on a high ledge, and he made no attempt to attack, which is a shame, because I was hoping to get him to hit a shootable switch which would create a huge shortcut in the level in question.

So, what would cause a shotgun guy to attempt to attack someone far beneath them? Maybe moving elevators screw up height difference calculations in the monster attack code? Maybe the incident I remember has no root in reality?

Share this post


Link to post

There are many possible causes, including REJECT tables causing monsters to ignore you or the sergeant just never getting a positive lock on you (especially if he was roaming restlessly).

Share this post


Link to post
Maes said:

There are many possible causes, including REJECT tables causing monsters to ignore you or the sergeant just never getting a positive lock on you (especially if he was roaming restlessly).


You mean that a shotgun guy should attempt to attack a player far beneath him, and the case where he doesn't is the strange one?

Share this post


Link to post

Were there even any height checks for attacks? I thought there was just a line of sight check. That made walking a thin high ledge without killing all monsters at the ground first a rather unfair situation.

The most strange monster behavior regarding height differences I've seen is in Forge.
As soon as you activate the long lift, the baron of hell suddenly jumps from the far bottom up on the ledge.

Share this post


Link to post

Reading over these last posts I can see I wasn't very clear about the situation. It's like this:

-I, the player, am standing immediately next to a shotgun guy. Our hitboxes are touching, or are very close to touching, from a bird's eye view perspective. One could say we are within "melee range" of eachother.
-However, the shotgun guy's sector is very far above my sector. Very far. I can only see that the shotgun guy is next to me through use of the IDDT cheat.
-I remember playing a map where the above situation came about, and the shotgun guy attempted to attack me repeatedly, but having no melee attack he fired his gun, and as he was so high above me, his attacks flew over my head and were harmless to me.
-This memory may be a false memory, but, as is the nature of all false memories, I don't think it's a false memory.
-Now, in another map, the shotgun guy refuses to attack from up on his ledge, even though we are within "melee range".
-I just checked with RMB, and can say conclusively that the shotgun guy can see into my sector.
-No direct LOS exists between me and the shotgun guy. The only reason the shotgun guy would attack is because we are within melee range.

Should the shotgun guy attempt to attack me?

LogicDeLuxe said:

The most strange monster behavior regarding height differences I've seen is in Forge.
As soon as you activate the long lift, the baron of hell suddenly jumps from the far bottom up on the ledge.


Right. It's because of this sort of effect that I think that being on a moving elevator will have somehow made the shotgun guy in my remembered example believe that I was within LOS.

Ugh. The sentences I have to construct to speak of this unambiguously are absolutely hideous.

Share this post


Link to post

I initially didn't find anything exceptional or unusual in the fact that you were being attacked by a monster on a ledge higher than yourself, even if extremely higher, due to activation and aiming being based exclusively on LOS (however only melee attacks are likely to connect over such height differences).

I get attacked by insanely high ledges all the time, even if very close.

However mentioning being on a moving lift made me realize that attacks are more frequent/persistent in that case, but this could just be wishful thinking.

Share this post


Link to post
Creaphis said:

Yesterday, I tried standing within melee range of a shotgun guy on a high ledge, and he made no attempt to attack, which is a shame, because I was hoping to get him to hit a shootable switch which would create a huge shortcut in the level in question.

Can enemies trigger shootable switches?

Share this post


Link to post
Creaphis said:

-Now, in another map, the shotgun guy refuses to attack from up on his ledge, even though we are within "melee range".

Did you check if he was actually walking? Maybe, his center point was over the ledge, which make monsters stuck.
Should be easy to check with IDDT and close zoom.

Share this post


Link to post

Hmm, well I'm no expert on the DOOM engine, but what port were you using? zDoom at least has z-clipping, so it might be possible to collide with a monster without alerting him if you are using zDoom since you're passing under him and not truly colliding; however, in classic Doom you would collide and alert him. If it was an imp it could also attack you, as seen in the Ultimate DOOM demo of Perfect Hatred which I'm sure you've all seen plenty. Sorry if I'm on a totally different subject than what you're talking about.

Share this post


Link to post

In complevel 9 at least (maybe complevel 2) occasionally a monster gets stuck half way off a ledge. Sometimes when that happens it triggers some sort of weird 'shoot repeatedly' behavior in the monster, so like a cyber might shoot 9 shots instead of 3. But usually the 'being stuck' wins out over the 'shoot repeatedly' and then finally the monster shuts the fuck up and stands helplessly not shooting any more.

Share this post


Link to post
gggmork said:

In complevel 9 at least (maybe complevel 2) occasionally a monster gets stuck half way off a ledge. Sometimes when that happens it triggers some sort of weird 'shoot repeatedly' behavior in the monster, so like a cyber might shoot 9 shots instead of 3. But usually the 'being stuck' wins out over the 'shoot repeatedly' and then finally the monster shuts the fuck up and stands helplessly not shooting any more.

Maybe that's what Creaphis was doing? Is that sergeant right on a ledge?

Share this post


Link to post
gggmork said:

But usually the 'being stuck' wins out over the 'shoot repeatedly' and then finally the monster shuts the fuck up and stands helplessly not shooting any more.


This is actually exploited in Cybie, as not waking the Cybies up (foreplay) before the uhm...actual action, will result in a volley of rockets to your fayce, mayte, despite them being stuck to begin with.

Share this post


Link to post

See, I already knew that Doom does take some height differences into account when deciding whether a monster should attempt to attack you or not. Carmack knew to take more into consideration than a purely 2D line-of-sight check. You never hear an imp on some high-up sector throwing fireballs at its feet, fruitlessly. A chaingunner will never waste his bullets if a raised sector stands between the two of you. My thought was that being within melee range with a monster might bypass this more complex height-informed LOS calculation and cause the monster to attack regardless of relative verticality. After some quick tests (which can be readily performed in existing Doom areas, like the big room in Crusher) I can tell you that:

-A monster on a ledge very high above you will not attempt to attack you, even if you are directly next to it. It will only attempt to attack you if it can see you. A good rule of thumb is that if you can see its sprite, with the biggest possible viewport, but without freelook, then it can see you.
-A monster in a pit very far below you will also not attempt to attack you unless it can see you (the same conditions for sight exist as in the above point)
-A monster in a pit very far below you will attempt to attack you if the player thing hangs over the ledge in such a way that the center of the player thing is over the lower sector. At that point, monsters in the lower sector are tricked into thinking they can see you, and can attack with both melee and missile attacks, because there's no height difference between the monster's position and the player's ostensible position, I guess.

So I find that melee attacks have no special status when it comes to LOS checks. The reason that we are always plagued by hungry demons at the bottoms of cliffs is that, in these instances, the player is already most of the way into that lower area. Also, I find that what I was hoping to accomplish certainly couldn't work, so I guess I'll just let the cat out of the bag and let you all know what that was:



I'm working on improving my Sky May Be speedrun, and it crossed my mind that a pretty epic shortcut would be possible if the shotgun guy in this area could be coaxed into firing, by my presence far below. (The area in the screenshot will be easily recognized after playing the level or watching a demo.) But it doesn't work. Yes, the shotgun guy is alerted. No, he isn't stuck.

exp(x) said:

Can enemies trigger shootable switches?


Heck yeah they can. Once that hitscan attack is flying it doesn't matter who it came from, as far as a switch is concerned.

Share this post


Link to post
Creaphis said:

You never hear an imp on some high-up sector throwing fireballs at its feet, fruitlessly.

Which would require to actually have real feet. But Doom handles each thing as a simple box. Also I often see fireballs throuwn right into my direction, but hitting some map geometry, eventhough I didn't move since it was fired. Thus, I assume there is a line of sight check, but it doesn't take the size of the fireball into account. And I've also seen fireballs with a very steep trajectory.

A chaingunner will never waste his bullets if a raised sector stands between the two of you.

Like a line of sight check prevents this.

It will only attempt to attack you if it can see you. A good rule of thumb is that if you can see its sprite, with the biggest possible viewport, but without freelook, then it can see you.

Are you sure, there is a vertical field of view limitation for monsters? I remember being scratch by imps and bitten by demons at great heights.


-A monster in a pit very far below you will also not attempt to attack you unless it can see you (the same conditions for sight exist as in the above point)
-A monster in a pit very far below you will attempt to attack you if the player thing hangs over the ledge in such a way that the center of the player thing is over the lower sector. At that point, monsters in the lower sector are tricked into thinking they can see you, and can attack with both melee and missile attacks, because there's no height difference between the monster's position and the player's ostensible position, I guess.

Sounds like a simple line of sight check to me. And this pretty much proves that the monster's vertical field of view is not limited.

Share this post


Link to post

I'd do a nomonsters run and idclip up there and see if you can shoot the switch from that location yourself. If the actual shootable part is tucked away in a lower sector or something it might not work. Did you mean 'free doom' would be enough to watch that demo by the way? I have shareware doom1.

Share this post


Link to post

It's my understanding that the bad guy's "eye sight" level is 3/4 of it's height and it will perform its ranged attack, if a line can be drawn from there to the centre of the player.

All hitscan and missile attacks unless specially altered (i.e. the Revenant's missile) come from the centre of the attacker.

Bad guy melee attacks (the players melee attacks are short range hitscan attacks) simply check wheter the target is a certain distance horizontally.

Share this post


Link to post
Creaphis said:

Heck yeah they can. Once that hitscan attack is flying it doesn't matter who it came from, as far as a switch is concerned.

Monsters can trigger GR-DoorOpenStay switches, but I don't think they can trigger the G1-RaiseFloorToLowestCeiling or G1-RaiseFloorToNextFloorTxTyTrg linetypes.

Share this post


Link to post
LogicDeLuxe said:

Are you sure, there is a vertical field of view limitation for monsters? I remember being scratch by imps and bitten by demons at great heights.


Alright, I guess not, but the point I'm trying to make (which still seems to be contested) is that a ledge between the monster and the player will block the line-of-sight and prevent any sort of attack.

printz said:

Monsters can trigger GR-DoorOpenStay switches, but I don't think they can trigger the G1-RaiseFloorToLowestCeiling or G1-RaiseFloorToNextFloorTxTyTrg linetypes.


Interesting. This is a GR-DoorOpenStay switch, but thanks for the trivia.

Vermil said:

Bad guy melee attacks (the players melee attacks are short range hitscan attacks) simply check wheter the target is a certain distance horizontally.


This is something I have already disproved. I think you're right about the nature of the LOS calculation, but wrong that melee attacks don't also depend on it. If the height difference between the monster and player is great enough, then an intervening ledge may block that line.

gggmork said:

I'd do a nomonsters run and idclip up there and see if you can shoot the switch from that location yourself.


Yes I can, in fact this is the intended approach to the level. Guys, can't you just load SKYMAYBE.WAD and satisfy your own curiosity? All you need to know is in my last post.

gggmork said:

Did you mean 'free doom' would be enough to watch that demo by the way? I have shareware doom1.


Oh. I guess you can't. I guess freedoom would work, which would add even more wondrous incoherency to the project's sprites. I'm just surprised that you don't own full Doom 1, which is cheap and easy to acquire even by legal methods.

Share this post


Link to post

If the player is 1 unit over a ledge. A Demon 1000's of unit's above/below will be able to bite you.

This is because the player is in the Demon's line of sight and the melee code only checks if the player is within a certain distance horizontally.

Share this post


Link to post

Wrong, Vermil. Try it. According to evidence, the player is out of the demon's line of sight unless the demon can see the center of the player object.

Share this post


Link to post
Creaphis said:

According to evidence, the player is out of the demon's line of sight unless the demon can see the center of the player object.

He sure is in the demon's line of sight though,

Vermil said:

If the player is 1 unit over a ledge.

Share this post


Link to post

There are two checks on bad guy melee attacks.

The "centre" is a "line" dead in the middle of the player that goes from the top of the hitbox to the bottom.

The first check is that the bad guys line of sight intersects the players "centre".

Once a line of sight has been confirmed, it is then checked wheter the player's "centre" is within the melee range on the X and Y axis.

Doom does not check the Z axis with the second check and thus is why a bad guy 1000's of unit's above or below you can perform a melee attack on the player.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
×