Networking State Synchronization Question

Hey guys again, I have a quick question. I'm developing a game with basic LAN functionality, using State Synchronization for players who are constantly in motion. Is there any way to combat the choppiness of the player movement across the network? Something akin to prediction on authoritative models? (My model is non-authoritative btw)

Thanks in advance!

If you mean the owner player you should:

  1. Move the player locally.
  2. Send the packet to the server.
  3. Process movement in the server and replicate to clients.
  4. On owner client linear interpolate between the server position and the local postition.

You should take a look at the networking tutorial for an example on how to do it.

I'm working on an authoritative model right now and I'm dealing with this exact same problem but in regard to AI and non auth clients. I've read somewhere that there's a technique where you delay the world time a bit to make the player not feel the lag, but I can't find any docs on it.

Another thing I'm thinking is to have the AI working not only on server but on clients as well and use the same techinque used with the owner. But not really sure about this.

Look in this networking example.

The file GraduallyUpdate.cs has an example implementation of an updating position for other players. The code should be the same whether it’s an authoritative server or not; an authoritative model only makes a serious difference in local player movement code.