yvt / openspades

Compatible client of Ace of Spades 0.75
http://openspades.yvt.jp/
GNU General Public License v3.0
1.14k stars 217 forks source link

Allow spectators to be displayed on the scoreboard #412

Closed 100best closed 7 years ago

100best commented 8 years ago

I have noticed that openspades right now does not have something to show spectators like the classic game did.

ghost commented 8 years ago

this add-on will be cool

ghost commented 8 years ago

This is easily sorted out by showing all ids and name of team 2(specs used to be team 255)

100best commented 8 years ago

What I mean is the classic game had a place to show all spectators.

ghost commented 8 years ago

Exactly what i said

feikname commented 7 years ago

May I suggest to rename the issue to "Allow spectators to be displayed on the scoreboard"?

VelocityRa commented 7 years ago

I'm gonna have a go at this, where do we want spectators placed?

Here's the scoreboard as of now:

image

I was thinking about listing them on the bottom horizontally? I can make the background taller if need be.

feikname commented 7 years ago

just out of curiosity. What happens if there are more players than OpenSpades can display (maybe there is just a max small amount of players in the protocol)? is there a scrollbar?

VelocityRa commented 7 years ago

It displays them like so:

image

feikname commented 7 years ago

Ah yeah. I forgot that. Thanks!

feikname commented 7 years ago

I like your idea of displaying horizontally. Reminds me of Team fortress 2 Scoreboard

VelocityRa commented 7 years ago

Ah yeah. My subconscious must have picked it up from my TF2 playing days. :P

Current progress

(they display green team's players for debugging)

image (using the server's color)

image (using yellow)

As you can see they align to the center, it's more visually appealing IMO. Also it becomes "Spectator:" for 1 person and if there are no spectators, it doesn't display at all. Thoughts? @yvt

Edit: "Spectators:" was a bit offset to the left in the pics, this is now fixed.

VelocityRa commented 7 years ago

Here's another one, I improved the center aligning:

image

Currently nothing is done about spectators cliipping off the sides of the screen, if there's lots of them.

Kurtoid commented 7 years ago

That looks beautiful!

On Tue, Nov 29, 2016, 4:52 PM Nick Renieris notifications@github.com wrote:

Here's another one, I improved the center aligning:

[image: image] https://cloud.githubusercontent.com/assets/6632271/20730440/c62ab73e-b68e-11e6-9f75-a0c3db52dfa3.png

Currently nothing is done about players cliipping off the sides screen, if there's lots of them.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yvt/openspades/issues/412#issuecomment-263711292, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSzER6jN2BxccEyWKOQ6x-ZsR6wRgKeks5rDJ6jgaJpZM4JTNSE .

Kurtoid commented 7 years ago

Why are a lot of the spectators on playing teams at the same time?

On Tue, Nov 29, 2016, 5:12 PM Kurt Wilson kurt4wilson@gmail.com wrote:

That looks beautiful!

On Tue, Nov 29, 2016, 4:52 PM Nick Renieris notifications@github.com wrote:

Here's another one, I improved the center aligning:

[image: image] https://cloud.githubusercontent.com/assets/6632271/20730440/c62ab73e-b68e-11e6-9f75-a0c3db52dfa3.png

Currently nothing is done about players cliipping off the sides screen, if there's lots of them.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yvt/openspades/issues/412#issuecomment-263711292, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSzER6jN2BxccEyWKOQ6x-ZsR6wRgKeks5rDJ6jgaJpZM4JTNSE .

VelocityRa commented 7 years ago

Thanks! I said why in my first post, I display green team's players as spectators for debugging.

Kurtoid commented 7 years ago

Whoops. Sorry.

On Tue, Nov 29, 2016, 5:15 PM Nick Renieris notifications@github.com wrote:

Thanks! I said why in my first post, I display green team's players as spectators for debugging.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/yvt/openspades/issues/412#issuecomment-263717415, or mute the thread https://github.com/notifications/unsubscribe-auth/ACSzEVgFAbdiv2YgvRZf3sbvjDherBNcks5rDKQMgaJpZM4JTNSE .

VelocityRa commented 7 years ago

@yvt Given this, I'm not sure what color the spectator text is supposed to have. Does the server send any color (which is stored in teams[2]? Or should we hardcode one? Tried it once and it was black.

I've cleaned up the code and done some refactoring, I'm waiting on you to commit and push to my branch for you to check it out, if you like the result.

feikname commented 7 years ago

@VelocityRa I think the yellow "Spectators" on your last picture looks really great! I vote for keeping in that color

feikname commented 7 years ago

Also, It's rare to have a lot of spectators. I think they can go indefinetely to the horizontal for now if its too much trouble to add a line wrap and then this gets fixed in 0.1.1

yvt commented 7 years ago

That looks great!

Here are some comments:

VelocityRa commented 7 years ago

Thanks! I'll finish this when I get back. I agree about the background. I'll either extend the black bg already present, only if there are spectators, or create a new one so that a border is visible. I'll probably go for the first method and stick with it if it looks good.

feikname commented 7 years ago

@VelocityRa I also suggest adding a cg_scoreboard_showSpectators variable for enabling or disabling this feature for now.

VelocityRa commented 7 years ago

@feikname Not sure if that should be an option (does it need to)? I'd have to check for it every frame. It's nothing perf wise, but if we can avoid it, it's also less code to write and maintain. It's better if it's enabled by default in the next release (candidate) too, I'll know sooner if there are any bugs in it :)

Progress

image

Does this look ok? Names are white, ids are grey-ish.

feikname commented 7 years ago

@VelocityRa oh ok. You're right.

It's looking gorgeous right now! :)

feikname commented 7 years ago

Fixed in #466.