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
Client-server connections can be de-synced if the game have too slow or lagging players. E.g. there are possible weird error "all players wait each other priority" (players can only concede).
Broken code examples (player 2 must take action)...
Ideal (works fine):
server got new priority step (e.g. main phase);
server send player 1 message about priority;
server send player 2 message about priority;
server send player 3 message about priority;
server send player 4 message about priority;
server wait answer from player 2;
player 2 send answer to server;
If player 2 too fast to answer or player 3 or 4 got connection lags then server will stuck on sending process and do not switch to wait mode. That's why player 2 answer will be ignored. But after that player 2 can't answer again -- only "concede" can work (it's non priority command).
Bad (broke the game):
server got new priority step (e.g. main phase);
server send player 1 message about priority;
server send player 2 message about priority;
server send player 3 message about priority;
player 4 got lagged;
player 2 send answer to server;
server send player 4 message about priority;
server wait answer from player 2;
Load testing can help to find out that bad things -- I'm rewrote that tests (see mage-tests->load folder), they are was broken and do not work (e.g. got priority errors and other things).
Now that load tests works fine and you can test server stability and performance by run test_MultipleGames test (change MAX_GAMES to max parallel games).
Code example for player's request/answer sync:
prepareForResponse(game);
if (!isExecutingMacro()) {
game.fireChooseChoiceEvent(playerId, choice);
}
waitForResponse(game);
Client-server connections can be de-synced if the game have too slow or lagging players. E.g. there are possible weird error "all players wait each other priority" (players can only concede).
Broken code examples (player 2 must take action)...
Ideal (works fine):
If player 2 too fast to answer or player 3 or 4 got connection lags then server will stuck on sending process and do not switch to wait mode. That's why player 2 answer will be ignored. But after that player 2 can't answer again -- only "concede" can work (it's non priority command).
Bad (broke the game):
Load testing can help to find out that bad things -- I'm rewrote that tests (see
mage-tests->load
folder), they are was broken and do not work (e.g. got priority errors and other things).Now that load tests works fine and you can test server stability and performance by run
test_MultipleGames
test (change MAX_GAMES to max parallel games).Code example for player's request/answer sync:
The text was updated successfully, but these errors were encountered: