Cycle/wall color table

General Stuff about Armagetron, That doesn't belong anywhere else...
Post Reply
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Cycle/wall color table

Post by Jonathan »

I was messing with the color code, and arrived at this. It's based on the (0.15, 0.3, 0.15) floor. If you want one for another floor, just ask. Values are in RGB hex.
Attachments
aa_color_table.png
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6712
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

So what is "this" exactly?
Image
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

It's an accurate color picker. Each 16x16 square represents a color. The 5 pixels on the left are the cycle, the others are the wall. In the bottom right it shows what you'd have to enter in Armagetron to use that color. FA1 means red=15=0xF, green=10=0xA, blue=1=0x1.

Some random notes:
- It covers every color in the 0–15 range.
- The cycle and wall colors can be different because they use different floor color avoidance parameters.
- That floor color avoidance is also why I mentioned I used a (0.15, 0.3, 0.15) floor.
- To locate a color that you already know, store the remainder and the quotient of [RGB]/4 in [RGB]l and [RGB]h, respectively. The location of the color is then (Rl + 4 * Gl + 16 * Bl, Rh + 4 * Gh + 16 * Bh). Example (using C-like bit ops):

Code: Select all

R  = 15
G  = 10
B  =  1
Rh = 15 >> 2 = 3
Rl = 15 &  3 = 3
Gh = 10 >> 2 = 2
Gl = 10 &  3 = 2
Bh =  1 >> 2 = 0
Bl =  1 &  3 = 1
R  = 15
G  = 10
B  =  1
Rh = 15 >> 2 = 3
Rl = 15 &  3 = 3
Gh = 10 >> 2 = 2
Gl = 10 &  3 = 2
Bh =  1 >> 2 = 0
Bl =  1 &  3 = 1
x  = (Rl | Gl << 2 | Bl << 4) = (3 | 2 << 2 | 1 << 4) = (3 | 8 | 16) = 27
y  = (Rh | Gh << 2 | Bh << 4) = (3 | 2 << 2 | 0 << 4) = (3 | 8 |  0) = 11
Graphical version: red is spread like this:

Code: Select all

0 1 2 3 0 1 2 3 0 1 2 3 ...
4 5 6 7 4 5 6 7 4 5 6 7 ...
8 9 A B 8 9 A B 8 9 A B ...
C D E F C D E F C D E F ...
0 1 2 3 0 1 2 3 0 1 2 3 ...
...
Green is similar, but uses a 4x coarser grid:

Code: Select all

0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0 ...
0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0 ...
0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0 ...
0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 0 0 0 0 ...
4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 4 4 4 4 ...
...
Blue is to green as green is to red.
User avatar
spirit
Round Winner
Posts: 307
Joined: Wed Aug 10, 2005 4:11 pm
Location: Vienna

Post by spirit »

Do you think anybody will understand that????
Every newbie trying to create his/her own bike-wall combination will surely give up after 5 seconds.
Try to create something like shown on icemans site - a gadget or a color table that a normal human is willing to use.

P.S.: Ruined my eyes while trying to understand this.
Image
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

You don't have to understand the inner workings to use it. Just pick a color and enter it in the game. iceman's only has a limited selection of colors (though it does have a few overflowed colors - in fact that's all it has), and isn't as accurate. Mine was meant to be more complete, but not huge, so I had to make the cells very compact.
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Actually it's not that hard to find a given color:
First look at the blue. That's the bix 16x16 squares, and they are aligned like this:

Code: Select all

0 1 2 3
4 5 6 7
8 9 a b
c d e f
Then look at the box you just found and your green value. Within the box the red values are aligned in 4x4 boxes. Once you found that box you just have to find your red value in it :)

oh, yeah:
0 = 0x0
1 = 0x1
2 = 0x2
3 = 0x3
4 = 0x4
5 = 0x5
6 = 0x6
7 = 0x7
8 = 0x8
9 = 0x9
10 = 0xA
11 = 0xB
12 = 0xC
13 = 0xD
14 = 0xE
15 = 0xF
There's no place like ::1
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

That's my explanation, but inside out. :)
Attachments
Added 16 to green and blue. The cycle looks slightly brighter, but the wall is now brighter than even white.
Added 16 to green and blue. The cycle looks slightly brighter, but the wall is now brighter than even white.
Texture processing fun. This is my color.
Texture processing fun. This is my color.
Big Blue Box
On Lightcycle Grid
Posts: 15
Joined: Wed Jun 21, 2006 11:45 pm

Post by Big Blue Box »

{Vertigo} wrote:Do you think anybody will understand that????
Every newbie trying to create his/her own bike-wall combination will surely give up after 5 seconds.
Try to create something like shown on icemans site - a gadget or a color table that a normal human is willing to use.

P.S.: Ruined my eyes while trying to understand this.
yeah... that chart had me lost the second i layed eyes on it...
Big Blue Box
On Lightcycle Grid
Posts: 15
Joined: Wed Jun 21, 2006 11:45 pm

Post by Big Blue Box »

oh and the codes you gave me for my question were only 2 of the 3 codes and my cycle still seems to be a defalt greyish black cycle and walls.
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

That's simply the result of cramming lots of information in a small space.

Let's keep your question in its own thread.
Post Reply