Comments (11)
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.
More than year!
from edge.
Yeah, i saw PrBooms implementation, so I will modify and integrate it in the engine soon :)
from edge.
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.
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.
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.
So are you talking about the time it takes for Doomguy to stop moving once you let go of the key?
from edge.
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.
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.
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.
I know, but with time comes knowledge ;-)
from edge.
Related Issues (20)
- No GL Display on Linux HOT 14
- Networking Overhaul
- mods acting pretty weird on current master HOT 4
- Possible Future Feature: INI Parsing for Engine Configuration (replacing edge2.cfg) HOT 5
- Changing any boolean option through menu doesn't update the CVar HOT 4
- Idea: rework the old defaults system as CVars HOT 3
- IWAD handling (EGM vs INI) HOT 1
- Doom, line action type troubles HOT 2
- Doom, sector light to darkest linetypes HOT 1
- Feature/Renderer: fix up glBindAttribLocation HOT 2
- Renderer - only HUD and Sky is rendered HOT 5
- Unable to get past 3rd step from the CMake/Visual Studio Building Instructions page. HOT 7
- Duplicated SSE2NEON headers HOT 1
- FEATURE: MP3 Support HOT 4
- Mac M1 Support for Cmake HOT 15
- No textures found on darkwar.wad HOT 3
- build on Pi4 HOT 9
- New Renderer Fixup
- Compilation instructions on Linux?
- How to change argument HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edge.