GithubHelp home page GithubHelp logo

Comments (11)

ChillyWillyGuru avatar ChillyWillyGuru commented on August 22, 2024 1

EDGE keeps track of an object's momentum in 3D. There are cases where it clears the momentum, but clearly it's not in this case. That was the cause of the jump bug we fixed - the movement code didn't clear the z momentum on one case, leaving the player with some momentum when they next jumped that had to be countered.

from edge.

usernameak avatar usernameak commented on August 22, 2024 1

More than year!

from edge.

Corbachu avatar Corbachu commented on August 22, 2024

Yeah, i saw PrBooms implementation, so I will modify and integrate it in the engine soon :)

from edge.

ryan-sg avatar ryan-sg commented on August 22, 2024

thanks for the insights @ChillyWillyGuru! Another possibly easier test case for this is just strafing side to side at the beginning of doom2 map01. If you counter your strafe direction before you hit a wall on either side, the direction change is quick and responsive. As soon as you hit a wall before countering the strafe, definitely feel the 'stickiness'...as it were.

from edge.

Corbachu avatar Corbachu commented on August 22, 2024

The momentum bug has now been fixed; Chilly cleared it if there is no sliding that can be done, as of commit 18bb710. Try it out and verify -- if it looks good, I will close this.

from edge.

ryan-sg avatar ryan-sg commented on August 22, 2024

hey hey! I just checkout out master and gave it a whirl. Unfortunately, it still seems pretty sticky to me, if i run head-on into a wall and try and back away the moment i hit, there is still a bit of a delay. I thought it was weird that bobbing was stopping when i hit any walls, but then i noticed the commit about it being intentional, so i'll get used to it ;-)

edit: trying to run around the outside of the 2-pillar room you start in on map01 doom2 seemed to be a good comparison between prboom-plus and 3dge for me, in 3dge, most of the time i end up getting stuck in the hallway cuz the marine slips in there the moment he leaves the wall in the hallway gap. in prboom-plus i am able to fly around the walls and miss the hallway with relative ease. I can also crash into corners in prboom-plus and escape again pretty easy, where in 3dge i tend to get stuck and need to wait for things to 'settle' before moving again. this stuck state happens pretty quickly, so we're talking less than 1sec here, but noticable enough during regular gameplay that I usually end up many times in places i don't want to be ;-)

from edge.

Corbachu avatar Corbachu commented on August 22, 2024

So are you talking about the time it takes for Doomguy to stop moving once you let go of the key?

from edge.

ryan-sg avatar ryan-sg commented on August 22, 2024

Nope, that actually works fine as long as I let go of +forward /before/ I hit a wall. Just did a quick comparison between prboom-plus and 3dge and it seems pretty much spot on.

Only when I hit a wall direct. Maybe I try to explain another way, before I try and find some sort of recording software to make videos :-D

These two executions:

prboom-plus -nomonsters -warp 1
3dge -nomonsters -warp 1

Run straight up the stairs and bump the wall. As soon as you hit the wall, hit +backwards.

In Prboom-plus, the backwards movement starts immediately, in 3dge, I am stuck to the wall for some small amount of time <1sec. Same when hitting a wall in reverse then trying to go forward.

Alternatively, just stand at a wall and run into it. Then hit your +backwards key. Prboom-plus no matter how long i hold +forward into a wall, as soon as I hit +backwards I start moving backwards. In 3dge, if I stand idle at a wall, then hit +backwards, I immediately move backwards. If I hold +forward while standing at the wall, then go to +backwards, there is that same delay.

Apply that logic to any time you actually hit a wall, and thats where I get the real sticky feeling if I bump into corners when moving around fast, as that happens no matter what angle I hit.

I am starting to worry that this behavior might be specific to me :x

from edge.

ryan-sg avatar ryan-sg commented on August 22, 2024

It almost seems like, after doing the tests /without/ hitting a wall, that 3dge uses the exact same calculation of slowdown when running into a wall (while standing up against it) as it would if you were running freely then immediately hit +backwards.

from edge.

Corbachu avatar Corbachu commented on August 22, 2024

I have implemented a fix:

In P_XYMovement:

			if (blockline && blockline->special)
			{
				P_ShootSpecialLine(blockline,
					PointOnLineSide(mo->x, mo->y, blockline), mo->source);

				// CA 8.7.17: 
				//reflect momentum away from wall (try to fix sticky walls physics?)
				// Seems to work in making things less "sticky".
				mo->mom.x = mo->x * 2 - mo->mom.x;
				mo->mom.y = mo->y * 2 - mo->mom.y;

				if (!P_TryMove(mo, ptryx, ptryy))
				{
					// // CA 9.21.17:  Can't move, clear momentum
					xmove = ymove = 0;
					mo->mom.x = mo->mom.y = 0;
				}
			}

Verified to finally fix the inertia clearing bug! =)

from edge.

Corbachu avatar Corbachu commented on August 22, 2024

I know, but with time comes knowledge ;-)

from edge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.