Tomash667 / carpg

Combination of action rpg with roguelike.
https://carpg.pl
MIT License
16 stars 15 forks source link

Multiplayer disconnected when window not focused #410

Closed Tomash667 closed 4 years ago

Tomash667 commented 4 years ago

Reported at discord:

BobTheTimelordToday at 3:45 PM When I played alone in multiplayer on localhost in fullscreen mode, the two game instances established a connection. When focus is at server during the loading time, client gets kicked. While when focus is during loading on client, it works normally. While when I tested it windowed mode (both instances), it worked fine and it was playable (as much as possible when playing as two characters at once :smile: ). I seems logical that exclusive fullscreen mode is exclusive, but it is intersting it has effect on networking layer. @LemiCheck successfully replicated on 100% when focus was on server, @Mokai replicated once.

Tomash667 commented 4 years ago

In directx 9 fullscreen exclusive mode when window lost focus device is in lost state. Resources can't be loaded in this state so game is waiting for window to regain focus. Client get disconnected on timeout in this state.

Need to finish this first: #191

Tomash667 commented 4 years ago

Fixed in 0.15.