Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third Party Photon Unity Networking - Lagging / Jittering

Discussion in 'Multiplayer' started by Reeii, Feb 25, 2016.

  1. Reeii

    Reeii

    Joined:
    Feb 5, 2016
    Posts:
    91
    Hey guys,
    im a beginner in Unity and i need some help.

    I created a game with the Standard Assets Car Controller and PUN. Everything's working fine, but the cars are lagging or jittering, something like that.
    I already read some threads about this, but they couldn't fix my problem.

    Does anyone knows a solution? :/
    And do you need some code or something of my project to analyze that?

    Thanks.
    J927
     
  2. BFGames

    BFGames

    Joined:
    Oct 2, 2012
    Posts:
    1,543
    Did you read up on using interpolation and extrapolation for network simulations? If not give it a google :)

    Good Luck.
     
  3. Reeii

    Reeii

    Joined:
    Feb 5, 2016
    Posts:
    91
    Hey, thanks for your answer! :)

    This interpolation and extrapolation thing was one aspect i've read about in previous threads, but I still don't understand how it's working. Does the interpolation shift the time back in rendering to avoid dropped packets?

    And I only found texts that explained the working of interpolation and extrapolation, but not, how I activate, create, whatever it. Or am I to dumb for this? :/

    Thanks.
    -J927
     
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,062
    PUN has a sample in a folder named "DemoSynchronization". It's not for cars but you should get the idea and be able to apply this for cars.

    Also, take a look at this tutorial, which focuses entirely on using PUN for a racing game:
    http://forum.unity3d.com/threads/released-pun-rally.371116/
    The videos might give you some insight. The package itself is a cooperation with an external developer, which is the reason why it's not entirely free.