More text colors

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

More text colors

Postby terencehill » Tue Oct 21, 2008 11:08 pm

In this topic http://alientrap.org/forum/viewtopic.php?p=46323#46323 I've wrote an idea to implement new colors in chat. I report here my reply:
terencehill wrote:Yes. More colors instead of modifying the existing ones.

I thought a simply solution that doesn't recolor old nicknames, compatible with Quake 3 Arena with not so big differences in colors:
^1 is red ---> ^1^1 is dark red, ^2^1 is brown (colors near to red), ^4 is blue ---> ^1^4 is dark blue, ^2^4 is indigo (colors near to blue) etc.... And so on for each color. A max of 100 colors can be created instead of current 10.

With the current implementation ^1^1 and ^2^1 are still red, with the new system are dark red and brown, ^1^4 and ^2^4 are still blue, with the new system are dark blue and indigo...


Watching source code of the file console.c, where there is the code related to console output, I found that some special codes are used to change color output. I've extrated these codes from the code in console.c (function Con_Print):
case 7: [m
case 1: [1;31m
case 2: [1;32m
case 3: [1;33m
case 4: [1;34m
case 5: [1;36m
case 6: [1;35m
case 9: [0;1m

Searching these codes on google I've found this page http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html where there are other codes for other kinds of colors, that I write here:
Black 0;30
Blue 0;34
Green 0;32
Cyan 0;36
Red 0;31
Purple 0;35
Brown 0;33
Light Gray 0;37

Dark Gray 1;30
Light Blue 1;34
Light Green 1;32
Light Cyan 1;36
Light Red 1;31
Light Purple 1;35
Yellow 1;33

White 1;37

To developers:
- Can these new colors be used natively by Nexuiz?
- If yes, can these new colors be added "easily" to Nexuiz, modifying a bit the code in console.c to implement the system I've talked before?
terencehill
Alien
 
Posts: 176
Joined: Thu Jul 10, 2008 10:33 pm
Location: Italy

Postby take_this_cup_of_poison » Wed Oct 22, 2008 2:22 pm

"To developers"

Why do you make that plural? There's only one regular dev for nexuiz (Div0) and he is not too much into deving anymore when all anyone else does is demand things and no one else helps with code dev.

He's asked for more devs and everyone has anwered "I'd like to but I won't" aka "screw off, and your little game too".

Why do they even respond if it's just to say "no"?
take_this_cup_of_poison
Banned
 
Posts: 198
Joined: Sun Jan 20, 2008 2:25 am

Postby take_this_cup_of_poison » Wed Oct 22, 2008 2:44 pm

Anyway. The answer is probably yes. Try out adding them. You're on your way to making a nice contrib to the code! :D (Nexuiz is capable of millions of colors where bash can only do 16)
take_this_cup_of_poison
Banned
 
Posts: 198
Joined: Sun Jan 20, 2008 2:25 am

Postby terencehill » Wed Oct 22, 2008 3:58 pm

The things i've wrote are the results of a research I've made, I didn't want an answer
The answer is probably yes.
by a non-dev. That's why I wrote "to devs". I am asking if it can be teorically implemented. I know that div have his own work, and this is not a priority.

Since I know only a bit C and it's the first time I look the Nexuiz source code, I don't know even if it's possible to add also one more color. Maybe these new colors works only on linux but not in Windows. This is a problem.

Assuming that div says that it's surely possible to add new colors, I'd really want to write some code line, but my C knowledge is limited. I can try too but it could be only a big waste of time with no result. Maybe if someone knows C a bit more, then he can make the changes without involve div.

Nexuiz is capable of millions of colors where bash can only do 16

I wish u r right. We r talking however about text colors, not about colors of the 3d game, I guess u understand this difference.
terencehill
Alien
 
Posts: 176
Joined: Thu Jul 10, 2008 10:33 pm
Location: Italy

Postby take_this_cup_of_poison » Thu Oct 23, 2008 2:28 am

If you want it done you're going to have to do it yourself. Even if you're "not good at C". It's a simple change. No one else is going to do it. Nexuiz doesn't have "devs" (plural) at the moment and wishing for someone else to do it is not going to result in anything. You're 1/2 way there. Keep on going.

You might not want to hear from me but... the colors that is possible are all the colors that nexuiz display. Bash is limited to 16 colors because linux console is limited to 16 colors.

If you want it done you have to code it. No one else is going to do it. It's your choice. Become a dev (you're getting there) or just beg for implementation of the idea to no avail.

Keep following that code trail as you've started! :D

But as you've allready said, you're not going to... so you will forever wish for the extra colors but you will never ever ever ever have them.
take_this_cup_of_poison
Banned
 
Posts: 198
Joined: Sun Jan 20, 2008 2:25 am

Postby terencehill » Fri Oct 31, 2008 10:33 pm

Tnx take_this_cup_of_poison for your words.

I've implemented it!
I still don't believe I did it! :D :D :D
Not so complicated however, but I thought I had very few possibilities so now I'm very happy! :)
terencehill
Alien
 
Posts: 176
Joined: Thu Jul 10, 2008 10:33 pm
Location: Italy

Postby Dokujisan » Fri Oct 31, 2008 11:29 pm

awesome!

Have you had a chat with div about your successful code?
Dokujisan
Forum addon
 
Posts: 1199
Joined: Sat Oct 07, 2006 4:31 pm
Location: Louisville, Kentucky

Postby [-z-] » Fri Oct 31, 2008 11:47 pm

Great news! Glad to see you followed your ambition.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby Fnilp » Sat Nov 01, 2008 2:49 pm

How about something like ^RGB?

As in "this is ^FF0yellow, this is ^00Fblue!"
Fnilp
Member
 
Posts: 14
Joined: Sat Nov 01, 2008 6:18 am

Postby Pyromace » Sun Nov 02, 2008 3:34 am

Fnilp wrote:How about something like ^RGB?

As in "this is ^FF0yellow, this is ^00Fblue!"


This is what I would like to see. The game Track Mania used ^RGB with the number ranging from 0-9. For example ^900 would be red, ^200 is dark red. ^009 would be blue etc etc..... This solution gives a wide range of colors, much more so than any other solution I've seen.
Pyromace
Member
 
Posts: 46
Joined: Wed May 28, 2008 8:27 pm

Next

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron