jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
157 stars 63 forks source link

Server shutdown should cause client to reset #79

Closed lpassey closed 3 years ago

lpassey commented 3 years ago

When a client is connected to a server and the server shuts down, the client displays the shutdown message but nothing further occurs. Instead, the main game window should close, and the client "Connect" window should close and return to the "Connect/Practice/Start" window, probably after acknowledging the server shutdown message.

jdmonin commented 3 years ago

When the client gets disconnected from the server (because of network problems or a server shutdown), we want to give them options but not lose any information. By keeping game windows open, they can preserve what they want from the interrupted game (screenshots, copy-paste chat history or action log, etc.). I'd be dismayed if a fun game disappeared suddenly while I was playing. :)

I ran a quick test; when the network is dropped or the server process is stopped, the game window stays open and the client shows the useful "Connect/Practice/Start" window. But when the server is cleanly shut down with a command, that "Connect/Practice/Start" window doesn't appear.

The "Connect/Practice/Start" window should definitely be shown at a server shutdown; thanks for noticing that. I'll leave the game windows open though.

jdmonin commented 3 years ago

@lpassey I think this should take care of it. At shutdown, client returns to the "Connect/Practice/Start" window and shows the shutdown message text there.

If there's anything I've missed from your suggestion, please let me know :)