-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sv_fps causing jerky movement on stairs or edges #89
Comments
Thanks, the video does help! I think this is what's happening: To the server, the player entity position is on the ground every frame. When observed at a lower framerate with about 1 update per stair, client-side interpolation will make it will look like a smooth ascent. If there are multiple position updates per stair, the entity remains at the same vertical position for a few frames at a time, making the interpolated motion alternate between horizontal along the stair and more sharply vertical to the next stair. I don't know if I can fix this. It seems to be a problem inherent in the way Quake2 deals with player positions on stairs that was hidden by the game's original low framerate. However, it might be possible to do something like I did with the bot aiming, where at 10fps it sends accurate position updates and on other frames interpolates the Z-axis. This would require some trickery where I replace aq2-tng/source/acesrc/acebot_movement.c Lines 574 to 582 in 9341a2b
Another possible method would be transmitting the average of the last Either way it should only do this if |
The lasersight should also use this averaged height value. Actually, the sudden change from crouch/stand is player viewheight, which requires a different trick to smooth. |
This is almost done, but it's causing a strange issue where 3rd person chase spectate has an orange tint over it, as though the camera were outside the map. This is reproducible on kumanru in the upstairs room with the long boxes. |
I fixed the orange chasecam tint, but while testing on kumanru I found that bots would sometimes spawn above the map. This is probably caused by restoring a bogus value in |
I think I've got it! I'll give it some more testing on my server before I push it up to aq2-tng. |
Wow, impressive work. |
Thanks for letting me know! I disabled smoothing for spectators because it was causing the orange tint on 3rd person chase cam, but I'll see if I can re-enable it and fix that. |
I looked at this code again and all clients run Generally 3rd person spectator works fine. The problem with crouch/jump spam is probably caused by the immediate change in Line 142 in b2314d8
On servers that supports Lines 1277 to 1283 in 3835e46
|
I think the most I can add to this now is smooth the application of viewheight to 3rd person spectators, and also use that value for lasersight and flashlight instead of the current hack. |
Sometimes players walking down slightly sloped ground will jiggle. This is especially harsh to watch when 3rd person spectating them. (I'm not sure if this is related to sv_fps.) Edit: I have separated this into issue #90, although the chasecam height adjustment for jumping may also benefit from some smoothing with sv_fps similar to viewheight: Lines 152 to 154 in 3835e46
|
I did some digging into "jump animation lifts" and found it's from baseq2, which had a fixed over-the-shoulder chase cam. It made sense there because the camera was very close to the player model, and the jump animation raises the model, so it would be hard to see beyond them without lifting. This doesn't really make sense anymore with AQ2's farther away free-rotate chase cam, and it's the reason the camera was bouncing up and down obnoxiously when players would walk on slopes, so I disabled this. I think it looks better now. If anyone wants this back, let me know and I'll make it a cvar. |
Merging limp_nopred into bots branch.
Darwin gamearm64 to gamearm
This time I'm gonna show the video :)
the yellow text at bottom-left corner shows player updaterate
The text was updated successfully, but these errors were encountered: