State Buffer - Interpolation/Extrapolation, Smoothing

Hi,
I just tried to use a State Buffer to get a better Synchronization.
As references i used
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
http://wiki.unity3d.com/index.php/NetworkView_Position_Sync
and some other old Forum posts.

The Technique works good so far but i got some kind of jitter. After Implementing Extrapolation, i figured out it switch between Interpolation and Extrapolation quite often.Even if it does not, there is no smooth Movement.

My code:
https://pastebin.com/VeiAQ8ft

I would be very Interested in some Optimization, hints, tips..

Comments

  • Are you using an initial delay to fill the buffer somewhat?

    I (personally) have no experience yet with state buffers. Maybe you can keep us posted on what you find out and then others will join the discussion...
  • S_Oliver
    S_Oliver ✭✭✭
    edited April 2019
    Now its working. Set SendRate and SerializeRate to 20 and it should work ok.

    There is still a lot of improvement, will post again if made some .
    https://pastebin.com/z4g7Yk3d
  • Thanks @S_Oliver for sharing your code. It helped me start working on my own synchronization code.

    The Extrapolation() function in the last pastebin lacks the actual extrapolation though :).

    I also have found that it is useful to add some sort of smoothing. I compute a position in the future and then move towards it instead of just teleporting.
  • S_Oliver
    S_Oliver ✭✭✭
    edited August 2019
    olistan said:

    Thanks @S_Oliver for sharing your code. It helped me start working on my own synchronization code.

    Your welcome.

    olistan said:


    The Extrapolation() function in the last pastebin lacks the actual extrapolation though :).

    I also have found that it is useful to add some sort of smoothing. I compute a position in the future and then move towards it instead of just teleporting.

    I didn't elaborate this part.
    Would be nice to see how you improved the Extrapolation part.
    @olistan

  • Hello, i up this topic for to know if you , @S_Oliver and @olistan , have since last messages solve to improve the smooth/lag problem ?