haekb / nolf2-modernizer

NOLF 2 Modernizer aims to unlock resolution support, restore multi-player support, and fix a few bugs here and there.
https://haekb.itch.io/nolf2-modernizer
30 stars 4 forks source link

Movement speed is affected by framerate #49

Open haekb opened 4 years ago

haekb commented 4 years ago

I suspected as much, but could never actually time it correctly. I finally found a spot that timed 1.70 seconds with 60fps, and 2.8 seconds with 800-1000~ fps.

Y I K E S.

haekb commented 4 years ago

This might be engine dependent as it seems the physics engine module does the actual velocity calculation based on the acceleration we feed it. Hmmm

haekb commented 4 years ago

Okay after testing some runs, it seems to be the acceleration code itself.

haekb commented 4 years ago

Okay I've pushed a fix onto bugs/49-movement-speed-affected-by-fps. I've done a few tests and they're about the same. There might be some small deceleration issues, but it's much closer now.

...however jumping height is completely broken. Hmm...

haekb commented 4 years ago

Hmm so the way I grab velocity and handle it myself, breaks swimming and ladder climbing.

I'll need a way to track a non-mutated y velocity even if it changes mid jump.

haekb commented 4 years ago

Putting this ticket on hold. It'll block all the high framerate goodness, but I think I wanna just get this out in the world in a timely fashion.

haekb commented 3 years ago

It might be better to keep it at a 60fps lock, and then interpolate position data. Mouse look wouldn't be bound to this cap.