• Hello, Everthing is fine running smoothly, but a multiplayer game without reconnection is actually not a multiplayer game. What happens now is when i get disconnected from server I get thrown out of game to the main screen and after turning on the internet i do not get back to my still running game.

    What should happen - if i got disconnected or internet lost then retry popup should appear for some duration lets say 15 secs if he doesnt get back to game till that time then we can kick him out of the game but if he gets back within time period then he can continue his game without any data loss or bugs.

    this is not an easy part to implement , I tried to do this but i got so many bugs.
    Can you please implement it ? It would be a great help to us also and will complete this project also.

  • Hello santosh,

    what are you currently using as network backend, UNET or Photon?

    I'm not sure whether UNET even supports reconnects at all. For Photon I've seen this is possible, however it might require saving the current active session or some kind of room token.

    I'm not exactly sure how to approach this yet, so I can't provide a delivery date. What have you tried to implement this before?

  • I am using photon, IDK the proper way to do re connection part, what i do is when player disconnects then i store all the players properties locally like player state (position, score ,kill count, bullets count, bullet type,team) and everything which is needed after reconnecting to game. and show him a popup "Reconnecting" and in the back i continuously run a coroutine to reconnect player to same room. and when player get back online i apply all these saved properties to players again and all other players get synced due to photonTransformView.
    but lets say i have bad intenet speed, and got disconnected multiple time and reconnected back then i see many bugs in game score, kill count, bullet type etc.

    but sometime photon gets disconnected immediately in low network connection and sometimes it takes some time. so it create some kind of bugs.

  • Thanks. Photon does have a timeout value, so actually the server (master client) keeps the disconnected player properties for a while before removing them completely. I will look into the reconnection workflow.

  • Thanks, Yes please have a look at this and implement it. I will wait for you do it.

Log in to reply