[MULTIPLAYER] Add player readiness.

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
o01eg
Space Kraken
Posts: 175
Joined: Sat Dec 10, 2011 5:46 am

[MULTIPLAYER] Add player readiness.

#1 Post by o01eg » Mon Dec 26, 2016 10:13 pm

I propose changes to multiplayer lobby to support for check if players are ready to start game. Idea is mostly taken from freeciv and can be used for dedicated game server without host player.
[*] Add the field to the game protocol and lobby UI.
[*] Drop it if the important game's or players' changes were happened.
[*] When all human players are ready the game starts without requiring host player to press "start" button.

I don't have experience with UI so I ask for help to arrange the ready checkbox in the players list.
Image

URL: https://github.com/o01eg/freeorion/tree/player-ready
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

dbenage-cx
Programmer
Posts: 389
Joined: Sun Feb 14, 2016 12:08 am

Re: [MULTIPLAYER] Add player readiness.

#2 Post by dbenage-cx » Mon Dec 26, 2016 11:13 pm

A checkbox might be easily missed by a player here. Might I suggest reusing the start button to toggle a ready state for each player instead?

Regardless of that, looks like the column/cell alignment could be set to GG::FORMAT_RIGHT.
The column width is set to 40 without expanding the row width, so the other column width need reduction or the row needs widened.
Could reduce the checkbox column width to height + buffer, so the other columns do not need to shrink as much.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12280
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [MULTIPLAYER] Add player readiness.

#3 Post by Geoff the Medio » Tue Dec 27, 2016 11:18 am

A check box probably isn't the right UI widget in this context, as for most players in the list it won't be interactive. A simple indicator icon would suffice, and a button below, in place of "start game" would be used to indicate that a player is ready.

o01eg
Space Kraken
Posts: 175
Joined: Sat Dec 10, 2011 5:46 am

Re: [MULTIPLAYER] Add player readiness.

#4 Post by o01eg » Wed Dec 28, 2016 10:14 pm

Reworked UI. Now it use labels and "start game" button.

Image
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

o01eg
Space Kraken
Posts: 175
Joined: Sat Dec 10, 2011 5:46 am

Re: [MULTIPLAYER] Add player readiness.

#5 Post by o01eg » Sun Jan 08, 2017 4:13 pm

Thanks to dbenage-cx there is new UI for readiness:
Image
Gentoo Linux x64, gcc-7.3, boost-1.65.0
Ubuntu Server 18.04 x64, gcc-7.3, boost-1.65.1
Welcome to multiplayer server at freeorion-test.dedyn.io.Version 0.4.8
Donates are welcome: BTC:14XLekD9ifwqLtZX4iteepvbLQNYVG87zK

Post Reply