A way to implement fair Vehicle collisions for all pings, fixing "Desync"

As seen, In CC2 Roleplay servers, alot of people struggle from “Desync” which occurs when a player with slightly higher ping’s vehicle’s magnitude increases too fast for the other player’s side to register, even if they didn’t actually collide, server side, they DID collide, so how do we fix this?

We make it dynamic, we make the default delay 200 MS (maximum), and in that time, we make something like an escape array, a time for both clients to just not stay collided in, (before registering the crash by the crashmodule or crashfunction or whatever is used)

But we obviously have to delay that delay, but how?

And to decrease that delay,

local Delay = PingCap - (ServerTimestamp - ClientTimestamp)

Clientstamp is the time took for the client to register the collision to the server, and so goes on.

I would love seeing this get implemented as it’s pretty simple, yet pretty helpful and will prevent further desyncing, (like actual desyncing, which by implementing this system, or by implementing something similiar, we can easily make desync a thing of the past, and give out the true experience)

And obviously after this “escape time” if they’re still touching then we clearly use the collision function, And only applying this if atleast one of those vehicles is going 120km/h or higher, as that’s the usual speed of desyncing. (also both vehicles going the same speed but one has good/normal ping, one’s on mcdonalds wifi, you get it.

No more random skill issued children ramming into me on accident then calling it a desync if this gets implemented.

Thank you for reading this, I hope this goes to any CC2 HR Or Panwellz to get implemented, mny_11.

10 Likes

This is one of the best posts I’ve seen ever

5 Likes

PLEASE PANWELLZ YES

3 Likes

This idea looks possible at first, but in practice it wouldn’t really work in Roblox

1. You can’t actually “cap” ping, since every player’s latency is individual and can’t be controlled by the game. Roblox Studio only lets you measure ping, not normalize or fix it.

2. CC2 collisions are built on Roblox physics, which are server authoritative. If you delay or turn off collision checks, it wouldn’t be realistic because a crash that should have happened would suddenly not register. That would cause even more problems.

3. Players with high ping (200ms+) would run into a ton of bugs from skipped collisions, like cars clipping, or ignoring damage. Some people might even abuse this to avoid crashes.

Overall: While it’s a creative idea, Roblox’s engine doesn’t really support this kind of system. A smoother solution would need to come from better replication or interpolation on the server side, not collision delays.

1 Like

oh dang

3 Likes

that sucks

3 Likes

ngl coding this would take a lot of math,

like a lot of math to code just to get the ping of players right

4 Likes

its more complicated than just this line itself

4 Likes

This is clearly a small example since this is targeted towards CC2’s developers, not the whole code, I’m just attempting to get the point to them for implementation, I’m not the one scripting it.

4 Likes

well yea, like i said this will take a while to implement

plus this is a trial and error process the devs will have to undergo

so you may get like 10-15 update delays just for them to work this out

4 Likes

We’re not “Capping” the player’s ping or modifying it at all, we’re getting it as a value which is very simple using remote functions, then calculating it with the server’s timestamp (which we are NOT editing here, we are just getting the value to use as a variable to decrease the maximum delay time which is 200 milliseconds), now do you think that in 200 milliseconds, 0.2 seconds, people would be able to use it to bypass crashes in a small window of 200 milliseconds?),

  • We’re making 2 collision checks, one is the normal, then after the delay, which is a maximum of 200 milliseconds, we’re making a second one, to then register the crash function or whatever module they use to register crashes for vehicles.
  • This is CLEARLY possible on roblox’s engine, we can EASILY get all pings and everything, roblox DOES support this, just not a direct system which makes it hard for beginners

This is simply how to get the server –> client timestamp pinging

local stime = tick() local result = game.Workspace:WaitForChild("GlobalServerClientPing"):InvokeClient(player) local etime = tick() local ttime = math.floor(((etime - stime) * 1000) + 0.5) return ttime  local result = GlobalServerClientPing:InvokeClient(player) --Simply sending a remote call from the server to the player, totally built in for roblox  local etime = tick() local ttime = math.floor(((etime - stime) * 1000) + 0.5) return ttime  

Just remember, even if this is hard and isn’t “direct to roblox’s API”, it is CLEARLY possible, and clearly not “delayed’, as you’re simply making the players wait for a maximum time of 0.2 seconds, less than quarter of a second (200ms), and we’re decreasing that time AGAIN by calculating the pingcap & timestamps, this is CLEARLY possible, it is CLEARLY easy, even if it’s not “built for beginners”, this is a recommendation that is supposed to get implemented by any CC2 insanely experienced developer, not a random person, and this doesn’t explain the full way on how to do it, this just simply explains the core of doing it or doing a system similiar to it for them, this is NOT the full code/way that anyone would do this.

4 Likes

woah settle down here we’re not all experts here at coding

the devs wouldn’t have to undergo a trial and error process if it was that easy

plus, there would be setbacks since testing will have to be done

4 Likes

I’m not an expert at coding, I’m not relying to any further parameters of them doing it instantly, this is just a suggestion to get implemented in the future, it is clearly not simple but very possible, would fix one of the biggest issues in CC2, just remember this is a suggestion & CC2 is more focused on content (vehicle & item & map) updates either ways.

4 Likes

Collision checks are insanely unstable and will cause issues. This idea isnt good. Its would be good if u actually suggest that are going to work properly. Not for the users with the best ping, but for anyone.

2 Likes

Because when someone is lagging, the script wont work properly, plus, if youre going to make this script run on every existing vehicle that is under control it also means the script affects every part of the car, which would also cause more lag for low end devices (for example, crash physics make the game lag already, considering that the cc2 cars arent high detailed)

2 Likes

Trust me i’ve already experimented with something similiar to this, it isn’t, at all, you just check if the part is still .touched by another vehicle’s part based on whatever identification way they use, (probably a value inside a carpart), and on touchended, we either register the collision in the module or not, it’s very simple, it’s fully built for roblox, it would NOT cause any lag, it only occurs on specific scenes where desync is way more often.

Desync is unfixable. Some fixes may be done, but at the end of the day, server will always have latency.

And this system is directly implemented towards fixing desync while still having latency, Read it well, Stop copy & pasting into ChatGPT for your little answers, you’re just using basic words any tech person can say “Game Logic” “Latency” “Fixes” instead of mentioning any Roblox Studio code, atleast tell your AI tool to analyze this if you’re not going to read it well.

Thank you, mny_11

3 Likes

Being rude wont help. Your trying to defend your answers because im explaining the reason why they wont work properly. Again, desync is unfixable.

1 Like

How is saying the truth being rude?

You might find this offensive, but you’re clearly not getting it right, you’re explaining the reason why they “won’t work properly” and then you say things that aren’t even included in the system & are clearly not how the system works, which clearly defines you not fully reading it properly, which clearly disproves your statement of “Desync is unfixable”, as literally nothing is unfixable, this isn’t a rendering issue, this is a simple latency system, it’s not meant to “make less delay” by your claiming, if you actually read properly, it’s meant to make a bit more delay for a better result

3 Likes