Search Unity

Third Party [Solved] Need Help! Photon Unity Networking Disconnect Issue

Discussion in 'Multiplayer' started by WiseFolkStudios, Jul 20, 2014.

  1. WiseFolkStudios

    WiseFolkStudios

    Joined:
    Jul 20, 2014
    Posts:
    4
    Hello!

    We are having an issue with Photon Unity Networking disconnecting the Master Client at random points. Our application is a semi-serious application. The issue occurs when updating a texture that is drawn on (UnityPaint modification).

    The send/receive functions work fine, but when we are testing the Master Client will disconnect after drawing for too long - but it does not appear to the MC that it has disconnected. It just shows that the other clients have disconnected. Our application relies heavily on the Master Client being the moderator. We have checked our average messages per room - and it is around 50, not 500. We are using Unity version 4.5.0f6 on a Windows 8.1 computer. Our internet connection speed is 9mb/s.
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    How did you solve the drawing? Do you send the lines or something? Or updates of the texture or isn't it synced at all?
    If you send the whole texture, it might be a lot of data in few messages. Then your bytes/sec would be high.

    Could you send a repro case to: developer@exitgames.com?
     
  3. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    3,070
    We took a look at your project and were able to reproduce the issue.
    It's not really a bug in Photon - there are simply too many "big" messages sent (even) while drawing.

    Concrete example:
    SendNewTexture is sending the full 5kB texture about 40 times when simply drawing a line.

    Limiting SendNewTexture call to one per painting already significantly reduces the network load.
    In best case you send only the geometric parameters instead of the texture (e.g. start and end points of lines).

    If you must, send the texture from time to time to sync the full state.
     
  4. WiseFolkStudios

    WiseFolkStudios

    Joined:
    Jul 20, 2014
    Posts:
    4
    Thank you for your help, we had no clue that we were sending that often! We will edit our code to implement your suggestions.