MantisBT - Zandronum
View Issue Details
0001829Zandronum[All Projects] Suggestionpublic2014-06-10 16:192025-04-03 11:53
Watermelon 
Kaminsky 
normalfeatureN/A
resolvedfixed 
1.4 
3.23.2 
0001829: Customizable scoreboard
For my CTF project, the scoreboard we used wouldn't cut it. I had to make something new, and it's not really extendable.


Therefore (I haven't seen another ticket from my searching of 'scoreboard' on the tracker), is a customizable scoreboard something we could go with? I'm interested in the task, but a few things need to be discussed.



1) Resolution minimum
Would we still support 320x200? The current scoreboard doesn't anyways.


2) Scrolling support
Pressing UP / DOWN on the keyboard could move people around. Konar6 I believe made a ticket on this because you just cant see everyone on the scoreboard now that we support 64 players.


3) How to customize
I assume I'll be making a new lump for this. What are some good ideas? Do we want it to be a compiled lump? For example, we can list name, points... kill / death ratio? Then we need a lump that would compile basic math:
kills / deaths




4) Access to stored elements
Clients need information generated from the server. Therefore the only solution for customization is to add a new SVC2_ for sending updates for a particular field.
Example, in my ELO custom ACS scoreboard, the server sent the Elo ranking to the clients. This would need to be updated accordingly. Obviously this requires more in depth thoughts. Is such a thing possible? As this point is pretty important, I'd prefer a lot of comments here if possible on what we will allow and not allow... and/or suggestions
No tags attached.
related to 0000404resolved Kaminsky Death on Scorboard For Online 
related to 0000915resolved Kaminsky Add a "Wins" column to the duel scoreboard 
related to 0000977resolved Kaminsky Scoreboard overflows the screen 
related to 0001028closed Dusk Show where you are in the queue on the scoreboard 
related to 0003973closed  removeflag PLAYERSEARNFRAGS does not actually remove frags from the scoreboard 
related to 0001848needs testing  DMFlag(s) to hide various information from the scoreboard 
related to 0004011resolved Kaminsky Ability to make the background dimmer based on how many lines of player info are occupying the intermission screen 
related to 0000244resolved  Show sv_hostname on score screen 
related to 0002364resolved Kaminsky Country representation in scoreboard. 
related to 0004205resolved Kaminsky [3.2] Move new scoreboard 10-20% higher up on screen 
related to 0004385resolved Kaminsky [3.2] Change "1st 2nd 3rd" place colors on scoreboard from blue, red and green 
related to 0004361resolved Kaminsky [3.2] Change the counters in PvP modes on the scoreboard that count "x frags left" etc. to a static "fraglimit x" 
related to 0004372resolved Kaminsky [3.2] Add "x leads with x frags/wins/points" on scoreboard if you're a spectator in DM, Duel, Terminator, LMS and Possession 
Issue History
2014-06-10 16:19WatermelonNew Issue
2014-06-10 22:03DuskNote Added: 0009020
2014-06-11 01:31ZzZomboNote Added: 0009034
2014-06-11 01:55WatermelonRelationship addedrelated to 0000404
2014-06-11 01:56WatermelonRelationship addedrelated to 0000915
2014-06-11 01:56WatermelonRelationship addedrelated to 0000977
2014-06-11 01:56WatermelonRelationship addedrelated to 0001546
2014-06-11 01:56WatermelonRelationship addedrelated to 0001028
2014-06-11 14:33WatermelonRelationship deletedrelated to 0001546
2014-06-15 16:49WatermelonAssigned To => Watermelon
2014-06-15 16:49WatermelonStatusnew => assigned
2014-06-16 03:40WatermelonNote Added: 0009509
2014-06-16 03:40WatermelonAssigned ToWatermelon =>
2014-06-16 03:40WatermelonStatusassigned => needs review
2014-06-16 20:36Blzut3Note Added: 0009531
2014-06-17 00:47WatermelonNote Added: 0009534
2014-06-17 00:48WatermelonNote Edited: 0009534bug_revision_view_page.php?bugnote_id=9534#r5030
2014-06-17 00:49WatermelonNote Edited: 0009534bug_revision_view_page.php?bugnote_id=9534#r5031
2014-06-17 02:34Blzut3Note Added: 0009537
2014-06-18 20:30WatermelonRelationship addedrelated to 0001848
2014-06-18 21:55Theshooter7Note Added: 0009586
2014-06-21 15:30Torr SamahoNote Added: 0009620
2014-06-21 15:30Torr SamahoAssigned To => Torr Samaho
2014-06-21 15:30Torr SamahoStatusneeds review => feedback
2014-06-21 16:31DuskNote Added: 0009624
2014-06-21 16:33Torr SamahoNote Added: 0009625
2014-06-21 21:17WatermelonNote Added: 0009631
2014-06-21 21:17WatermelonStatusfeedback => assigned
2014-06-21 21:26DuskNote Added: 0009632
2014-06-21 22:06DuskNote Edited: 0009632bug_revision_view_page.php?bugnote_id=9632#r5105
2014-06-21 23:52ZzZomboNote Added: 0009633
2014-06-22 13:45Torr SamahoNote Added: 0009654
2014-06-22 13:58Torr SamahoAssigned ToTorr Samaho =>
2014-06-22 15:42Torr SamahoStatusassigned => feedback
2014-06-22 15:42Torr SamahoNote Edited: 0009654bug_revision_view_page.php?bugnote_id=9654#r5130
2014-06-22 15:42Torr SamahoNote Revision Dropped: 9654: 0005129
2014-06-23 01:45ZzZomboNote Added: 0009691
2014-09-22 02:47WatermelonNote Added: 0010284
2014-09-22 02:47WatermelonStatusfeedback => new
2014-09-22 02:47WatermelonAssigned To => Watermelon
2014-09-22 02:47WatermelonStatusnew => needs review
2014-09-22 02:49WatermelonNote Edited: 0010284bug_revision_view_page.php?bugnote_id=10284#r5568
2014-09-22 02:49WatermelonNote Edited: 0010284bug_revision_view_page.php?bugnote_id=10284#r5569
2014-09-23 20:59Blzut3Note Added: 0010285
2014-10-09 00:02WatermelonAssigned ToWatermelon =>
2014-10-09 00:02WatermelonStatusneeds review => feedback
2014-10-09 00:03WatermelonNote Added: 0010393
2014-10-09 00:03WatermelonStatusfeedback => new
2014-10-11 00:52WatermelonAssigned To => Watermelon
2014-10-11 00:52WatermelonStatusnew => assigned
2014-10-30 23:01WatermelonNote Added: 0010744
2014-11-03 21:27DuskProduct Version2.0 => 2.0-beta
2014-12-01 13:27WatermelonProduct Version2.0-beta => 1.4
2014-12-01 13:27WatermelonTarget Version => 1.4
2015-01-06 08:15DuskTarget Version1.4 =>
2016-04-10 19:25DuskStatusassigned => new
2016-04-10 19:26DuskAssigned ToWatermelon =>
2016-08-17 14:56CatastropheNote Added: 0015455
2016-08-17 22:29DuskNote Deleted: 0015455
2022-06-11 02:41KaminskyRelationship addedrelated to 0004011
2022-06-11 02:42KaminskyAssigned To => Kaminsky
2022-06-11 02:42KaminskyStatusnew => assigned
2022-06-11 02:42KaminskyTarget Version => 3.2
2022-08-10 14:54KaminskyRelationship addedrelated to 0003973
2022-10-14 01:55WaTaKiDRelationship addedrelated to 0000244
2022-10-14 03:32KaminskyRelationship addedrelated to 0002364
2022-10-14 03:41KaminskyNote Added: 0022452
2023-06-19 15:35KaminskyNote Added: 0022848
2023-06-19 15:35KaminskyStatusassigned => needs testing
2024-03-10 15:00KaminskyRelationship addedrelated to 0004205
2024-08-18 04:12KaminskyRelationship addedrelated to 0004385
2024-08-18 04:16KaminskyRelationship addedrelated to 0004361
2024-08-18 04:22KaminskyRelationship addedrelated to 0004372
2025-04-03 11:53unknownnaNote Added: 0024380
2025-04-03 11:53unknownnaStatusneeds testing => resolved
2025-04-03 11:53unknownnaFixed in Version => 3.2
2025-04-03 11:53unknownnaResolutionopen => fixed

Notes
(0009020)
Dusk   
2014-06-10 22:03   
I tried to implement this once but realized that this should instead be some form of SBARINFO extension. Not sure about exact details though.
(0009034)
ZzZombo   
2014-06-11 01:31   
Maybe if we could switch HUDs not only for small/big HUD, but also by some event like round end, we could code custom scoreboard and whatnot using already existing features.
(0009509)
Watermelon   
2014-06-16 03:40   
Requesting extra developer review as this is a massive undertaking.
(0009531)
Blzut3   
2014-06-16 20:36   
Can you provide the specifics of why you want to do this? Some of the points like scrolling make sense, but they're independent of being able to customize it from a mod. You mention your project, but no details on why your project needs it.
(0009534)
Watermelon   
2014-06-17 00:47   
(edited on: 2014-06-17 00:49)
I think this covers a majority of my reasons:

- My project requires a custom ACS table to work around the endgame score screen. I had to set the timelimit and pointlimit to 1 ahead of what they were, then create an entire new screen in ACS. it was really tedious.

- Access to things that would be nice to have on the scoreboard that aren't, or expansion to the scoreboard (ex: kills, points, defenses...etc, rather than being locked into a basic one)

- ACS means it has to be puked, and can only happen at certain times. Putting this data into the scoreboard means the client can read it at any time by the click of a key, rather than binding a key to turn the 'what would be scoreboard' on and off.

- Can extend past what scoreboards allow (ex: we can count defenses now for flag defends, whereas it would have to be hardcoded). This allows for abstraction so different game modes don't have to be hard coded. Mod authors can include what they want.



Now, some of my ideas in retrospect look like not the best idea (ex: having the scoreboard be replaceable by an ACS script should someone want it), but extension to the scoreboard system through a new lump would be interesting.


I understand this is not some small project as well.

I'm trying to see if there's also any flaws I could run into which would make this ticket not feasible.

Ex: Should we force always displaying users? times? pings? etc

(0009537)
Blzut3   
2014-06-17 02:34   
Having some ACS scoreboard manipulation functions may not be the worst idea. Just not a hook to do the drawing manually. It might be decent to have a way to turn on/off score columns in the game mode lump and have a way to set the value in ACS (I would just say show a global array as a column, but we don't sync globals since it's not trivial to do so without over sending). Likewise a way to put some kind of game status above the score board could also be added.

I'm not entirely convinced that something along the lines of SBARINFO is needed. It would be overkill (and given the need for an expression evaluator, much harder to do).

Leaving the presentation of the score board up to Zandronum does have some benefits including being able to add the scrolling you suggest.
(0009586)
Theshooter7   
2014-06-18 21:55   
Perhaps it could be a combination of compiled script + mapinfo? So different scoreboards could be specified e.g. for survival, or ctf, etc by using gameinfo or another block (or in the map definitions themselves if needed).

This could also open the possibility of overwriting scoreboards or removing them entirely.
(0009620)
Torr Samaho   
2014-06-21 15:30   
Making the scoreboard customizable in the sense that a lump can be used to define which columns are shown in which gamemode sounds fine to me. To handle new types of columns I would introduce one (or a few) custom counter(s) for each player, that can be manipulated by ACS, i.e. Get/SetPlayerCustomCounter (similar to SetPlayerLivesLeft, also handling the server->client update) and displayed in the scoreboard. The labels of the columns should also be configurable with the lump.
(0009624)
Dusk   
2014-06-21 16:31   
IMO the scoreboard is horrible as it is and should be rewritten from the ground up...
(0009625)
Torr Samaho   
2014-06-21 16:33   
Are you interested in doing so?
(0009631)
Watermelon   
2014-06-21 21:17   
I wouldn't mind being part of this. I planned to start on it tomorrow actually.
(0009632)
Dusk   
2014-06-21 21:26   
(edited on: 2014-06-21 22:06)
I can help with this endeavor, just grab me on IRC.

(0009633)
ZzZombo   
2014-06-21 23:52   
But why you can't/don't want to use SBARINFO and it's underlying code for that?
(0009654)
Torr Samaho   
2014-06-22 13:45   
(edited on: 2014-06-22 15:42)
Dusk, Water, if the two of you want to rewrite the whole scoreboard drawing functions, feel free to do so. I have no interest in completely redesigning the drawing code myself. BTW: I just remembered that Thomas started to work on a customizable scoreboard and IIRC he had a working prototype. If you can get hold of his code, that may help to get started or at least give some ideas.

ZzZombo, look at Blzut3's explanation: 0001829:0009537.

(0009691)
ZzZombo   
2014-06-23 01:45   
No, I don't get the line about expression evaluator. Does it suggest to reinvent the wheel and create SBARINFO for scoreboard instead of using already existing?
(0010284)
Watermelon   
2014-09-22 02:47   
(edited on: 2014-09-22 02:49)
So far I've implemented the basic parser in GAMEINFO as discussed on IRC. There's a few things I need clarification with.


So far it would look something like this:

gameinfo
{
    ...

    scoreboard
    {
        key = value(s)
    }

    ...
}




The following key/value pairs are what I have in mind. Please debate on whether they are needed, should be extended/removed, what else I'm missing:

VALUES:

alignment = left, right, center
customcolumn1..5 = <string>
headercolor = <integer enumeration for color, like CR_RED>
order = POINTS, FRAGS (KILLS), DEATHS, NAME, TIME, PING, MONSTERS_KILLED, CAPTURES, LIVES_LEFT, WINS, CUSTOMCOLUMN1/2/3/4/5
sorting = POINTS, FRAGS (KILLS), DEATHS, NAME, TIME, PING, MONSTERS_KILLED, CAPTURES, LIVES_LEFT, WINS, CUSTOMCOLUMN1/2/3/4/5
truncatenames = <boolean>


DESCRIPTION:

1) alignment
Where the board aligns. Left means it aligns on the left hand side (plus some buffer), center means it lines up always from the center, right means it aligns from the right, with preference given to whatever is on the left of the 'order' key (since those are considered important fields)


2) customcolumn1, customcolumn2, customcolumn3, customcolumn4, customcolumn5
The custom columns that users can set with data via ACS. Any changes are sent at the end of the gametic (to save bandwidth/stop spam) to the clients. They will render this data if it is present. The header of the column is the provided name
Ex: customcolumn1 = "mana" would render a column with the header 'mana'


3) headercolor = <integer enumeration for color, like CR_RED>
Sets the header color to be something else, default is Red as per normal.


4) order = [list of items]
Order is how the columns will be rendered from left to right.
Ex: order = kills, name, ping
Would draw kills on the left, then name, and then ping. All possible values are in the above code box.

5) sorting = [list of items]
Like order, left to right determines the priority of sorting.
Ex: sorting = kills, deaths
That means that people will be sorted by kills, in the event of ties... then deaths. If two have the same death, it then sorts by default with the player number. This is the bottom case for every sorted list.
I chose this because its deterministic, right now on the scoreboard people change positions for no reason (thank you Carn).
NOTE: Spectators are always sorted by player index only.

6) truncatenames = <boolean>
Since people use low resolutions, sometimes obnoxious names screw up the table, like a name called asdoijsadid1j289dnmjdo9nas.
This will truncate any names longer than 16 chars with a '...', color codes do not count to name length
Ex: MyNameIsReallyLong -> MyNameIsReall...
Pseudo code: If name > 16 chars and truncatenames = true, write chars 0-12, and append '...'.



NOTE: This board supports scrolling if the number of names goes off the screen.
I am unsure if this should be some hardcoded key, or some bind players can press.



Also while were at it, can we have a persistent scoreboard button? It's annoying holding it down. Especially since we want support scrolling and not having to do weird reaches with our fingers.



I also need input on
- thoughts on the buffer space in the board
- thoughts on keeping it only to the common doom font? Do we want to allow custom fonts for headers and stuff?
- thoughts on red highlights or something for the player with a key item like the terminator ball?

IMPORTANT: I have not thought about how this will be handled over multiple team modes. For example, what if the user declares Points but it's just deathmatch? Is the column not written? Some of them do not have a place in some gamemodes...

(0010285)
Blzut3   
2014-09-23 20:59   
What does alignment affect? The position of the scoreboard on screen or alignment of text in column (which column?)?

As far as appearances go (fonts, etc) I think you should start by not providing anything there. Again, it's not that I'm against customization, but we may be better off here leaving presentation to Zandronum. I believe both Odamex and ZDaemon use a custom, common, included font for their scoreboard for example.

As for your questions on columns not relevant to certain modes. I do believe that can be handled by only displaying columns given in order. Then you can provide scoreboard definitions for the built in modes. I suppose the trickiest part there is backwards compatibility.
(0010393)
Watermelon   
2014-10-09 00:03   
I'd also like input about handling the 'data off the screen' button. Is there a way to do that? Now that we've had 64 players in a server, smaller resolutions have an information overflow.
(0010744)
Watermelon   
2014-10-30 23:01   
Column ideas:


typedef enum
{
    SCOREBOARDTYPE_KILLS = 0,
    SCOREBOARDTYPE_DEATHS,
    SCOREBOARDTYPE_DAMAGE,
    SCOREBOARDTYPE_POINTS,
    SCOREBOARDTYPE_LIVESLEFT,
    SCOREBOARDTYPE_FLAGDEFENSE,
    SCOREBOARDTYPE_WINS,
    SCOREBOARDTYPE_PING,
    SCOREBOARDTYPE_TIME,
    SCOREBOARDTYPE_VOTE, // (Yes) or (No) column
    SCOREBOARDTYPE_ISREADY, // If the player is ready to go on
    SCOREBOARDTYPE_NAME,
    SCOREBOARDTYPE_CUSTOM_0, // Custom fields set by ACS
    SCOREBOARDTYPE_CUSTOM_1,
    SCOREBOARDTYPE_CUSTOM_2,
    SCOREBOARDTYPE_CUSTOM_3,
    SCOREBOARDTYPE_CUSTOM_4,
    
    SCOREBOARDTYPE_MAX
} e_ScoreboardScoreType;
(0022452)
Kaminsky   
2022-10-14 03:41   
I decided to take over this ticket. Here is a draft page for SCORINFO that I've been working on for a while:'https://wiki.zandronum.com/SCORINFO [^]'
(0022848)
Kaminsky   
2023-06-19 15:35   
As of'http://hg.osdn.net/view/zandronum/zandronum-stable/rev/0e8360876fdf:fa1636889502 [^]' Zandronum now has a revamped scoreboard that's fully customizable with the SCORINFO lump. Take a look at the link pasted in'https://zandronum.com/tracker/view.php?id=1829#c22452 [^]' for documentation on SCORINFO.
(0024380)
unknownna   
2025-04-03 11:53   
Since the scoreboard now allows for customization with the SCORINFO lump, in addition to custom CVARs to alter the aesthetics of the scoreboard, this can now be marked as resolved. Great work, Kaminsky.

If anyone wishes any additional features, they should make separate requests for them.