Page MenuHomeWildfire Games

Optional lobby chat presence brightness and dot, player ratings
Needs ReviewPublic

Authored by ffffffff on Dec 16 2017, 2:39 AM.

Details

Reviewers
elexis
bb
Trac Tickets
#4983
Summary

These feature are added for overloadingly crowded lobby, when u cannot follow all happening game and player presence changes in playerlist.

Changing player presence in messages in chat messages is for, knowning if the guy who chatted into chat is atm present or not.
Optional updates player presence to chat messages dynamically in brightness and optional presence dot in color if wished.

It can also add additionaly ratings to player at sender in messages (same style like in gamesetup and ingame), for directly knowing what rating is from player chatted.

like this (presence sender)

Test Plan

Enable appropriate setting in lobby options.

Post some chat message in 0ad svn lobby and change presence by /away and /back command f. e. or go into a game for testing playing presence and login with a second account into 0ad svn lobby to see that messages from player in chat are set to brightness of player with presence playing.

For testing new opened game info you will need two accounts, two see info in lobby chat.

Start a game with one account watch messages in other account for new game. Start game with bots slotted. End game. See end game message in other account.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Dec 16 2017, 2:39 AM

Didn't we already have a revision proposal for using to change the color depending on presence state?
I'll look at the bots.

binaries/data/config/default.cfg
399

I hope it doesn't cause too nasty merge conflicts to split this into two patches

binaries/data/mods/public/gui/lobby/lobby.js
116
  1. var g_PlayerList;
  2. List of online players, their ratings and presence state.
1324

return false for consistency

In D1153#46649, @elexis wrote:

Didn't we already have a revision proposal for using to change the color depending on presence state?
I'll look at the bots.

D378

ffffffff added inline comments.Dec 22 2017, 12:52 AM
binaries/data/config/default.cfg
399

Ok I split ratings out to another patch.

Presence dot still missing for making a dropdown three-way option like:

"none"
"brightness"
"dots"
"brightness + dots"

Split other patch. :(

ffffffff updated this revision to Diff 4864.Dec 22 2017, 1:11 AM
ffffffff retitled this revision from Optional lobby chat ratings and chat presence to Optional lobby chat presence.
ffffffff edited the summary of this revision. (Show Details)

cleans split

Is the split clean?

ffffffff updated this revision to Diff 5005.Dec 30 2017, 11:32 PM

cleans function restoreObjectFromPreviousList(newObject, index, previousList, previousAttributes)
jsdoc and code

ffffffff edited the test plan for this revision. (Show Details)Jan 1 2018, 11:28 AM
ffffffff updated this revision to Diff 5073.Jan 3 2018, 5:50 PM
ffffffff retitled this revision from Optional lobby chat presence to Optional lobby chat presence (+ dot) and game open/join info.
ffffffff updated this revision to Diff 5075.Jan 3 2018, 7:46 PM
ffffffff edited the summary of this revision. (Show Details)
ffffffff added subscribers: mapkoc, Dunedan.

ratings

ffffffff retitled this revision from Optional lobby chat presence (+ dot) and game open/join info to Optional lobby chat presence (+ dot), player ratings and game open/join info.Jan 3 2018, 7:47 PM
ffffffff edited the summary of this revision. (Show Details)
ffffffff edited the test plan for this revision. (Show Details)Jan 3 2018, 7:52 PM
ffffffff edited the summary of this revision. (Show Details)
ffffffff updated this revision to Diff 5077.Jan 3 2018, 8:09 PM
ffffffff edited the summary of this revision. (Show Details)

bugfix

I like the idea of optional message for created/finished games, but I'm not a big fan of the other two. What I'd rather like to see a brightness change get used for is for the message backlog when joining the room.
I think the dots and brightness per status add to much clutter to the chat window, especially as they dynamically adjust to the current player status. They also don't provide any information which isn't already available from the nick list.

If you enable this, do you see all changes in status for all users? If so, I imagine that would fill a window quickly with non chat messages.
The last info seems nice for everybody to see, except in rated games (redundant).

ffffffff edited the summary of this revision. (Show Details)Jan 4 2018, 1:38 AM
ffffffff edited the test plan for this revision. (Show Details)

Opened/ended game info is especialy for when lobby becoming overloadingly crowded and u can not watch all games happening.

Same for many players in player list when u can watch all player presence updates in list, u can see easyly message switch brightness or presence dot changes, so u know about the guy,
that chatet into chat is really atm present in chat or not.

Therefore these feature are added.

Yea for rated games its redundant, but if u wait for game to end (plus waiting for a player) or no info come about rated game end then u get informed.

ffffffff edited the summary of this revision. (Show Details)Jan 4 2018, 1:53 AM
gentz added a subscriber: gentz.Jan 4 2018, 3:13 AM
gentz added a comment.EditedJan 4 2018, 3:17 AM

This looks awesome but I've experienced a couple issues:

  1. You get pinged every time you enter the lobby if your name was mentioned in the past. It should only ping once.
  2. Leaving games, or having others start games or others leaving games gives the following error:s
ERROR: JavaScript error: gui/lobby/lobby.js line 1133
ReferenceError: game is not defined
  updateGameList/<@gui/lobby/lobby.js:1133:61
  updateGameList@gui/lobby/lobby.js:1107:2
  g_NetMessageTypes.game.gamelist@gui/lobby/lobby.js:281:4
  onTick@gui/lobby/lobby.js:1384:7
  __eventhandler1345 (tick)@__internal(2) tick:0:1
ERROR: JavaScript error: gui/lobby/lobby.js line 1133
ReferenceError: game is not defined
  updateGameList/<@gui/lobby/lobby.js:1133:61
  updateGameList@gui/lobby/lobby.js:1107:2
  g_NetMessageTypes.game.gamelist@gui/lobby/lobby.js:281:4
  onTick@gui/lobby/lobby.js:1384:7
  __eventhandler1197 (tick)@__internal(2) tick:0:1
WARNING: JavaScript warning: gui/lobby/lobby.js line 1260
reference to undefined property g_GameList[gamesBox.list_data[gamesBox.selected]]
WARNING: JavaScript warning: gui/lobby/lobby.js line 1018
reference to undefined property g_GameList[gamesBox.selected]
ERROR: JavaScript error: gui/lobby/lobby.js line 1018
TypeError: g_GameList[gamesBox.selected] is undefined
  updateGameList@gui/lobby/lobby.js:1018:3
  g_NetMessageTypes.system.disconnected@gui/lobby/lobby.js:130:4
  onTick@gui/lobby/lobby.js:1384:7
  __eventhandler1197 (tick)@__internal(2) tick:0:1

Edit: I just realized the first issue happens without your patch... I'd still be eternally grateful if you fix the constant pinging.

ffffffff updated this revision to Diff 5339.Jan 16 2018, 3:14 PM
ffffffff retitled this revision from Optional lobby chat presence (+ dot), player ratings and game open/join info to Optional lobby chat presence brightness and dot, player ratings.
ffffffff edited the summary of this revision. (Show Details)

Much easier code.

ffffffff updated the Trac tickets for this revision.Jan 18 2018, 7:14 AM
ffffffff added inline comments.Jan 31 2018, 9:08 AM
binaries/data/mods/public/gui/lobby/lobby.js
661

rename to isPlayerPrev
rid off && playerPrev