Closed osse101 closed 7 years ago
Live netplay assumes ~100ms lag and you can see how lag looks by lowering send rate.
Unity was also smoothing the net object movement so the rigid body spends a bit of extra time moving towards where it is told the ball is but you can only do that if you smooth to where the ball is going next, or if there is uniform delay. So that was removed.
Adding some smoothing+prediction makes the ball jittery and the ball trail look awful. And the action is too fast for it to be helpful anyway. Too many collidables.
It looks like you resolve networking by having the server run multiple iterations of a simulation of the game so it can know the gamestate
Additionally, where paddle hit accuracy is desired, I think you need to use the client's version of a paddle hit (don't know if necessary for flippers) and have the server verify afterwards.
The ball is quite jittery on the client, do we merge this anyway, @Cheeseness ? It's certainly easier to hit the ball though.
I think let's pull this in and improve from here.
Unity was adding extra network delay by moving towards the new position. Now it instantly jumps to the new position.
Paddle delay is still a bit much for my liking.
146