Opened 2 years ago

Closed 16 months ago

Last modified 16 months ago

#3476 closed enhancement (fixed)

[PATCH] Add more information about lobby matches

Reported by: stanislas69 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 18 months 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 17 months ago.
Add startTime to the lobby attributes
3143_lobby_data_v2.6_lobby_bot_v4.patch (1.1 KB) - added by Imarok 17 months ago.
improved
3476_start_time_lobby_bot_v1.patch (637 bytes) - added by Imarok 16 months 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 16 months ago.
Briefly tested positive
3476_start_time_lobby_v1.1.patch (3.9 KB) - added by Imarok 16 months ago.
Display game start time
3476_start_time_lobby_v1.2.patch (4.5 KB) - added by Imarok 16 months ago.
Don't use hardcoded numbers for resizing

Download all attachments as: .zip

Change History (22)

comment:1 Changed 2 years ago by stanislas69

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

Last edited 2 years ago by stanislas69 (previous) (diff)

comment:2 Changed 2 years ago by elexis

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 2 years ago by elexis (previous) (diff)

comment:3 Changed 2 years ago by wraitii

Milestone: BacklogAlpha 20

comment:4 Changed 2 years ago by elexis

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

comment:5 Changed 2 years ago by elexis

Description: modified (diff)

comment:6 Changed 22 months ago by elexis

Milestone: Alpha 20Backlog

Backlogging due to lack of progress.

Changed 18 months ago by elexis

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

comment:7 Changed 17 months ago by Imarok

Should use formatPlayerData for fromatting the player data

Changed 17 months ago by Imarok

Add startTime to the lobby attributes

comment:8 Changed 17 months ago by Imarok

Keywords: review added

Changed 17 months ago by Imarok

improved

comment:9 Changed 17 months ago by stanislas69

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

comment:10 Changed 16 months ago by elexis

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 Changed 16 months ago by elexis

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).

Changed 16 months ago by Imarok

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

comment:12 Changed 16 months ago by elexis

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.

Changed 16 months ago by elexis

Briefly tested positive

Changed 16 months ago by Imarok

Display game start time

comment:13 Changed 16 months ago by Imarok

Keywords: review added

Changed 16 months ago by Imarok

Don't use hardcoded numbers for resizing

comment:14 Changed 16 months ago by elexis

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 Changed 16 months ago by elexis

Keywords: review removed

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

Note: See TracTickets for help on using tickets.