Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3476 closed enhancement (fixed)

[PATCH] Add more information about lobby matches

Reported by: Stan Owned by: elexis
Priority: Nice to Have Milestone: Alpha 21
Component: Multiplayer lobby Keywords: patch
Cc: Patch:

Description (last modified by elexis)

As of alpha 19 only few information is displayed in the lobby about running games. It would be nice to add more details:

  • Connected players and observers
    • We already show the list of initial clients. But it is not updated with late-observer-joins, resulting in only some observers being listed for that game.
    • Sometimes people are listed in multiple games if they were present when it started. So making that distinction between online and offline would help clarifying.
    • Online players could appear in their lobby color while offline players could be displayed in gray.
  • Gamestart-time
    • Useful for estimating if the game will end in the near future or if it has been started just seconds ago. (see #3023)
  • Teams
    • Would be nice to see and wouldn't add too much information to the gamelist-packet and GUI. See the outdated screenshot.
  • Defeated players (maybe)
    • Would also help estimating if the game will end soon, also if it is worth to join as spectator.
    • Using a strike-through font would be nice for that (we don't have one currently).

Attachments (7)

t3476_dont_even_look_at_it_wip.patch (11.3 KB ) - added by elexis 8 years ago.
completely broken WIP from 2015_04_10, in case it helps anyone.
3143_lobby_data_v2.6_lobby_bot_v3.patch (1.1 KB ) - added by Imarok 8 years ago.
Add startTime to the lobby attributes
3143_lobby_data_v2.6_lobby_bot_v4.patch (1.1 KB ) - added by Imarok 8 years ago.
improved
3476_start_time_lobby_bot_v1.patch (637 bytes ) - added by Imarok 8 years ago.
Lobby bot now sets the game start time property when game is started
3476_start_time_lobby_bot_v1.1.patch (1.6 KB ) - added by elexis 8 years ago.
Briefly tested positive
3476_start_time_lobby_v1.1.patch (3.9 KB ) - added by Imarok 8 years ago.
Display game start time
3476_start_time_lobby_v1.2.patch (4.5 KB ) - added by Imarok 8 years ago.
Don't use hardcoded numbers for resizing

Download all attachments as: .zip

Change History (22)

comment:1 by Stan, 9 years ago

Sample Image from elexis to demonstrate https://i.imgur.com/U0J7qs8.png

Last edited 9 years ago by Stan (previous) (diff)

comment:2 by elexis, 9 years ago

Notice that we might reuse code in source:/ps/trunk/binaries/data/mods/public/gui/replaymenu/replay_menu.js that constructs the team/civ/ai string.

Notice the "lag estimation" would have to take paused times into account and should not be added until after #1950 is solved.

The turn number doesn't seen to be displayed, but it is used to compute the ingame time.

Last edited 8 years ago by elexis (previous) (diff)

comment:3 by wraitii, 8 years ago

Milestone: BacklogAlpha 20

comment:4 by elexis, 8 years ago

Description: modified (diff)
Priority: Should HaveNice to Have

comment:5 by elexis, 8 years ago

Description: modified (diff)

comment:6 by elexis, 8 years ago

Milestone: Alpha 20Backlog

Backlogging due to lack of progress.

by elexis, 8 years ago

completely broken WIP from 2015_04_10, in case it helps anyone.

comment:7 by Imarok, 8 years ago

Should use formatPlayerData for fromatting the player data

by Imarok, 8 years ago

Add startTime to the lobby attributes

comment:8 by Imarok, 8 years ago

Keywords: review added

by Imarok, 8 years ago

improved

comment:9 by Stan, 8 years ago

Keywords: patch added
Summary: Add more information about lobby matches[PATCH] Add more information about lobby matches

comment:10 by elexis, 8 years ago

In 18534:

Submit and display more information about matches in the lobby. Patch by Imarok, refs #3476.

Includes team numbers, online/offline- and won/defeated state, AI type and difficulty for running games and
only the playernames with observer-player distinction in the gamesetup.
Use JSON format inside the XML stanza and minimize traffic by packing teams.

Use the observer distinction to correctly apply the "full games" trigger in the lobby, fixes #3143.

XPartaMupp patch applied by scythetwirler.
unescapeText function by sanderd17, refs #3409.

comment:11 by elexis, 8 years ago

Keywords: review removed
Milestone: BacklogAlpha 21

Thanks for the patch! I will leave this ticket open as the gamestart timestamp should also be sent by XpartaMupp.

Here the diff between the commit and the last patch uploaded:

  • Pointless teamDescription.concat
  • Adding three more comments to the functions that send the data and do the peculiar playerdata transformations
  • formatClientsForStanza -> renaming list to playerData and moving the duplicate thing out of the if statement
  • Not needed to change that string Players: %(current)s/%(total)s
  • Inlining playerData.Offline for the time being
  • Fixed typo in my previous rewrite that wasn't finished nor tested before upload (State -> state, Offline -> offline, +team -> team, playerID-1 -> playerID, if +playerID == 0 continue)

Notice when having only clients observing the AIs and no players will show up as 0/N players in the lobby, but given by our definitions that seems okay.

Also mentioning that the lobby color isn't the actual ingame color, for anyone who will wonder later (not saving that data because who cares about the color and we want to minimize traffic)

I still believe it would be preferable if we didn't mix JSON and XML. That needs an implementation in the glooxwrapper and should likely be used when transfering the rated game report (instead of comma separated values).

by Imarok, 8 years ago

Lobby bot now sets the game start time property when game is started

comment:12 by elexis, 8 years ago

Thanks scythetwirler for checking the error log:

TypeError: 'float' object not iterable

on the iq.send line of sendGameList.

The updated patch fixes the issue by converting to string and rounding off the unneeded microseconds (to save some bytes network traffic) and implements the clientside adaptation. Engine.GetGameList() now returns the starting time of the match and just needs to be displayed.

by elexis, 8 years ago

Briefly tested positive

by Imarok, 8 years ago

Display game start time

comment:13 by Imarok, 8 years ago

Keywords: review added

by Imarok, 8 years ago

Don't use hardcoded numbers for resizing

comment:14 by elexis, 8 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 18601:

Display the gamestart time in the lobby. Patch by Imarok, combined with r18534 fixes #3476.
XPartaMupp patch reviewed by scythetwirler.

comment:15 by elexis, 8 years ago

Keywords: review removed

Thanks Imarok and scythetwirler for your efforts implementing and debugging this!

Note: See TracTickets for help on using tickets.