Double-Fine-Game-Club / pongball

Pongball is a team based multiplayer game blending pong and pinball.
https://forums.doublefine.com/forum/80-pongball/
MIT License
11 stars 17 forks source link

removed interpolation, upped send rate #189

Closed osse101 closed 7 years ago

osse101 commented 7 years ago

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

osse101 commented 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 seconds ahead and send that to the clients.
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.

ghost commented 7 years ago

The ball is quite jittery on the client, do we merge this anyway, @Cheeseness ? It's certainly easier to hit the ball though.

Cheeseness commented 7 years ago

I think let's pull this in and improve from here.