Shows which clients are still loading after gamestart.
Details
- Reviewers
elexis - Commits
- rP19320: Display which clients are still in the loading screen
Start a game with multiple clients with different loading speed.
Ensure, the right clients are displayed as waiting for.
Simulating different loading speeds:
- Apply the following patch on top of the proposed one:
- Add the "setlag" function to your .bashrc file (described in http://trac.wildfiregames.com/ticket/3264#comment:5) . The tool comes with the iproute tool and should be installed already on unix systems.
- Start a networked gamesetup and chose a random map script
- Join via the global IP address and call setlag 800 to prevent becoming disconnected (refs #3700). As the lag is only applied to eth0, only the non-hosting client is affected.
- Start the game and observe the window of the hosting client
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Build is green
Updating workspaces. Build (release)... Build (debug)... Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/304/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/324/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/430/ for more details.
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/431/ for more details.
Tested with a sample size of 2 and works fine after your fix yesterday.
In particular works when the remaining client disconnects instead of finishing the loading screen.
Just few style optimizations recommended.
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
140 ↗ | (On Diff #642) | (Okay to use players instead of clients here, as observers can be considered players that don't participate in the current match too and we don't want to bother our users with technical terms. Also afaics the list can never be empty, so ending with a colon is ok) |
597 ↗ | (On Diff #642) | This looks like it assumes no other netstatus messages while in that waiting period. |
613 ↗ | (On Diff #642) | Since all other occurances don't have translation context either, seems ok to keep it consistent |
binaries/data/mods/public/gui/session/session.xml | ||
162 ↗ | (On Diff #642) | ghost props needed? For the Exit button likely, wondering why the label of the button needs to be a custom text object in the first place. |
source/network/NetClient.cpp | ||
129 ↗ | (On Diff #642) | Can't think of a missing transition, as the synchronizing state should be ruled out as we don't have people rejoining after the first turn |
789 ↗ | (On Diff #642) | guids is okay (I can imagine us replacing all guids with GUIDs and findGuidForPlayerID with findGUIDForPlayerID some day) |
790 ↗ | (On Diff #642) | const & |
source/network/NetMessages.h | ||
197 ↗ | (On Diff #642) | GUIDs |
source/network/NetServer.cpp | ||
1184 ↗ | (On Diff #642) | player -> client |
1188 ↗ | (On Diff #642) | 2017-02-06-QuakeNet-#0ad-dev.log:17:59 < elexis> CheckGameLoadStatus could return true, so you dont send the message if its the last client that loaded |
1189 ↗ | (On Diff #642) | // Inform clients that another client has finished the loading screen and who's missing or something to that effect |
1199 ↗ | (On Diff #642) | // Send to the loaded client who is still in the NSS_PREGAME state? |
source/network/NetServer.h | ||
258 ↗ | (On Diff #642) | /** |
source/network/NetClient.cpp | ||
---|---|---|
789 ↗ | (On Diff #642) | guids.reserve(message->m_Clients.size()); doesn't matter much here, but just to get used to it, refs D105#inline-1973 |
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
597 ↗ | (On Diff #642) | "This looks like it assumes no other netstatus messages while in that waiting period." Sure, as that is totally correct. Which other message should arrive during waiting period? |
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
597 ↗ | (On Diff #642) | Lag warnings? Kick? Player Assignments? |
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
597 ↗ | (On Diff #642) | Ah yes, confused g_StatusMessageTypes with g_NetMessageTypes. If the renaming proposed is done, that should be more self-evident |
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (302 tests)..............................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/455/ for more details.
source/network/NetServer.cpp | ||
---|---|---|
1199 ↗ | (On Diff #642) | As in add that comment? |
source/network/NetServer.cpp | ||
---|---|---|
1199 ↗ | (On Diff #642) | Yeah, I did!? |
binaries/data/mods/public/gui/session/messages.js | ||
---|---|---|
589 ↗ | (On Diff #687) | remove that false &&. |
source/network/NetClient.cpp | ||
790 ↗ | (On Diff #642) | thx |
source/network/NetServer.cpp | ||
1191 ↗ | (On Diff #687) | all GUIDs of clients in the loading state |
1200 ↗ | (On Diff #687) | // Send to the client who has loaded the game but did not reach the NSS_INGAME state yet? |
source/network/NetServer.h | ||
259 ↗ | (On Diff #687) | whether. maybe. |
262 ↗ | (On Diff #687) | capital r, period |
Build is green
Updating workspaces. Build (release)... Build (debug)... Running release tests... Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK! Running debug tests... Running cxxtest tests (305 tests).................................................................................................................................................................................................................................................................................................................OK!
http://jw:8080/job/phabricator/563/ for more details.