Horrendous Lag

Options
I'm getting some terrible lag in my game. I connect to the Australian server with a ping of ~50 ms but I'm getting regular hiccups of around 0.5 seconds every second or so. I printed the difference between packet send times and they are consistent but packet received times are all over the place. I might mention I'm testing two game instances on the same connection. I'm sending two floats, a bool, a Vector3 and a Quaternion in OnPhotonSerializeView. Please help.

Best Answer

  • HomewreckersStudio
    Answer ✓
    Options
    Update: After many, many hours debugging I narrowed the issue down to my Xbox One controller. When I have the Xbox One controller paired with my Galaxy S6 the lag is present. If I use my SteelSeries Stratus XL controller instead, the lag is gone. Version details below:

    - PUN free version 1.85
    - Unity 5.6.1f1
    - Android 7.0
    - Platform: Samsung Gear VR
    - Device: Samsung Galaxy S6
    - Controller: Xbox One Bluetooth controller

Answers

  • Some more information: It only happens when I test on Android, connecting to the editor on my PC. I tested a PC build connecting to the editor and there was no lag. I'm manually instantiating the player objects and assigning view IDs to them on instantiation. I'm also using separate scripts for sending and receiving data via OnPhotonSerializeView.
  • HomewreckersStudio
    Answer ✓
    Options
    Update: After many, many hours debugging I narrowed the issue down to my Xbox One controller. When I have the Xbox One controller paired with my Galaxy S6 the lag is present. If I use my SteelSeries Stratus XL controller instead, the lag is gone. Version details below:

    - PUN free version 1.85
    - Unity 5.6.1f1
    - Android 7.0
    - Platform: Samsung Gear VR
    - Device: Samsung Galaxy S6
    - Controller: Xbox One Bluetooth controller