Which game logic should run when doing prediction for PNP state updates

Posted by spaceOwl on Game Development See other posts from Game Development or by spaceOwl
Published on 2013-10-03T09:00:55Z Indexed on 2014/08/23 16:34 UTC
Read the original article Hit count: 283

Filed under:
|
|
|

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:

  1. Figure out when the message was sent.
  2. Create a diff between NOW and that time.
  3. 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?

© Game Development or respective owner

Related posts about networking

Related posts about multiplayer