I noticed there’s a delay between the positions of players between clients, usually by a split second. This is really inconvenient when trying to develop a fast paced fighting game. Are there any bypasses to this?
I figure that some fighting games on roblox have some kind of system to keep the positions accurate between clients, such as black magic 2
I’m not asking for a whole script, but I would appreciate some pointers so that I could solve this
edit: I know that it’s impossible to have positions synced instantly between clients so I’d also be satisfied with the clients displaying the position of the character on the server’s side
Honestly there is no way to “bypass” it; latency exists and positions wont always be synced. Black Magic probably works because it is smart about how many resources it is using. Also, I’m pretty sure BM was non-FE (back when you could choose) so maybe that had something to do with it.
I have no idea. You could try to limit the amount of parts that are in the game and use your scripts wisely (don’t copy/paste scripts into models, instead make 1 big script that controls them all, dont make useless loops or loops that run a bunch of resource-intensive code in a short amount of time)
Also, UI Elements are a HUGE hog on resources. If you have their visibility to false, just disable it altogether. That way the client doesn’t have to render it as what you’re saying is, we want this UI to be on this screen! But can it be invisible?
A possibly way could be with prediction? It’d probably be resource heavy though.
When the client starts moving, it’d fire the server and start a loop on it. Every .1-.2 seconds, it’ll fire a remote function to the client to get it’s ping, client position and client velocity. Then you can use the ping, client position and velocity to predict where the client is on the server. When the client stops moving, it’ll fire the server to tell it to stop tracking it to save resources.
You could just make a very primitive client sync by telling the server where your position is. The problem with this is people with FPS unlockers will crash the game. You’d have to cap FPS.
Not really. Sending data takes time. Including from the server to a client.
You can try to predict positions, but it’s really hard to do well and will be next to impossible on Roblox, where our networking tools are not very fine tuned.