Slope bumps

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
Hirogen2
Posts: 2030
Joined: Sat Jul 19, 2003 6:15 am
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel with Vulkan Support
Location: Central Germany

Slope bumps

Post by Hirogen2 »

Hi,

whenever you step onto a slope or step off it, you can recognize a "bump" the player walks, I think it has to do with the bounding box.. bla. However, this is kinda weird if you copy slopes.
Just take this level and walk the tunnel slope up and down slowly... you will recognize the bumps. Can this be fixed?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47970
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Why don't you post this in 'Bugs' where it belongs?
But you are right. Something should be done about this. If exactly the same slope is on both sides of the line these 'bumps' should be avoided.

Wouldn't it be sufficient if in the case that if the slope on both sides of a line is exactly the same as the one the actor being checked is standing on not the openbottom returned by P_LineOpening is used but the floorz of the actor?

EDIT: I just tested this. It seems to help a bit but the problem doesn't go away completely. There's apparently something else that's also affecting this. Anyway, here's what I did:

After this block in PIT_CheckLine

Code: Select all

      if (r <= 0)
      {
         P_LineOpening (ld, sx=ld->v1->x, sy=ld->v1->y, tmx, tmy);
      }
      else if (r >= (1<<24))
      {
         P_LineOpening (ld, sx=ld->v2->x, sy=ld->v2->y, tmthing->x, tmthing->y);
      }
      else
      {
         P_LineOpening (ld, sx=ld->v1->x + MulScale24 (r, ld->dx),
            sy=ld->v1->y + MulScale24 (r, ld->dy), tmx, tmy);
      }



I added the following check:

Code: Select all

      if (ld->frontsector->floorplane==ld->backsector->floorplane &&
         ld->frontsector->floorplane==tmthing->sector->floorplane)
      {
         openbottom=INT_MIN;
      }
Last edited by Graf Zahl on Sun Nov 16, 2003 5:58 am, edited 3 times in total.
User avatar
Enjay
 
 
Posts: 26402
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Post by Enjay »

Some time ago (March 2002) I mentioned to Randy that if you sloped a tunnel that was just tall enough for the player (56 units tall) sometimes the player would not be able to step on and off the slopes as if there was not enough room for him to fit, even if the appearance of the slope was such that there should be no problem. Randy explained why...

Randy wrote:To determine floor and sector heights of all the sectors you are in, those sector's heights are compared at your center. If the sector doesn't actually pass through the center of your body, the collision detector will pretend it does. You might have noticed that when you walk up a slope onto an adjoining sector you sometimes step down even though the two sectors meet nicely; that's why. It was the easiest way to support slopes with the existing code.
User avatar
Hirogen2
Posts: 2030
Joined: Sat Jul 19, 2003 6:15 am
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel with Vulkan Support
Location: Central Germany

Post by Hirogen2 »

Why don't you post this in 'Bugs' where it belongs?

Otherwise it could have been moved to General :D
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47970
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Why? To me this sounds more like bug (or at least some undesirable game behavior) than a general discussion topic, don't you think?
User avatar
Kappes Buur
 
 
Posts: 4007
Joined: Thu Jul 17, 2003 12:19 am
Location: British Columbia, Canada

Post by Kappes Buur »

.
Would this have something to do with using the 'Copy Floor Plane' thing,
instead of setting each line to slope the plane individually?
.
User avatar
Hirogen2
Posts: 2030
Joined: Sat Jul 19, 2003 6:15 am
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel with Vulkan Support
Location: Central Germany

Post by Hirogen2 »

No the bump occurs on any sector (not subsector hah!) boundary, be it normally-sloped or plane-copied.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 47970
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Kappes Buur wrote:.
Would this have something to do with using the 'Copy Floor Plane' thing,
instead of setting each line to slope the plane individually?
.



Internally it doesn't matter how a slope is created. The slope things don't exist anymore after the level has been set up. All that's left is the slope and there is no way to tell how it was done.

The problem is with the collision detection code which checks the lines and sets an incorrect floor height in case the player is standing on a slope boundary. In the one very special case here where all sectors have the same slope something can be done about it but in any other case this can become a major headache to fix it - if it is fixable at all.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Hirogen2 wrote:
Why don't you post this in 'Bugs' where it belongs?

Otherwise it could have been moved to General :D


Best to post bugs (or what you honestly believe to be bugs) in the bugs forum and let Randy decide what to do with it.

Return to “General”