Which game logic should run when doing prediction for PNP state updates
- by spaceOwl
We are writing a multiplayer game, where each game client (player) is responsible for sending state updates regarding its "owned" objects to other players.
Each message that arrives to other (remote) clients is processed as such:
Figure out when the message was sent.
Create a diff between NOW and that time.
Run game specific logic to bring the received state to "current" time.
I am wondering which sort of logic should execute as part of step #3 ?
Our game is composed of a physical update (position, speed, acceleration, etc) and many other components that can update an object's state and occur regularly (locally).
There's a trade off here - Getting the new state quickly or remaining "faithful" to the true state representation and executing the whole thing to predict the "true" state when receiving state updates from remote clients.
Which one is recommended to be used? and why?