fivem
fivem copied to clipboard
World starts to lag when a client has low fps.
I was testing something and wanted to save my CPU/GPU resources, so I turned the max FPS on one of the clients to 10, and saw that Cars, NPCs, and basically the whole world started to slow down.
This can just be due to me using two clients on the same PC but it might be more than that. It might be happening to multiple clients also. I will soon test it with someone and comment down if it still happens.
But here is the video of it :
https://streamable.com/a3s4sk
so I turned the max FPS
Uh, the game doesn't even have any FPS limiter, so how did you do this, and if this is using an external tool, does this tool by chance touch system timers?
It is the ENB shader (http://enbdev.com/download_mod_gta5.htm).
I think the majority of people use this for graphics mods like NVE and stuff.
This also happens to me with 2 clients on local server (one with <20 fps and another one > 80
looks like if the low FPS player is handling the cars, NPCs , it lag for other player(s)
(at least that is what i think is happening as, IIRC , GTA:O also rely on clients for these stuff)
I'm seeing multiple terms here btw, 'lag' and 'slow down', when both are... not the same at all. I can't watch the linked video (or any video for that matter), but the terminology here confuses me as well.
Might be some issue similar to the timestamp thing with vehicle extrapolation goes on, but 'slowing down' aka 'running at a different time scale' seems very odd and unlikely, as would 'lag' i.e. 'be delayed', as the latency doesn't increase too much with lower update rates.
You basically see NPC moonwalking, and NPC cars jittering every second.
Here is the video uploaded to youtube
https://youtu.be/ZeD6HNjKQ3M
You basically see NPC moonwalking, and NPC cars jittering every second.
That sounds like a variant of the aforementioned timestamp accuracy issue, though I'm not sure how that could even be described as 'lag'.
If that is the case, however, this might be an easier repro for timestamp behavior than the usual which has been tried (and makes it fairly difficult to check any improvements) - for accuracy, can you check if this happens with onesync off
as well? I'd check myself but as below, I don't have any reproduction method.
Here is the video uploaded to youtube
Note how I said 'or any video for that matter' - I'm unable to actually get any information from videos.
YouTube is even less functional since I've got that intentionally blocked on my network so I don't accidentally click any links there leading to poisoning Google profile data. The 'streamable.com' link works but, again, I don't know how to parse it or match it to the description here.
Do you happen to have any reproduction steps for this, however, that don't require me running a closed-source DLL by a (Russian) author that has also been known to bundle shady components without looking back ("enbhelper.dll" originally was developed by 'Quant', known for PC-wiping malware)? For example, a script that correctly sets up a similar scenario + maybe a busy loop to fake out 'low FPS'.
Just tested with onesync off, same results. With less than 5 FPS, you can basically freeze the NPCs.
https://user-images.githubusercontent.com/58150973/189359516-71621055-00b0-4207-a446-938786f779d6.mp4
same results
... so that's probably not even the timestamp thing, and likely a way different issue.
Not sure how actionable this is to fix.
A new discovery.
If there are 3 clients, and one of them has less than 30 FPS, all the NPCs in the area suffer from that effect.
But if all the clients in the same area have more than 60 FPS, all the NPC movements are smooth.
Btw, there must be a way you can slow down the FPS. The basic way would be to make the v-sync - half on a 60hz monitor to get 30 FPS. But on 30 FPS you don't see enough of the effect on NPCs but it is still noticeable enough.
I will try to research if there are any 3rd party mods which can allow FPS modification (open source as you don't trust escrowed DLLs).
You can reproduce it via RivaTuner instead of enb or stuff like that
I have personally done this a few times, run two clients on the same machine with maxed out graphic settings so FPS drops are noticable. After the first client has loaded into the world, connect the second client and the world should look as if entities are rubber banding on the second client, also during this time damage to the initial client isn't always registered (a term to which I would describe it would be "lag switching").
You shouldn't need any third party solution to recreate the issue, and even providing one doesn't help as that third party tool could even be creating an additional invisible issue.
This looks both odd and correct to me, my first guess would be the incorrect usage of physics simulations in GTA itself. Does this also happen in GTA Online?
Physics engines are often run around 30 FPS. Though contrary to Rendering engines they run on fixed intervals, primarily for consistency reasons mathematically, i.e.: every 33.333 milliseconds (1/30), so if you run a game < 30 FPS it'll start to lag behind. To counter this lag we normally run multiple simulations in those cases, which might not be happening in GTA's case.
If this is the case then the behavior shown in the videos is actually correct behavior, as all other clients will do their own prediction/interpolation, just to enjoy an update to move them back again a second later.
I havent played GTA Online in a long time , but iirc , it had the same problem , not this extreme tho..