fabiangreffrath / test-wads

WAD files to test proper function of Doom source ports
6 stars 0 forks source link

Arch-Vile fire coordinates showcase #2

Open fabiangreffrath opened 3 years ago

fabiangreffrath commented 3 years ago

Hey @JNechaevsky, I hope you are all well again! :crossed_fingers:

Remember back then when we discussed fixing the spawn point for the Arch-Vile's fire and how that affected the vertical flickering of said fire up and down the player's head? I think I remember we had a test map to showcase this issue where the player at (x,y) would wake up an Arch-Vile and the sector at (x,x), where the fire gets initially spawned, has different floor and ceiling heights so the effect would become apparent. Remember?

JNechaevsky commented 3 years ago

Ouch. Somehow I totally missed this issue, sorry!

There were not testing map, all the testing was done right in MAP16 of HoE: https://github.com/fabiangreffrath/crispy-doom/issues/318#issuecomment-391808127. I have attached a savegame file, that's probably the only possible way to reproduce this case.

fabiangreffrath commented 3 years ago

Never mind. Maybe you can come up with something clever for the test-wad collection? 😉

JNechaevsky commented 3 years ago

Sure, few things comes to mind which I can handle:

  1. Midi/MUS lump with > 98 kilobytes size (must be a MAXMIDLENGTH).
  2. 16 bit SFX.
  3. Broken BLOCKMAP (hmm, is it really a bug?).
  4. Patch drawn out of screen bounds (calls "bad draw patch" error or overflows frame buffer sooner or earlier).
fabiangreffrath commented 3 years ago

I was thinking primarily about a test case to show the Arch-Vile's fire's spawn coordinate glitch, but I'll be fine with any other test case as well. 😉

Regarding 16-bit SFX, I think the Doom Sound Bulb project already qualifies as test case: https://www.doomworld.com/forum/topic/110822-doom-sound-bulb-hd-sounds-that-stay-true-to-the-original/

JNechaevsky commented 3 years ago

Ah, Arch-Vile. In theory, it is possible to place player and Arch-Vile in same location as it was done in demonstration video I have posted back in a day, but still, user will need to move/hide (i.e. press left/right right after starting the map). A conveyor could help, but we are not in Boom.

fabiangreffrath commented 3 years ago

I was thinking about an L-shaped map with e.g. the Arch at (0,0) and the player at (x,0) and a sector with different floor/ceiling heights at (x,x). Then, the Arch's fire will spawn at (x,x) and get this sector's floorheight and ceilingheigh values and then move to the actual position at (x,0) and thus flicker up and down between this and the initial sector's height boundaries.

JNechaevsky commented 3 years ago

Like this one (screenshot)? Archie is blocked by invisible lines, but I have missed something, no luck with reproducing yet.

fabiangreffrath commented 3 years ago

I was rather thinking of something more simple: archie.zip

JNechaevsky commented 3 years ago

:open_mouth: It's working! It is easily to see how flame is appearing on the floor.

fabiangreffrath commented 3 years ago

Further simplified version (simply use IDDQD): archie.zip

JNechaevsky commented 3 years ago

But I'll have to hide in hidden sector with different floor/ceiling height, and then watch what is happening via IDCLIP? Or I'm getting something wrong?

fabiangreffrath commented 3 years ago

The fire is spawned in a sector with floor- and ceilingheight outside the bounds of the sector where it is supposed to appear. Thus, the flame's z-coordinate will flicker between both sectors' bounds every second tick. Without uncapped framerate + interpolation, the flame will merely flicker on and off. But with interpolation enabled, its vertical position will be, well, interpolated and the flame will appear somewhere mid-air around the player - which can even go as far as appearing outside the player's view, who then erroneously believes to be safe while he isn't.

JNechaevsky commented 3 years ago

Hmph, I'm playing with uncapped fraterate + vsync. On this simplified map I'm not able to reproduce incorrect spawn, until I'm going out of level bound. Wonder what I'm doing wrong. :flushed:

fabiangreffrath commented 3 years ago

You'll need to disable the fix first: https://github.com/JNechaevsky/russian-doom/blob/a88f54a3580103dfd5710b939034ad13aa32dee3/src/doom/p_enemy.c#L1380

JNechaevsky commented 3 years ago

No-o, I'm testing in Crispy.

fabiangreffrath commented 3 years ago

Then please disable this: https://github.com/fabiangreffrath/crispy-doom/blob/0b0747b8572997f02a4419aaae8c7a1bedfc0358/src/doom/p_enemy.c#L1320

JNechaevsky commented 3 years ago

A-ha, yep, now I can see how it's jumping from floor to ceiling. But still, your first simplfied version is much easier to reproduce - flame stops in horizontal position once Arch-Vile looses player in direct view and thus, it is easier to see how flame is bumping into ceiling.