#3263 closed enhancement (fixed)
[PATCH] Objectives / Map & gamesettings info dialog
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 21 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description (last modified by )
A new dialog should be added that displays information about the players and the map settings.
It should be accessible with a button at the top right (near the diplomacy & trade menu buttons) and contain the following information:
Player Info:
- List of players and observers
- FPS and ping of players (that is ping from server to client)
- Connection state of players (to see who is disconnected)
- Buttons for kicking / banning / muting players (see #3241)
- Display which players are AI and their difficulty
Map & game settings:
- Mapname, size & description
- Population limit
- Victory condition
- Starting resources
- Initial ceasefire time
- Gamespeed
- Weather or not cheats, ratings and locked teams are enabled
Besides the kick feature, only the FPS and ping of players data is not known to clients and must be broadcasted by the host. Not sure if the latency can be computed already from the existing packet exchange.
The FPS must be sent from the client to the host before it can broadcast that info. The frames per second value is available in c++ with g_frequencyFilter->StableFrequency()
. Often the game is lagging because it waits for a single client to finish the computation of the current turn. By displaying the FPS of all players in that dialog it is possible to find out if there is a client that has way less FPS than other clients and is therefore likely to cause the lag (especially if it is less than 30 fps). If the processing of the current turn is so time consuming that multiple clients are lagging, then this situation can be identified too, so that no one will be accused of being the lagger without a reason.
Attachments (2)
Change History (18)
comment:1 by , 9 years ago
follow-up: 4 comment:2 by , 9 years ago
Indeed I don't think simulation messages are the correct way to implement that, it really only needs to be updated once per turn. See also #69; I would like to have latency listed in game setup, too.
comment:3 by , 9 years ago
Another thing to consider: it may be necessary / more useful to average the ping values, depending on how frequently they are collected, instead of simply storing the last value.
comment:4 by , 9 years ago
Replying to historic_bruno:
Indeed I don't think simulation messages are the correct way to implement that, it really only needs to be updated once per turn. See also #69; I would like to have latency listed in game setup, too.
It should be updated more frequently than once per turn, so that you can follow the latency changes even when the game is pausd or lagging. I agree about the ping in the gamesetup. Would be great to kick laggers before starting the game.
Replying to historic_bruno:
Another thing to consider: it may be necessary / more useful to average the ping values, depending on how frequently they are collected, instead of simply storing the last value.
As noted here http://enet.bespin.org/group__peer.html for void enet_peer_ping
, it already computes the mean RTT:
ping requests factor into the mean round trip time as designated by the roundTripTime field in the ENetPeer structure. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests.
Thanks for the early feedback :D
comment:5 by , 9 years ago
I think the player info part shouldn't display the diplomacies nor the civs, but only the buttons (kick / ban / mute) and technical information (online/offline state, FPS, latency, ready state of the NetTurnManager). The diplomacy manager would be really crowded if all of that would be in there. Also all observers should be displayed, so additional rows are required too.
comment:6 by , 8 years ago
Priority: | Nice to Have → Must Have |
---|
Totally needed as we already started a few games where we didn't know whether we had set the victory condition to conquest or wonder. There are lag-warnings now (#3264), but we also need buttons to kick/ban people (refs ticket somewhere).
comment:7 by , 8 years ago
The network part needs to be done in #3787, so it could be reused in the gamesetup.
comment:11 by , 8 years ago
Keywords: | patch rfc added |
---|---|
Milestone: | Backlog → Alpha 21 |
Summary: | Map & player info dialog → [PATCH] Map & player info dialog |
Patch can be found at https://github.com/elexis1/0ad/commits/3263-gameinfo-dialog Notice it also adds some of those strings (those that can't be found in the more-options window) to the gamesetup.
follow-up: 13 comment:12 by , 8 years ago
gamedescription.js
L11 var --> let
L65-115 maybe some ternary's would be more cleaner (don't make everything ternary tough)
Translation: Describe a player in a selected game, f.e. ...
many of theses duplicate comments, 1 is enough at declaration.
L310-12 could use another tabulation.
menu.js
L617-20 open
is not really needed. (The check seems redundant too as we close it just before so it should be closed always)
.xml files in top_panel
why adding -28
and don't merge it with the number there is already?
Treasures doesn't seem to be added in the objectives. Cheats is only shown when it is enabled, I guess this is wanted. (can agree with it) Same for Revealed and explored map, but it might be nice to add them too when disabled.
comment:13 by , 8 years ago
Keywords: | review added; rfc removed |
---|---|
Summary: | [PATCH] Map & player info dialog → [PATCH] Objectives / Map & gamesettings info dialog |
Thanks for your comments! I have addressed your remarks in two github commits.
Also improved some styling and fixed minor things. IMO it is complete now and can be committed.
With regards to sanderd17 suggestion to nuke the more options window in the gamesetup -> that should be easy to do once vertical scollbars for parent objects are implemented, but prior we don't have enough screenspace (and I'm not fond at all of introducing multiple gamesetup pages).
Replying to bb:
L11 var --> let
fixed
L65-115 maybe some ternary's would be more cleaner (don't make everything ternary tough)
Translation: Describe a player in a selected game, f.e. ...
many of theses duplicate comments, 1 is enough at declaration.
Those are translation comments and the python script picks up those and hands them over to transifex. But you might be right that transifex users might be happy with one copy of the comment. Either way, not removing the comments since it would mean to add unneeded translation work (new strings) afaik.
L310-12 could use another tabulation.
The present way highlights that it's an if-else-if block basically
menu.js L617-20
open
is not really needed. (The check seems redundant too as we close it just before so it should be closed always)
The purpose of that variable is to keep in mind whether the window was opened previously, thus allowing to actually toggle that window.
why adding
-28
and don't merge it with the number there is already?
fixed
Treasures doesn't seem to be added in the objectives.
fixed
Cheats is only shown when it is enabled, I guess this is wanted. (can agree with it) Same for Revealed and explored map, but it might be nice to add them too when disabled.
show 'em all (since late observers might wonder how things were set before the map got revealed on victory f.e.) and it's not obvous that a non-displayed setting means that it's disabled.
comment:15 by , 8 years ago
Keywords: | review removed |
---|
Also thanks to sanderd17, fatherbushido and niektb for some partial reviews.
by , 8 years ago
Attachment: | backup_3263-gameinfo-dialog.7z added |
---|
Backup of the 27 github commits making up r18692. Deleting the github branch.
comment:16 by , 7 years ago
Description: | modified (diff) |
---|
For all players should also be visible besides being offline that a player has also been kicked or banned.
The ping / latency / round trip time is already saved and can be found in
CNetServerWorker::RunStep()
using:Those values should be saved into a global array in the NetServer.
Since the
CSimulationMessage
is broadcasted frequently, it could be used to store the RTT as well. However it currently sends only a single command as far as I can see. So maybe broadcasting a new message type every two seconds might be smarter.