- Home /
Unity vs client-side prediction
I'm developing a multiplayer physics based game and I need to implement client-side prediction so the impact of latency and packet loss will be minimized as far as the player is concerned.
However, Unity acts like a black box where the developer doesn't have any access to its "guts", namely the physics engine. Specifically, I need to explicitly call the Update function on the physics engine so the client can "guess" where the characters are in the server based on given data.
I've lost countless hours on this trying to find a workaround and I'm starting to give up hope.
My question is: Is there any way around this limitation it that I am not aware of?
Thank you for your help!
Usually physics would be done over client side, and then the position will be sent over to server. (I am aware of the security risk) Usually this wouldn't matter. It really comes down to game design, are you sure you want to handle all physics server side? As this puts a lot of stress on the servers computer. If security is really a big problem, then rather than having the server handle ALL the physics and then send the information over to clients, you can have a smaller, less costly kind of prediction system that just checks if the players movement is "conspicuous" and if it is it will correct the physics. This is a much less costly, and easier task to perform then have the server send over ALL the physics information along with having it create that much network traffic by sending over every frame. I'm sure this forum can help you some?
Your answer
Follow this Question
Related Questions
Client-side prediction with rigidbodies ? 0 Answers
Confusing in Multiplayer Networking uNet Client-Server 0 Answers
Send a file using NetworkServer class. 0 Answers
How to watch in client applications what it is happening in the server one? 0 Answers
UNET Different size of spawned object on host and client 1 Answer