Here is a multiplayer game and I need to display two notifications to player: first when rival disconnected due to some networking problems, and second - when he left game intentionally.
Room is created with auto-match criteria (max players - 2). And each time when one of the players left game due to network problems or intentionally RoomStatusUpdateListener callbacks called in the next order:
onDisconnectedFromRoom, onPeerLeft, onPeersDisconnected.
So I show notification in onDisconnectedFromRoom callback, the problem is you can't detect if it was network problem that happened to rival or he left intentionally. Participant.getStatus() returns STATUS_JOINED.
So, how to detect if client left room intentionally?
Thank you in advance!
you can send game data between the clients. So just in case a player wants to left the game, send a message that this specific user will disconnect now to all other players.
best whishes, Steve.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With