I am developing a multiplayer tic tac toe game. The issue I'm facing at the moment is knowing whether the other player is in the game or not. Each player is running their own session, and should a player's session not exist, the game should end. How can I know whether the other player session exists or not?
Tell me more
×
Game Development Stack Exchange is a question and answer site for
professional and independent game developers. It's 100% free, no registration required.
|
|
Simply have a timer. For example if a player gets 5 seconds then show a countdown for that 5 seconds and if the player hasn't made their turn by then I would say there is a 90% chance that the player has disconnected - so they automatically 'lose'. In multiplayer games you must have some sort of timer or some players simply disconnect instead of losing. |
|||
|
|