- Home /
Checking if the other device is out of the application in Network Game
Hi there. I'm currently working on a turn-based mobile game which uses the networking system for multiplayer purpose. At the moment I'm trying to make the game ends if both of the player closes the application (press Home for example). The way that I want to do this is by making the player's device sends out a message to the other device on pause. This way, when the second player closes the application, the game will declare that both players are out and end the match. And when the player open the game again, the game will show that the game have ended.
The problem is with the first player. Since he closed his game first, he won't received the message when the second player closes their game. So when he open the game again, the game will change his status first and then received the message that the other player have close their game (the message was set to buffer). But since only one is consider closed, the game won't be declared end.
So the question is; is there a better way to find out if the other device have close the game, or a better way of doing this?