For example, say you have a round system and you want to ensure that each client’s character gets unanchored and begins the round at the exact same time regardless of latency.
The only thing I can think of is the server sends a timestamp for like 10 seconds ahead, and the client unanchors itself when it’s the target time. The problem with this approach is it’s obviously easily exploitable, so I’m wondering if anyone else knows of a better method.
I mean yeah, this is the most basic approach but it doesn’t account for network latency. I’m trying to unanchor everyone simultaneously regardless of ping.
But why? If you are going to work with this low of a latency you shouldn’t use Roblox because the servers aren’t very fast network wise. And if you unanchor everyone perfectly at the same time the client sends input with the ping you tried to avoid.
In time sensitive applications such as a racing system, this matters quite a bit. A simple unanchor from the server is honestly fine in most situations, but I’m just trying to think of a higher level workaround. In Forza drag races for example, I’ve noticed that you can be racing against people with really high ping but they’re still able to set a good time even if it looked like they were lagging behind from your perspective. It appears that they collect the run times from each client then they compare them on the server. I’m trying to figure out how something like this could be done in Roblox without compromising security.
You might as well send a timestamp for it. While it’s easily exploitable, so is anchoring your players to prevent them from moving. They can simply unanchor themselves, so using a timestamp won’t cause anything new
In racing games like forza, they can use the clients reports and try to verify it either algorithmically or logically, but in a situation like that on roblox, it’s often too computationally intensive. So instead we typically have to just hope for the best and just do what we can.
No, they have physics control over their character (and taking it away makes controls feel TERRIBLE). Whenever a player has physics control over something, they can control if it’s anchored or not (it doesn’t replicate, but as long as they simulate it, it acts like it. When the server regains control over it, it acts as if its anchored again)
In one of my games I’m removing their network ownership of their vehicle when the race is initializing then giving it back when the race starts. Would they still have physics control in the initialzation period?
If you remove it, no. As long as you ensure they don’t have network ownership over it, they can’t really do anything to it. However, once you give them access, they can do a LOT (make it go way faster than it should, make it fly, etc.) You’re gonna want a strong anticheat to go with it if you plan to give them network ownership over their own vehicle (and you’re probably going to want to give them network ownership, otherwise it’ll feel slow and unresponsive, especially if they’re lagging).
Well that’s good to know, ty. And yeah lol the flying cars with autofarm exploits has been a big pain, the most I’ve been able to do is detecting abnormal speeds and acceleration. For flying I was going to use touch events to confirm the wheels are on the ground but it seems like it’ll impact optimization unless the checks aren’t very frequent.