Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Color picker for player shirt & glow

#1
Something I was planning to ask for a while. What does everyone think about implementing a color picker for selecting the player shirt and glow colors? We could forget about the 15 color buttons and select any color in between, which is a feature I'm totally up for Smile

I'm not going for a picker that allows changing the brightness, so don't worry about black or gray colors. Basically, we could turn the color buttons into a rainbow bar, offering all full intensity colors. White could be included separately at the bottom of the bar, and the rainbow cycling option that Nexuiz had could be a separate button. Here is a picture of what I had in mind:

[Image: rktf2cwofloqh89cefa.png]

I don't know if I can implement it myself, but I can try if the feature would be accepted. The system could also be useful for the new panel hud, as it doesn't have a picker for the panel colors yet.
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply

#2
If you wanted to make it more complex for the user, an 'Advanced' button that leads to another two of those colour changers used for the name might be an easier way of doing it. That way advanced users get FULL control, whilst less advanced users can just pick a colour and be done Smile
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply

#3
(07-05-2010, 07:40 PM)clanclanclan Wrote: If you wanted to make it more complex for the user, an 'Advanced' button that leads to another two of those colour changers used for the name might be an easier way of doing it. That way advanced users get FULL control, whilst less advanced users can just pick a colour and be done Smile

That can be done, though I don't see the advantage of two color pickers in the menu. I think that would load the menu too much for such a small feature, and imo even a simple user can drag a slider over the desired color. I do believe the sliders should have a small snapping however, possibly cvared.

Problem is we need to disallow dark colors, so players can't set theirselves to black or grey by manually changing the cvars. I don't see a problem with that personally, but some believe it can make you too hard to hit so that would likely be requested. Imo the easiest way is by forcing either Red Green or Blue to be 1 at a time.
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply

#4
MirceaKitsune Wrote:I do believe the sliders should have a small snapping however, possibly cvared.

Yes, that would be the ideal way to do it.

MirceaKitsune Wrote:Problem is we need to disallow dark colors, so players can't set theirselves to black or grey by manually changing the cvars.

The colour that gives an advantage will be different on each map and for each person. What if they're colourblind? What if it's a snow themed map? It soon gets to the point you need a colour blacklist (trench warfare) or a filter (if R+G+B<90: col=(30,30,30), very irritating). There is even research into colour dominance which shows that some people act differently towards different colours.

The easiest way to fix that is fullbright skins, which means you CAN'T get an advantage.
[Image: vN3NkMA]
(Idea stolen from Mr. Bougo. Hehehehe)
Reply

#5
It would be interesting if a better color picker was made for choosing players colors, but I think it's best use would be for the panel HUD.
ECKZBAWKZ HUGE LIST OF ACHIEVEMENTS GOES HERE....


Oh wait.
Reply

#6
Unfortunately there's bad news about this. The shirt \ glow color is handled by the engine, since we don't have csqc players yet. So from what I understand, this either means that support for RGB coloring needs to be implemented engine-side (which I heard is almost impossible) or we need to wait for csqc players first, which may happen later or not happen at all.

The only point where I'm confused is why it's impossible to do it in the engine. I took a look at the engine code, and although I couldn't understand much at a first sight, it feels as it should be possible without dirty hacks. There's already the 'rainbow cycling' color, so rendering at other values does work. If we could somehow get a cvar that specifies the colors in RGB instead of 15 colormap choices, that could do the trick. Of course I know little about the engine, that's just what I'm wondering. If not, I guess this has to be done later if it will.

I remember one interesting thing however. I was working on a code once (the respawn ghosts) and found a way to color players to black from csqc. I did so by using self.colormap = 512; I tried some experiments with self.colormap at other values, but that doesn't allow me to recolor to anything else sadly.
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply

#7
Colormap uses the same palette as player colors, IIRC it's 1024 + 16*shirt color + pants color. 0 to 1023 are reserved for game-dependant specific color combinations I think (why this much, I have no idea)...

I don't know why csqc players play any role in this, as the rendering of the models and the coloring is done by the engine anyway.
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Reply

#8
well, csqc is a way to add this to the protocol without breaking stuff

The main restriction is not the engine. Internally, a new csqc field can be added for it.
The main restriction is the network protocol.
BRLOGENSHFEGLE (core dumped)

The Bot Orchestra is back! | Xoylent Easter Egg | 5bots1piano
My music on Google Play and SoundCloud
Reply

#9
I see then. Well, if there's a chance for it to be possible sometime, I'll try implementing the color picker which can set a cvar to a RGB value like the nickname coloring. Then the branch can wait until the coloring system is also coded somehow in the future.
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply

#10
I managed to implement the picker today, and got the code to a stable point so it can be tested safely. See branch mirceakitsune/player_color_picker in xonotic-data.pk3dir. The sliders are working and setting the cvars properly, but those cvars don't become the player colors yet. Things left to do are:

- Make the slider's cvars actually work... hardest part of all. Would be very appreciated if anyone can help with that, otherwise the sliders are useless until this is done. From what I understood on IRC, csqc should handle the cvars and send the color to the engine as an object.

- Implement snapping for setting common colors more easily. I'll look into that tomorrow, shouldn't be too hard. Done

- Optionally, add a cursor to the picker. I couldn't do that due to several reasons, but this really isn't urgent since it's just an effect. You just click & drag where you want on the color bar and the cvar is set to that color.

Feel free to commit changes to my branch especially if you get the coloring part working. Here is a screenshot of how the slider looks like (I may try improving the textures later):

[Image: mrse8cbqj0zs4sh1un4f.jpg]

[EDIT] Snapping implemented and working in the latest branch.

[EDIT 2] Updated the textures to look better, like this:

[Image: i60ne2i14fj4389c5mg.jpg]
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply

#11
how far away from doing live previews are we?
Reply

#12
(07-08-2010, 05:35 PM)-z- Wrote: how far away from doing live previews are we?

That would be cool. I'm no coder, but these things instantly come to mind when I think about live preview:

Loading a map for the menu screen like Unreal Tournament does

Chase Cam

Maybe someone with some skill is thinking the same thought?
ECKZBAWKZ HUGE LIST OF ACHIEVEMENTS GOES HERE....


Oh wait.
Reply

#13
Model preview is in the works (no animation though), rendering is done in menu QC. I don't think you cab count on that for maps, it will be extremely slow.
[Image:http://i.imgur.com/4XODR.png]640K ought to be enough for anybody.
     ― Linux Torvalds
Reply

#14
That's great news! Glad to hear this is in the works Big Grin When player rendering preview will be done, I'll remove the "preview button" of my picker as well, since it wouldn't make much sense to keep it and I think it would look better without it. Imo even a non-animated preview is ok for a start, as long as it works and shows the model with shirt \ glow.

Anyway, the color picker code still requires help from anyone willing to look into this. We need a way to somehow network these cvars to the engine for each player, so the colors can be applied. _cl_color is the cvar we must "follow" and try finding a way to duplicate, but with sending RGB colors rather than values from 1 to 16.
<spackObot> Congratulations to Samual and Taoki, your lovescore is 98.463%!
Samual (~dioteckte@...) quit #xonotic.pickup (gonna kill myself now)
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  Chat color question Molnija 0 598 11-14-2018, 02:26 AM
Last Post: Molnija
  Remove color font from scoreboard and drag notify, but not chat Molnija 6 1,198 09-14-2018, 10:28 PM
Last Post: Molnija
  [SOLVED] Correct way to make entity with opacity depending on distance to player Penguinum-tea 2 2,169 04-03-2015, 02:18 PM
Last Post: Penguinum-tea
  [plan] A single-player game creation toolkit using the Xonotic framework MirceaKitsune 21 21,771 06-18-2013, 10:15 AM
Last Post: Zeo
  We need more alien and robot player models! MirceaKitsune 25 19,454 11-17-2011, 10:03 PM
Last Post: Lee_Stricklin
Question How do I create IQM player models for Xonotic? Ihsan 4 5,520 06-20-2011, 06:53 PM
Last Post: nifrek
  bug: CTS player lacks UID => record lost Sze 7 6,242 04-11-2011, 08:44 AM
Last Post: Sze
  Help with Player scoring Cvars Dokujisan 2 3,010 03-07-2011, 02:37 PM
Last Post: nowego4
  Grey Player Skin Rad Ished 24 16,489 08-23-2010, 02:29 PM
Last Post: nowego4
  "Global player stats tracking system, supporting anonymous player as well" atheros 30 23,418 06-18-2010, 03:57 PM
Last Post: unfa

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-