#2447 closed enhancement (fixed)
[PATCH] Require that all users confirm game settings before host can start game.
Reported by: | scythetwirler | Owned by: | scythetwirler |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 16 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
We should have some kind of confirmation screen that all players accept the current configuration of map, civs, teams etc.
This will probably also involve including some kind of kicking capability for the host so that clients that want to abuse the system by rejecting all settings every time and preventing the game from starting can be dealt with.
This confirmation should not inhibit the client's ability to actually view the settings that they are about to confirm/reject.
Attachments (8)
Change History (35)
comment:1 by , 10 years ago
Summary: | Force all users to confirm game settings before host can start game. → Require that all users confirm game settings before host can start game. |
---|
comment:2 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
Keywords: | patch review added |
---|---|
Summary: | Require that all users confirm game settings before host can start game. → [PATCH] Require that all users confirm game settings before host can start game. |
by , 10 years ago
Attachment: | ready.patch added |
---|
Side effect: deletes the player name column because it wouldn't fit otherwise.
comment:5 by , 10 years ago
Keywords: | review removed |
---|
We shouldn't be communicating important data using hidden chat messages, we have an existing system for sending that data. I've started working on extending the C++ API to supports a per-user "status".
comment:7 by , 10 years ago
Keywords: | review added |
---|
by , 10 years ago
Attachment: | readyv2.patch added |
---|
comment:8 by , 10 years ago
Keywords: | review removed |
---|
The patch is well coded, but I think the separation between ReadyData and PlayerAssignments is synthetic. In most occasions where g_PlayerAssignments would be accessed or changed, g_ReadyData would be as well. Separating them allows more surface for bugs to appear and creates repetitive logic. In the worst case, combining the objects and messages results in the ReadyData field being unused sometimes. I really dislike asking people to go rewrite working code, but I think the benefits are worthwhile in this case. If I remember correctly, a great computer science professor at Stanford said something like, "the mark of a true programmer is not in how well the code works, but in how well others can read and understand it."
by , 10 years ago
Attachment: | readyv3.patch added |
---|
comment:9 by , 10 years ago
Keywords: | review added |
---|
ReadyData and PlayerAssignments have been merged in this patch.
comment:10 by , 10 years ago
There's some remnants of the checkbox GUI code commented out that I'll take out if this current GUI is accepted.
by , 10 years ago
Attachment: | readyv4.patch added |
---|
comment:11 by , 10 years ago
Keywords: | review removed |
---|
TODO: Convert the changes to be internationalization-friendly (also make an updated diff after the internationalization commit).
comment:12 by , 10 years ago
Keywords: | review added |
---|
I'd like some people to help test this, as it's difficult to test multiplayer by myself.
follow-up: 14 comment:13 by , 10 years ago
Line 172 of gameSetup.xml has a small mistake in it (325 instead of 315 px). Not your fault, but it will be easier if you fix it (no conflicts).
comment:14 by , 10 years ago
Replying to sanderd17:
Line 172 of gameSetup.xml has a small mistake in it (325 instead of 315 px). Not your fault, but it will be easier if you fix it (no conflicts).
Fixed in this version :)
follow-up: 16 comment:15 by , 10 years ago
gamesetup.js:
- L452: Could just be if(a && b) instead of if (a) if (b).
- L903: The check for the automatically added " ($number)" string is a hack. (Having a player with a nick with a "(" in it will break it)
- L1254 and L1268: No need to add trailing whitespace.
- L1562: Make it else if (a && b)
- L1575: Same, also move the comment to a new line.
- L1673: Use if(!a) continue.
- L1695: Missing semicolon.
NetHost.h:
- Why is it an i32?
NetServer.cpp:
- L688: Useless braces.
- Switch the parameters for ReadyPlayer().
comment:16 by , 10 years ago
Replying to leper:
gamesetup.js:
- L452: Could just be if(a && b) instead of if (a) if (b).
- L903: The check for the automatically added " ($number)" string is a hack. (Having a player with a nick with a "(" in it will break it)
- L1254 and L1268: No need to add trailing whitespace.
- L1562: Make it else if (a && b)
- L1575: Same, also move the comment to a new line.
- L1673: Use if(!a) continue.
- L1695: Missing semicolon.
NetHost.h:
- Why is it an i32?
NetServer.cpp:
- L688: Useless braces.
Thanks for the review. These have been resolved.
Replying to leper:
- Switch the parameters for ReadyPlayer().
I'm not sure what you mean? If you meant swapping the order, I just followed the same order AssignPlayer had.
comment:19 by , 10 years ago
Keywords: | review added |
---|
Bug fixed and order of ReadyPlayer parameters swapped.
by , 10 years ago
Attachment: | 2014-04-26-101300_1920x1080_scrot.jpg added |
---|
comment:21 by , 10 years ago
I haven't gotten the patch working locally yet, but I can't tell how you are supposed to change your ready status from that screenshot?
comment:22 by , 10 years ago
That's from the host's point of view; from a client's perspective, the start game button switches between "I'm ready!" and "I'm not ready".
comment:23 by , 10 years ago
Hmm, I thought we were going for something similar to that checkbox-style system you showed earlier, but I guess this could work.
Also please remove the asterisk before the ready messages. It's inconsistent on the gamesetup screen.
Another thing that wasn't caused by your patch, but could you colorize the other uses of the player name on the gamesetup screen? (for example the player leave/join messages in your screenshot)
comment:25 by , 10 years ago
Keywords: | review removed |
---|
Something's not right with the image scaling of the checkboxes (they get cut off) and I'm not too familiar with that part of the code. Any ideas? EDIT: fixed. Thanks historicbruno!