Slope bumps

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Slope bumps

Postby Hirogen2 » Sun Nov 16, 2003 5:12 am

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
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Sun Nov 16, 2003 5:25 am

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 allExpand view
      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 allExpand view
      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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Enjay » Sun Nov 16, 2003 5:34 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Postby Hirogen2 » Sun Nov 16, 2003 10:53 am

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

Otherwise it could have been moved to General :D
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Sun Nov 16, 2003 11:00 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Kappes Buur » Sun Nov 16, 2003 12:20 pm

.
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
Kappes Buur
 
 
 
Joined: 17 Jul 2003
Location: British Columbia, Canada

Postby Hirogen2 » Sun Nov 16, 2003 1:32 pm

No the bump occurs on any sector (not subsector hah!) boundary, be it normally-sloped or plane-copied.
User avatar
Hirogen2
 
Joined: 19 Jul 2003
Location: Central Germany
Github ID: jengelh
Operating System: RedHat-like Linux (RHEL, Fedora, CentOS, etc) 64-bit
Graphics Processor: Intel (Modern GZDoom)

Postby Graf Zahl » Sun Nov 16, 2003 3:12 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby HotWax » Sun Nov 16, 2003 7:46 pm

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.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest