hwoodward / Remote-Card-Games

Program for playing card games online/remotely. Goal is to play a game of hand and foot with multiple groups in different locations.
MIT License
2 stars 1 forks source link

Response to player crashing #86

Closed hwoodward closed 4 years ago

hwoodward commented 4 years ago

Describe the bug When a player crashes out and disconnects from the server we get stuck when it reaches there turn (see #12 for plans on how to proceed if they quit and aren't coming back). We also have NO mechanism for allowing them to reconnect.

To Reproduce Steps to reproduce the behavior:

  1. Start a game with two clients
  2. Disconnect one of the clients
  3. Try to reconnect

Expected behavior We want to save a status and reconnect ability for the clients. Ideally knowing their name or a code given on startup would allow you to reconnect. We also want them to come back with all their information intact.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

hwoodward commented 4 years ago

Ideas: On server side disconnect during an active game - keep the player object with all the status around. On client side don't quit - try to reconnect with a saved code from the server

On server getting a connection request during an active game - look for the 'reconnect code' information in the connect request and verify it.

hwoodward commented 4 years ago

Also look into if podsixnet has any options for handling a weaker connection. (I know they don't yet allow UDP communication)

hwoodward commented 4 years ago

PodSixNet doesn't seem to have any current options to help with this. We will have to see how common it is to get a sense of what is 'good enough' for a fix.