I have a naive server implementation for my game and was looking to implement client side prediction. My main problem is that I have a ball object that all players interact with. The way it works at the moment is simply that the client sends input to the server, the server runs Bullet physics to determine the position, then the server sends the node positions back to the clients when it changes which then moves the models. I like this since it’s nice and clean, but it has latency issues.
I’m tempted to run Bullet on the client also and then send corrections from the server when the client gets out of sync. If I don’t have physics on the client I’m a bit stumped how to predict the movement of the ball (the character controller is simpler and I think I could do this). It’s important to keep the ball position in sync because a player should be able to bump into it and kick it etc.
The other question I would have is, without physics on the client how do you sync the movement between the physics on the server and the client, for example you can’t sync Bullet substeps if there’s no bullet on the client. I was trying to figure out the movement per input on the server by trial and error (logging the positions of the node on the server and working out an average) so I could implement that on the client, but that seems quite a slack way of doing it.
Any suggestions on the best way to do this?