team-eternity / eternity

The Eternity Engine
http://eternity.youfailit.net/wiki/Main_Page
GNU General Public License v3.0
237 stars 37 forks source link

Slope sprite drawing problem? #637

Closed Meerschweinmann closed 1 month ago

Meerschweinmann commented 1 month ago

Hello again :)

Because i know that the slope code is complete now and in a testing phase, this older problem i had posted at Doomworld came back in my mind. And i thought that could be a slope problem with sprite drawing.

The sprites can be seen through the sloped ceiling.

This behavior can be reproduced when loading my example map with the latest DRD devbuild, using the KILLEM cheat and walk into the house below the slope.

Here is the testmap:

line-portaltest.zip

And here a picture showing whats wrong:

etrn12

Meerschweinmann commented 1 month ago

Update. It seems that only the dead enemies can be seen through the sloped ceiling. When alive the sprites are handled as they should

Depending on sprite height?

ioan-chera commented 1 month ago

Yes, this is the natural consequence of classic DOOM allowing sprites to fully draw when their things are not mechanically occluded. This is needed when you have multiple adjacent sectors with the same floor height; you don't want actors' sprites to be clipped by every separation when there's no change in height, unless they're actually physically below.

What you get here is related, except that the slope skews all assumptions, especially because now it works like a wall. I can make them block absolutely all sprites, regardless of mechanical range, but this might result in the unwanted artifacts mentioned above. Clearly this needs more care.

Meerschweinmann commented 1 month ago

Hi Ioan,

sounds like a not so easy task to solve this behavior, because it is something it was originally intended to behave so back in the 90s.

And meanwhile i tested around a bit with the slope and confirm that it has to do something with the sprite/slope height.

When lowering the slopes lowest point 4 pixels more, the dead sprites are shown as they should and only the ammo clips are showing through the slope.

etrn22

ioan-chera commented 1 month ago

Hopefully fixed, let's hope no ill side effects.

Meerschweinmann commented 1 month ago

Thank you.

Will have a look tomorrow when the new DRD devbuild is downloadable. Don't know why, but this time compiling with MSYS showed some errors and aborted.

Meerschweinmann commented 1 month ago

Sprite drawing while standing below the slope works great now 👍