Network lag issues

Options
We're having some lag issues in Photon that we can't seem to work around.

We're syncing the transforms of a small number of AIs that we're spawning continuously after player login, starting with 5 and ending at 25 AIs. When we get above 15 AIs, we see a serious lag issue that only gets worse. At 25, they're hopelessly delayed.

All the transforms are sent as reliable delta compressed with sendRateOnSerialize set to 10. Finally, this seems to only impact the AI network objects, and not our player avatar object, which also has its transform synced (but which isn't delayed at all).

We're running PUN 1.8 and connecting to our own Photon Server RC7, as we have had some RC8 update problems (see viewtopic.php?f=17&t=1059).

The master client is an authoritative server and we're testing with a single player logged in.

Comments

  • dreamora
    Options
    26 in a single room is quite a bit of data if you didn't expand the server to support scoping and handle it on the client.
    Thats 26*26*10 = 6760 messages per second for the server just for the syncing if there is a delta on each send update.
  • Tobias
    Options
    We chatted about this.
    For everyone, the solution is:

    Find PhotonHandler and where it calls SendOutgoingCommands();
    This returns if something else needs sending (but isn't sent), so make it a while loop:

    while (PhotonNetwork.networkingPeer.SendOutgoingCommands())
    {
    }

    This is something that we found might cause lag and we will apply this change to the next PUN update, too.