-
Notifications
You must be signed in to change notification settings - Fork 224
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
Elevators crushing player/monsters #700
Comments
Thanks for copying the issue here! My hunch was that it was some kind of float precision issue around the SV_PushMove method but I've not yet looked up how I can even debug that. And comparing the code with QSS and Ironwail now I'm not so sure that's the cause of the issue |
Might be related. Noticed something similar in rm_resurgence (re:Mobilize 1.2), when taking the lift up from level 0 to level 1 in the trident building, Lift will reverse the direction shortly before reaching the destination. However, the player suffer no damage. You need to jump shortly before this happens or disable renderer/network isolation Lift has 2 more levels, and they do work fine though. Can't reproduce with ironwail. |
@j4reporting I've tested it and indeed it is the same issue. I don't get what vkquake is trying to do here but when I replace that line: |
Thanks @Placo for this find. Alas there has been some significant For instance, that particular line you picked points on a change by @temx: d56b859 I'll test your suggestion and try to understand what this commit does.. Another thing I wanted to test, is adding a CVAR to always force the physics to tun at the fixed rate = 72 Hz, i.e. which effect is the same as The question is rather : is there any desavantage at runing the physics at a fixed rate, irrespective of the host_fps ? |
Nevermind, it breaks things 1 side, while fixing the other... About the given examples:
@Placo So 2 exact opposite cases I'll test vs. your suggestion when I understand what it does. |
Pushed a commit for a new CVAR |
won't this break physics when host_maxfps <> host_phys_cst_ticrate? you can try vanilla quake or QS what happens with higher values for host_maxfps. QS will print only a warning that things will break but does not have implemented the renderer/network isolation that keeps the physics at save frametimes. |
just noticed: the elevator arrives on level 1 in rm_resurgence in a coop game ( one player connected ), |
Yeah you are right, a better name would have been Not very usefull indeed, at the end I'll probably revert this. Not tested @Placo patch yet. |
reverting the remaining bits of d2c34b3 in host.c , already partly reverted with 25cebeb , brings this closer to QSS and ironwail again. lift in rm_resurgence is not bugged, and lift in peril works with vsync enabled like in ironwail. there is at least one other commit, that might depend on this reworked version, though ( dedicated server ). CVAR to switch between different codepaths? kiddin' |
Hey thanks for testing for that roolback. But all those modifications were done in good faith to improve things I suppose, so I would rather try to understand and reproduce the problem on the current to actually fix it, before considering reverting. Now do not hesitate to publish that change on a branch or through a PR of yours so we can experiment (and critisize:) The problematic part of this investigation it is that the interlocking of farmerate, simulation time, and real time elapse in general : it means the moment you execute that in a debugger or worse, stops using a breakpoint, the beahaviour is modified. Now for testing if we stub Another thing to test for fun : always make |
FYI I've reverted my previous experiments from From Master:
|
Right @j4reporting I'm lacking time (ah!) to really tickle all this, so I'll gladly take your PR, if you have any. |
I've continued some experiments around Alas bringing QSS changes graviting around |
maybe someone with more insight could comment what's happening here? The liff in rm_resurgence ( re:Mobilize mod version 1.2b ) will work with slight less precision for host_netinterval. this is also reproducible with QS, QSS and Ironwail with command host_framerate.
so something like vkQuake's timings are simply too accurate, because with host_maxfps 72 values for host_framerate are ~ 0.013888 and the lift will also bug out with renderer/network isolation disabled. Why does the platform revert its direction? Is it just a combination of the speed of the platform and the retracted door? Are we already trigering the physics bugs that renderer / network isolation is supposed to prevent? |
Thanks @j4reporting for your investigation ! I've committed the small change above, according to your findings. With this:
Peril Elevator is of course beyond saving :) |
I didn't knew that QBJ2 was also bugged. For peril ( at least the first elevator ) you would need to bring back the host_phys_cst_ticrate cvar and set it to 50 ot 51 ( again with less precision in case of 51). you can reproduce this also in QSS again with host_framerate
Or bring back the old less frame rate consistent physics suggested by @Placo and make it available by a new CVAR (no archive). QSS and ironwail (vsync enabled) works only because host_frametime = accumtime and it seems most of the time accumtime is in the range of 0.02 - 0.019 |
Ah yes, I've noticed this before. Fine, I've brought back Anyway, I've noticed that the Mjölnir elevator at MJ4M3 start no longer hurt the player when |
Time ideally should be integer fixed point, but I never got around to changing this everywhere. |
Added commit 58f5bbe from @andrei-drexler , thank you very much ! I'm keeping both |
I have the impression that MAX_PHYSICS_FREQ (71.9990) is a bonus overall. Need to test more, but with this tweak the player's movement feels more responsive. With MAX_PHYSICS_FREQ(72) there seems to be some kind of delay/lag sometimes. Hard to describe. I hope I'm not just imagining it. |
I think we can close this now. Thanks @j4reporting @andrei-drexler (and others) for the help ! |
Hello, sorry for reopening this issue but the fix only works on vertical pushers. I'm not sure trying to wiggle each edicts standing on a pusher into position with each increment of its movement would be a good solution though... |
a pusher is also a platform that moves horizontally (e.g. in DM2 ) or any other direction. Can you pls try if you can reproduce this in QSS? I tried the mountain map in qss and player is also taking damage. Have not tried blimp. Objects clipping through, Yeah I think I witnessed this with the red armor near the end of vm8 ( Seismic Ventures ). It's probably better to change the default of
UPDATE: the red armor in VM8 falling off the platform into the water below is something else. |
Those specific cases I mentioned work well in QSS (latest march 2024 release), I have no issue with it. Are you sure you don't have other things/config messing with it? The mod was developed for QSS (albeit an earlier version) so it seems strange you have such issues. All these problems are gone when testing in my vkQuake with the host_frametime calculation change (from QSS) I mentioned earlier in this thread. |
I guess it depends on the HW. I can definitely reproduce the issues with QSS ( latest git ) on Linux and WIndows. Enemies get stuck sometimes on the second platform. You can see the cable car stops moving then continue again. Sometimes it stops for good and won´t move again. It seems the author micro optimized this mod to QSS and his HW. vkquake: does Maybe it's worth to experiment with DIST_EPSILON and multiply it with an integer factor in sv_phys.c and let the edict jump just a little higher...
btw. the health pack and ammo do fall through the floor with |
Sorry I did the tests on Linux only. QSS works on Windows (same HW). Taking the fps values from the old qss version as a guide, I tried the following in vkquake in map mountain
and look and behold, the ammo and health pack no longer fall through the floor on the cable car. And overall, player and enemies take much less damage riding on the platforms. Enabling host_phys_max_ticrate 40 and both items fall through again. Unfortunately, it seems that the value for |
From a vkQuake-vso reported issue:
Hello,
Good job on keeping vkQuake alive! I use your port as my main quake engine, together with Ironwail.
Is it ok if I report vkQuake bugs to you here? If not feel free to remove this bug report.
This one is a physics bug I have first noticed last summer while playing through the mod Peril (https://www.slipseer.com/index.php?resources/peril3-0.253/), it is quite noticeable there because the mod makes extensive use of Quake elevators and trains.
The bug is that when on an elevator moving up or down sometimes it stops and begins to crush the player or the monsters that are on it, even if there are no obstacles.
The player can jump to stop the crushing and have the elevator resume its course but most of the time the crushing resumes a few seconds later.
I have had this bug in other, more regular Quake mods as well, for example I've had it occur on the elevator in the start map of Quake Brutalist Jam 2. But admittedly it is rarer to have it occur with slower, less long elevator rides yet I still encounter it from time to time.
For the mod Peril, the bug is present in Ironwail as well, but in Ironwail there is a workaround: enabling v-sync fixes it completely, even with target framerates well above 72fps (this is very strange and feels more like a bug itself than anything else but hey it fixes the issue).
I have tried messing with vsync or setting host_maxfps below 72 in vkQuake to see if it wasn't a physics/rendering decoupling leftover bug but nothing makes it work.
The bug is not present in QSS.
I have linked a savegame to just before the bug occurs in the first level of the Peril mod (it's at the start of the level anyway).
elevator crushing bug Peril savegame.zip
Hello @Placo,
Thank you for your kind words, happy to see this port helps you.
Oh I know this one ! This is also known to by the mod author Balgorg and somewhat mitigated in the latest release (3.0c now) that can be found here : https://www.moddb.com/mods/peril/downloads. Otherwise, the author just advise to use QSS.
Amazing mod, right ? I'm now in Geothermal and stopped here for now. I secretly hope Balgorg will update the mod again and I can replay it from the begining.
Yes, it triggers every time on the long descending elevator of the first level, an occurs multiple times.
I always play with v-sync off, with limiting refresh rate in game instead by
host_maxfps 58
(monitor is 60Hz)My workaround for this physics problem is to unlock the maxfps by
host_maxfps 0
temporarily. Even with that, it can still occur on the descending elevator once or twice.To be more practical, I've bound that to a shortcut 'p' in
autoexec.cfg
like this:I know, but unfortunatly I've not stumbled (yet) on the magical line of code in QSS responsible.
The text was updated successfully, but these errors were encountered: