Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001829Zandronum[All Projects] Suggestionpublic2014-06-10 16:192024-03-10 15:00
ReporterWatermelon 
Assigned ToKaminsky 
PrioritynormalSeverityfeatureReproducibilityN/A
Statusneeds testingResolutionopen 
PlatformOSOS Version
Product Version1.4 
Target Version3.2Fixed in Version 
Summary0001829: Customizable scoreboard
DescriptionFor 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
Attached Files

- Relationships
related to 0000404needs testing Death on Scorboard For Online 
related to 0000915needs testing Add a "Wins" column to the duel scoreboard 
related to 0000977resolvedKaminsky Scoreboard overflows the screen 
related to 0001028closedDusk Show where you are in the queue on the scoreboard 
related to 0003973needs testing 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 0004011needs testing 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 0002364needs testingKaminsky Country representation in scoreboard. 
related to 0004205resolvedKaminsky [3.2] Move new scoreboard 10-20% higher up on screen 

-  Notes
User avatar (0009020)
Dusk (developer)
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.
User avatar (0009034)
ZzZombo (reporter)
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.
User avatar (0009509)
Watermelon (developer)
2014-06-16 03:40

Requesting extra developer review as this is a massive undertaking.
User avatar (0009531)
Blzut3 (administrator)
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.
User avatar (0009534)
Watermelon (developer)
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

User avatar (0009537)
Blzut3 (administrator)
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.
User avatar (0009586)
Theshooter7 (reporter)
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.
User avatar (0009620)
Torr Samaho (administrator)
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.
User avatar (0009624)
Dusk (developer)
2014-06-21 16:31

IMO the scoreboard is horrible as it is and should be rewritten from the ground up...
User avatar (0009625)
Torr Samaho (administrator)
2014-06-21 16:33

Are you interested in doing so?
User avatar (0009631)
Watermelon (developer)
2014-06-21 21:17

I wouldn't mind being part of this. I planned to start on it tomorrow actually.
User avatar (0009632)
Dusk (developer)
2014-06-21 21:26
edited on: 2014-06-21 22:06

I can help with this endeavor, just grab me on IRC.

User avatar (0009633)
ZzZombo (reporter)
2014-06-21 23:52

But why you can't/don't want to use SBARINFO and it's underlying code for that?
User avatar (0009654)
Torr Samaho (administrator)
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.

User avatar (0009691)
ZzZombo (reporter)
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?
User avatar (0010284)
Watermelon (developer)
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...

User avatar (0010285)
Blzut3 (administrator)
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.
User avatar (0010393)
Watermelon (developer)
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.
User avatar (0010744)
Watermelon (developer)
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;
User avatar (0022452)
Kaminsky (developer)
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 [^]'
User avatar (0022848)
Kaminsky (developer)
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.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: Korshun Catastrophe Combinebobnt VoiceLiker321
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-06-10 16:19 Watermelon New Issue
2014-06-10 22:03 Dusk Note Added: 0009020
2014-06-11 01:31 ZzZombo Note Added: 0009034
2014-06-11 01:55 Watermelon Relationship added related to 0000404
2014-06-11 01:56 Watermelon Relationship added related to 0000915
2014-06-11 01:56 Watermelon Relationship added related to 0000977
2014-06-11 01:56 Watermelon Relationship added related to 0001546
2014-06-11 01:56 Watermelon Relationship added related to 0001028
2014-06-11 14:33 Watermelon Relationship deleted related to 0001546
2014-06-15 16:49 Watermelon Assigned To => Watermelon
2014-06-15 16:49 Watermelon Status new => assigned
2014-06-16 03:40 Watermelon Note Added: 0009509
2014-06-16 03:40 Watermelon Assigned To Watermelon =>
2014-06-16 03:40 Watermelon Status assigned => needs review
2014-06-16 20:36 Blzut3 Note Added: 0009531
2014-06-17 00:47 Watermelon Note Added: 0009534
2014-06-17 00:48 Watermelon Note Edited: 0009534 View Revisions
2014-06-17 00:49 Watermelon Note Edited: 0009534 View Revisions
2014-06-17 02:34 Blzut3 Note Added: 0009537
2014-06-18 20:30 Watermelon Relationship added related to 0001848
2014-06-18 21:55 Theshooter7 Note Added: 0009586
2014-06-21 15:30 Torr Samaho Note Added: 0009620
2014-06-21 15:30 Torr Samaho Assigned To => Torr Samaho
2014-06-21 15:30 Torr Samaho Status needs review => feedback
2014-06-21 16:31 Dusk Note Added: 0009624
2014-06-21 16:33 Torr Samaho Note Added: 0009625
2014-06-21 21:17 Watermelon Note Added: 0009631
2014-06-21 21:17 Watermelon Status feedback => assigned
2014-06-21 21:26 Dusk Note Added: 0009632
2014-06-21 22:06 Dusk Note Edited: 0009632 View Revisions
2014-06-21 23:52 ZzZombo Note Added: 0009633
2014-06-22 13:45 Torr Samaho Note Added: 0009654
2014-06-22 13:58 Torr Samaho Assigned To Torr Samaho =>
2014-06-22 15:42 Torr Samaho Status assigned => feedback
2014-06-22 15:42 Torr Samaho Note Edited: 0009654 View Revisions
2014-06-22 15:42 Torr Samaho Note Revision Dropped: 9654: 0005129
2014-06-23 01:45 ZzZombo Note Added: 0009691
2014-09-22 02:47 Watermelon Note Added: 0010284
2014-09-22 02:47 Watermelon Status feedback => new
2014-09-22 02:47 Watermelon Assigned To => Watermelon
2014-09-22 02:47 Watermelon Status new => needs review
2014-09-22 02:49 Watermelon Note Edited: 0010284 View Revisions
2014-09-22 02:49 Watermelon Note Edited: 0010284 View Revisions
2014-09-23 20:59 Blzut3 Note Added: 0010285
2014-10-09 00:02 Watermelon Assigned To Watermelon =>
2014-10-09 00:02 Watermelon Status needs review => feedback
2014-10-09 00:03 Watermelon Note Added: 0010393
2014-10-09 00:03 Watermelon Status feedback => new
2014-10-11 00:52 Watermelon Assigned To => Watermelon
2014-10-11 00:52 Watermelon Status new => assigned
2014-10-30 23:01 Watermelon Note Added: 0010744
2014-11-03 21:27 Dusk Product Version 2.0 => 2.0-beta
2014-12-01 13:27 Watermelon Product Version 2.0-beta => 1.4
2014-12-01 13:27 Watermelon Target Version => 1.4
2015-01-06 08:15 Dusk Target Version 1.4 =>
2016-04-10 19:25 Dusk Status assigned => new
2016-04-10 19:26 Dusk Assigned To Watermelon =>
2016-08-17 14:56 Catastrophe Note Added: 0015455
2016-08-17 22:29 Dusk Note Deleted: 0015455
2022-06-11 02:41 Kaminsky Relationship added related to 0004011
2022-06-11 02:42 Kaminsky Assigned To => Kaminsky
2022-06-11 02:42 Kaminsky Status new => assigned
2022-06-11 02:42 Kaminsky Target Version => 3.2
2022-08-10 14:54 Kaminsky Relationship added related to 0003973
2022-10-14 01:55 WaTaKiD Relationship added related to 0000244
2022-10-14 03:32 Kaminsky Relationship added related to 0002364
2022-10-14 03:41 Kaminsky Note Added: 0022452
2023-06-19 15:35 Kaminsky Note Added: 0022848
2023-06-19 15:35 Kaminsky Status assigned => needs testing
2024-03-10 15:00 Kaminsky Relationship added related to 0004205






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker