UDP package is full

Options
I have an issue with my game. When I make an IO game. When I InstantiateSceneObject 3 AI players(in-game player who controlled by AI) and there is A(Master client) and B(another client) in the same room. After a while, B will disconnect but there is no player B's left game logs in A's console(but I can't see the B's move from A's screen). But when I set AI players from 3 to 1. It doesn't happen. Is that because I send too much data?

Also, sometimes, I will receive log "UDP package is full. Commands in Package....." in the console after entering the room.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @Scoz,

    I think there are different things that could be unrelated:

    1. player A disconnection
    2. network overhead of AI (msg/s, traffic)
    3. "UDP package is full. Commands in Package....."

    For player A's disconnection, you should implement the disconnect callback and log the disconnect cause.
    if player B does not get the even that player A got disconnected then probably player A disconnected due to a client timeout (most frequent cause) and the server is still not aware of this. The server can take up to 10 seconds to timeout the player and tell the others about it.

    About 2, I don't think 3 scene objects can take too much unless you are sending too many things RPC / Serialization in those objects, and since they are controlled by default by the master client (player A) it got disconnected. I would look for stats first on dashboard or via client provided API/GUI.

    About 3, not sure, I need to look it up, how often does this happen? does this happen on player A or B? is it a warning or another log level? could you share full stack trace?

    What PUN version do you use?
  • Scoz
    Options
    Thanks for answering my question. I use pun2 version 2.16 Photon lib: 4.1.2.19.
    I think I may send data too frequently. I have no idea how many I can send the RPC Calls, so maybe I have sent it too frequently. I am trying to simplify the RPC Calls now.

    Also, I have updated the videos of disconnected condition. The thing I don't understand is that my master-client does lose connection with others but it doesn't receive a disconnection log(I have implemented event) and it doesn't receive others OnLeftRoom log too. When this issue happened, Other players still can join the room, but it doesn't show any connection(can't see players' movement with the right position). Please have a look.
    https://youtu.be/kLyUFYwx6pU