You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting to the server probably some players have already noticed that sometimes the game can completely freeze, and then unfreeze after the timeout has been hit.
This is because when connecting to the server, the game expects a response packet but doesn't always get it right away, blocking the entire game loop including rendering. The way it's done now is completely wrong because of possible blocking, we need to do an asynchronous design. The response to the packet should be received via event loop, if the packet is received, then handle the corresponding connection event, thus implementing a deferred event invoke.
When connecting to the server probably some players have already noticed that sometimes the game can completely freeze, and then unfreeze after the timeout has been hit.
This is because when connecting to the server, the game expects a response packet but doesn't always get it right away, blocking the entire game loop including rendering. The way it's done now is completely wrong because of possible blocking, we need to do an asynchronous design. The response to the packet should be received via event loop, if the packet is received, then handle the corresponding connection event, thus implementing a deferred event invoke.
https://github.com/Warzone2100/warzone2100/blob/master/lib/netplay/netplay.cpp#L5008
The connection operation should be redesigned with an appropriate interface, preferably displaying an abort dialog.
The text was updated successfully, but these errors were encountered: