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

Very weird bug(?) - video and demo provided

Recommended Posts

Yesterday, as usually I was doing something I was not supposed to and this time it was running 5minmap.wad which requires boom compability with -complevel 2. This resulted in witnessing one of the weirdest things I've ever seen in Doom. Tried if the same happens in original EXE and yep, here's a demo recorded with Doom2.exe v1.9.

For your convenience I also just created a Youtube account so I could upload it as a video (BTW, fuck you for forcing GoogleHIV+, Google :P):


(Demo played back with GLBoom+ 2.5.1.4)

You start in a somewhat well-lit area, there are some monsters in front of you and everything seems OK. But as you step to the darker area the monsters refuse to attack you and more weirdness occurs.

Here's is the summary of what I found out so far:

- Monsters are still chasing you but never attack you if you're in the "untouchable" area.
- A monster will only attack you if you or the monster (or both) are in the "vulnerable" area.
- Monsters can infight only if at least one of them is inside the "vulnerable" area.
- Monsters that have longer attack sequence (Arch-vile, Cyberdemon, Mancubus) will finish the attack even after you get out of the "vulnerable" area.
- Similar thing as above will also happen if a monster is just about to attack you as you're leaving the area - it will finish the attack. Monsters with continuous attack (Chaingunner, Arachnotron) will stop the attack very shortly after.
- For the monsters to change their pacifist behavior it's enough if you or them are partially in the "vulnerable" area. Thing's whole box doesn't need to be there.
- Both you and the monsters can't take any splash damage in the "untouchable" area. Your rockets won't even bump you away if you fire them up close.
- Arch-vile can't hurt you if you're both in the "untouchable" area at the moment of the hit. You'll take full damage from him if you're in the "vulnerable" area. If the Arch-vile attacks you from the "vulnerable" area while you are in the "untouchable" one, you will take 20% HP damage (i.e. no splash damage).

The exact same behavior occurs every time I load the map and no weirdness happens if I actually use the correct compability.

I have some questions and 1 little request, if you will:
- Can some Doom expert explain what the hell is happening here? Is this some BLOCKMAP or REJECT stuff gone wrong?
- Could someone more creative and with map-making skills possibly use this as a feature in their map?

EDIT:

Found another quirk:
If a monster is about to attack you as you're in the "vulnerable" area and it gets hit by another monster while they're both in the "untouchable" area it can "reflexively" turn around and hit the offender. Wonder what's the explanation for this if the monsters aren't supposed to be able to attack without possible line of sight in that area.

EDIT 2:

I think I found the explanation for the above quirk myself:
Monster that is about to attack will turn immediately if hit (and not stunned and is about to change target). If a monster is in the late state of "about to attack" there is a point when the incoming charge cannot be "taken back" and the projectile or bullet will be let out no matter if the monster is stunned or whatever happens. Therefore the monster will hit the offender "accidentally", not targeting him yet, actually.

Share this post


Link to post

Looks like a case of REJECT map weirdness. The "untouchable" area is one which is marked as NOT having mutual visibility with itself (and other areas as well), so while you're in there, at least hitscan and projectile attacks cannot be initiated (I think monsters will still retaliate against a pure melee attack, though).

BTW, the REJECT table is basically one big binary lump with boolean values, which simply say which sector is supposed NOT to be able to see which one. An all-zeroes REJECT means simply that a visibility check will have to be run each time a conflict or attack is considered. An all-ones table will mean that the engine will assume that an attack from any sector to any other sector (including itself) is not possible, and thus will prevent any attacks, and of course it's possible to have all sorts of in-betweens.

Its purpose was to speed up the engine, but there's no absolute way of constructing it, and it has become somewhat of a lost art. Manual editing in order to create weird effects is possible, but I'm not aware of any tool that can make that task easier, or even simply visualizing the relationships (it would look like a big N x N table, telling you which sector can see which). BTW, visibility is not necessarily symmetrical ;-)

Share this post


Link to post
Memfis said:

Here is an interesting map by Arsenikum that exploits REJECT holes: https://content.wuala.com/contents/kuchitsu/Doom_WAD/Reject8.zip/?dl=1
(the spider can't see you when you're both standing on squares of the same color)


Now that's some seriously cool stuff. The waking sound replacement that makes it appear like it's echoing is nice, too. Shame that for some reason it's trivial to stuck the Mastermind and you're now also immune to splash damage :\

Anyways, thanks for this. Do you hide some more interesting stuff in your Doom folders, Memfis? :D

Share this post


Link to post

I'm not sure if negating splash damage is part of the REJECT table's side-effects. I'll have to do some research to see why this is so, unless it's simply because every splash damage target has also to pass a line-of-sight check, which would fail with a full REJECT table.

Keyboard_Doomer said:

GoogleHIV+


OK, I admit my buzzword database is a bit behind the times, but WTF were they thinking with such a name? All it makes me think of is poz pigs. Seriously, it's all there: the HIV, the poz (+) sign...so is it a Google service for poz pigz?!

Share this post


Link to post

Thanks for the explanation, Maes. Now I just wonder this:

- I guess Arch-vile can't hurt the player while other monsters can because it's like there isn't line of sight if both player and Arch-vile are in the same area. Is that right?

- Why doesn't the splash damage hurt if hitscan and projectiles do, though? Along with the rockets not bumping you away...?

Is fist and chainsaw considered a melee attack by the Doom engine? Because monsters don't retaliate against them either here.

Share this post


Link to post
Keyboard_Doomer said:

- I guess Arch-vile can't hurt the player while other monsters can because it's like there isn't line of sight if both player and Arch-vile are in the same area. Is that right?

- Why doesn't the splash damage hurt if hitscan and projectiles do, though? Along with the rockets not bumping you away...?

Is fist and chainsaw considered a melee attack by the Doom engine? Because monsters don't retaliate against them either here.

1. Yes.

2. While projectiles simply deal damage on impact, splash damage only works if there's short enough distance AND a free line of sight between the source and at least one point of the player's hit box. Which doesn't happen in this case.

3. Yes. But I think they're handled differently than monster's melee attacks, since for example the Ghost monsters cannot be hurt by player's fist or chainsaw, but can be damaged by other monsters at melee.

EDIT:

Keyboard_Doomer said:

Because monsters don't retaliate against them either here.

Monsters can decide to attack only if they have a direct line of sight, it's irrelevant how they have got provoked or damaged.

Share this post


Link to post

Thank you too, scifista42.

scifista42 said:

Keyboard_Doomer said:

Because monsters don't retaliate against them either here.


Monsters can decide to attack only if they have a direct line of sight, it's irrelevant how they have got provoked or damaged.


I was just responding to what Maes said:

The "untouchable" area is one which is marked as NOT having mutual visibility with itself (and other areas as well), so while you're in there, at least hitscan and projectile attacks cannot be initiated (I think monsters will still retaliate against a pure melee attack, though)

Share this post


Link to post

Lol I wasn't really hiding that wad, it was posted on the Russian forum at least one year ago and maybe on Doomworld too.

Share this post


Link to post

I was probably thinking of a different occasion when referring to the melee retaliation.

However, ghost monsters can still be attacked even by the player: it's just exceptionally hard to do so with a direct, aimed hit, since their hitbox is basically reduced to a pure geometric point (within the limitations of the Doom engine), which means it's essentially a 1x1x1 "voxel". In addition, this point is at floor level. You could say that their hitbox suffers a "black hole collapse" of sorts, heh.

Now, since monsters have perfect aim and can always aim for the dead center of any target, and can do so instantly in melee, they can still hit ghost monsters with no problem. The probability that LOS checks will fail due to the hitbox being so thin is higher, though.

The player could in theory do the same, but it would requite pixel-perfect positioning and aiming, with zero roundoff errors. Splash damage works because it can do the "dirty work" of performing this perfect aim for the player (anything damageable within the damage radius gets marked as a target, regardless of hitbox properties).

Share this post


Link to post
Memfis said:

Lol I wasn't really hiding that wad, it was posted on the Russian forum at least one year ago and maybe on Doomworld too.


Heh, didn't mean it like that. Just thought you had it lying around somewhere, long forgotten, and now you remembered as you read my post; since you posted a link to your personal storage instead of some external link.

Share this post


Link to post
Maes said:

...since their hitbox is basically reduced to a pure geometric point (within the limitations of the Doom engine), which means it's essentially a 1x1x1 "voxel". In addition, this point is at floor level. You could say that their hitbox suffers a "black hole collapse" of sorts, heh.

...The probability that LOS checks will fail due to the hitbox being so thin is higher, though...

As the radius and height are 0, it's more appropriate to think of it as a 0x0x0 object, in every sense. LOS and tracers generally DO miss such objects. EE had a bug for a while due to a limitation in the program which originally converted info.c/.h into EDF which rendered the BOOM push/pull points non-functional due to giving them 0 height and 0 radius. This would cause the P_CheckSight calls BOOM uses to determine whether the push/pull points are in sight to fail by entirely missing the zero-dimensioned object.

Melee attacks work by just grabbing the target pointer and doing damage to it, so they're unaffected. And as you noted, splash damage works because it applies to anything with a blockmap link and doesn't regard radius. Virtually no other attacks are effective, however.

Share this post


Link to post
Quasar said:

As the radius and height are 0, it's more appropriate to think of it as a 0x0x0 object, in every sense. LOS and tracers generally DO miss such objects.


I dunno, at some point I reasoned that even if a mobj_t's hitbox is reduced to the point of having no volume, it still has a nonzero 3D coordinate which can be intercepted -at least in theory-, from a purely geometrical point of view, but the tracer would have to be dead-on.

I was based on this bit from the wiki:

Nonetheless, since its near-immunity to some attacks occurs because it cannot be aimed at, it is possible to harm it by hitting a specific, very narrow area at the base of its axis with a regular projectile attack, although this is very difficult to achieve.


And as mathematicians like to point out, "very difficult" or "highly improbable" doesn't mean "impossible". ;-)

More technically: the PIT_AddThingIntercepts function is what decides if a thing is intercepted or not, at the end of the day. Now, if you have a thing with radius = 0, the obvious result will be that the coordinate pairs (x1,y1) and (x2,y2) inside it will be equal. This doesn't necessarily affect the line cross check:

     s1 = trace.PointOnDivlineSide(x1, y1);
     s2 = trace.PointOnDivlineSide(x2, y2);

     if (s1 == s2)
         return true; // line isn't crossed
After that, only the P_InterceptVector function can make a difference:
    dl.x = x1;
    dl.y = y1;
    dl.dx = x2-x1;
    dl.dy = y2-y1;
    
    frac = P_InterceptVector (&trace, &dl);
Now, my understanding is that if dx/dy are zero, this results in a zero denominator and an early out condition, along with a no-intercept outcome...so where did that bit of the wiki come from? Has it been checked?

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  
×