Hello guys! I’m new into developing a server in FiveM and im curious about one thing. Me and my friend were testing a synchronization between us on the server with onesync on and onesync legacy/off. The goal of the test was check how much distance there is between us in speed 50km/h and 150km/h. Every screenshot was taken when he was touching me on my client (he was taking the screenshot). We have exactly same fiber ISP so the ping of us is the same (i’ve tested it)
As you can see if the onesync is disabled then if speed of vehicles are increasing there is no difference between 50km/h or 150km/h. When onesync is enabled then if speed increases the “delay” increases too.
Is there maybe a command to set better sync interval or something? We need to use onesync because of server-side things, but the delay is discouraging of using onesync.
If you have experience of improving something like that, please let me know.
Thanks in advance.
EDIT: My friend was taking the screenshot, when i was telling him that he is touching my car already on my client.
GTA itself doesn’t even have proper movement prediction (at least it is not really that good comparison wise with other games).
If you are not using Onesync, FiveM is basically using the GTAO code.
If you are using Onesync, a lot of additional load is shifted to server side including (as far as I am aware) a custom implementation of network stuff and the movement prediction is worse than without Onesync (for the benefit of a lot more server side functionality).
Movement prediction is one of the most difficult topics in networking in games in general. While it would be great to have a better implementation, it is not something that’s easily done.
(anyone with more knowledge in this area correct me if I’m wrong)
Then why in this situation OneSync is much worse than the GTAO code? I know about the a lot of stuff that adds the OneSync (more server-side functions synchronized between players, players limit to 2048). But onesync enabled is problematic for instance when player tries to PIT maneuver other player. Why there isn’t any option in server.cfg like for example in (R:MP - FiveM competition)? In R:MP u can set sync-rate that is describe as “This number indicates the interval, in milliseconds, that the server has to synchronize its entities. 40 = 40ms”. I think that would be better when owner wanna the server to more often update entity position (for better movement prediction) . Apart from that even MTA:SA has similar settings in their server.conf file. Why FiveM doesn’t have that? Not everyone relies on the number of players but rather quality of gameplay.
The sync rate has nothing to do with movement prediction. It can make things better, but not by a lot at all. Feel free to look into this topic but I assure you that it is extremely complicated “getting this right”.
Higher entity speeds always result in more desync position wise. A delay is a delay and you cannot just “remove” it. You basically need to predict where the entity will be in the future. Which is easy for linear movement. But you will never be able to predict when a user wants to turn their steering wheel or hit the brakes. You just can’t unless you’re a psychic. That’s what makes this topic extremely complicated.
But yes, I would very much like seeing better movement prediction implemented.