Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Networking - weird spike from time to time

Discussion in 'Multiplayer' started by Ilan1903, Aug 2, 2019.

  1. Ilan1903

    Ilan1903

    Joined:
    Aug 2, 2019
    Posts:
    3
    The video is server view

    So I've tried TCP/UDP/UNET(2017) and every single one of them show the same problem of a lag spike from time to time. I also changed encoding stuff along the way to make it even faster, but no changes (it's definitely faster than fixedupdate)
    Sending and receiving is handled by FixedUpdate(changing its time also didn't help at all).
    I'm sending rotation of a cube in LLAPI (just basic messages) from a phone to pc, then it encodes it to float and send it to object. It's really important to me to have this 1-1 movement. Is it even possible?
    I've counted packets, nothing is lost, there is stable amount of them in every second, so I dont know what can cause this
     
  2. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,240
    Garbage collection spike? Check the profiler when the spike occurs
     
    Joe-Censored and Ilan1903 like this.