Guild icon
Teeworlds
discord.gg/teeworlds / general
Teeworlds Discord Server.
Between 2020-05-06 00:00:00Z and 2020-05-07 00:00:00Z
Avatar
@Dune Still thinking about a style, it is hard to find a fitting one tbh. Teetow makes great music, but the tw songs get annoying very fast... and there is no theme or ostinato that stands out.
Avatar
@Assa lol i know some cases were the song happy was player at most important part of the funeral.
Avatar
it's hard to come up with music
Avatar
whats the coloring system for teeworlds
18:27
i cant find out hot to decode the numbers to hsl or rgb
Avatar
as i know ddnet uses rgb standart tw uses hsl or some shit here
18:34
i need to know how to convert from hsl or rgb or something else mainstream to whatever tw uses
18:36
as in the console values
18:37
from doing player_whateevr
18:38
i thought about coding
18:39
hm
Avatar
im trying to get a keybind for changing colors
18:39
(rainbow)
Avatar
u can just choice ur favorite color in skinchanger
18:41
but as i sed i want raiiiiinnnboooow
18:41
:)
Avatar
and then check out it at the console with player_color_whatever without any arguments
Avatar
im thinking 360 colors :)
18:41
doing that by hand would be a pain
18:42
anyway server will not accept those 360 per second
18:42
or per minute
18:42
so its like rly subtle
18:42
like every time i jump it changes slightly
18:42
all im concerned about is the
18:42
uhh
18:42
color codes
18:43
oo i found some c
18:43
which does it
18:43
eyah its vec4 to int
18:44
fuck
18:44
size_of(int) * H_value
18:44
or not
18:45
65335 + H
18:45
255 + S
18:45
0 + L
18:45
and split it
Avatar
split means?
18:46
wait add all those values together
18:47
i got -8m or something
18:47
but ill try
18:47
wait what
18:50
wait
18:50
what
18:53
18:55
Avatar
do u mean *
18:55
anyway ty
Avatar
@Solly try this ^^
Avatar
literly 100% what i wanted in whole
18:57
i love you so much
18:57
thank u
18:58
imasuckdickhuh
Avatar
ill just be stealing the python part
Avatar
oh theyre precompiled
19:00
everything is precompiled
Avatar
to make it as hard as possible
Avatar
are u have 360 keys?
Avatar
i will but ill try first with like 5
Avatar
im getting rly dullish
19:14
colors
Avatar
It's one byte for H, one byte for S, one byte for L
Avatar
The only catch is that L is remapped to always be bright
Avatar
im entering 130 255 120
19:29
in aim to get cyan
19:30
instead i get 129 254 0
19:30
(in game)
Avatar
129 and 254 sound about right with all the rounding issues, the L should never be 0, I wonder if they changed something in the color codes for 0.7
19:32
let me take a look
19:32
im just doing
19:32
(65335 * h) + (255 * s) + (1 * l)
Avatar
no multiply
19:32
+ not * xD
Avatar
that sounds very wrong
19:32
I said 1 byte per component
Avatar
using + makes it even wronger
19:33
why
19:33
when i do +
19:33
which is grey
Avatar
Okay with H S L values normalized (e.g. between 0 and 1): 255 * H << 0x10 + 255 * S << 0x8 + 255 * L
19:34
But there is a catch, L values are remapped to always be between 0. 5 and 1.0
19:34
do
19:34
yeah multiply
19:34
sry^
Avatar
so it's (L - 0.5) * 2
19:35
@gerdoe u stopped the epicmusic
19:35
mmm still a rly
19:35
white cyan
19:36
130, 152, 222 in game 130, 255, 120 in code
Avatar
okay turns out the L is not mapped in that range anymore in 0.7 so you can pack it normally
Avatar
Packing cyan(180, 100, 50) should get you 0x80FF80 = 8454016
Avatar
im confused
Avatar
hexcode uhm uhm
Avatar
1 byte is 2 hex digits H: 180/360 = 0.5 => 255 * 0.5 ~ 128 = 0x80 S: 100/100 = 1 => 255 * 1 = 255 = 0xFF L: 50/100 = 0.5 => 255 * 0.5 ~ 128 = 0x80
Avatar
So 0x80FF80 which is equal to 8454016
Avatar
can i have like a general forumla
19:44
cuz i have no idea what ur saying rn
19:44
sorry
19:44
here you go
19:44
wait
19:44
what
19:44
okey?
Avatar
The first step, I normalize the components
Avatar
All you need to change in HSL is the hue I imagine
19:45
what is ~
Avatar
approximately
19:45
255 * 0.5 = 127.5 which is not an integer value
Avatar
so join all those 3 then convert to int
19:46
okey
19:46
thank you
Avatar
With normalized components the general formula is H * 255 << 0x16 + S * 255 << 0x8 + L * 255
Avatar
@Learath2 is c++ doing 128 instead 127?
Avatar
@gerdoe idk how we handle the hsl picker
Avatar
in ddnet we always round down
Avatar
standart round() imo
Avatar
(I picked 128 because it was trivial to write in hex when doing this by hand) (edited)
19:52
@Solly another song?
19:52
ur choice
Avatar
next "the blyat song"
Avatar
@gerdoe the picker in teeworlds gets around the issue by constraining the value to integers between 0-255
19:54
so they never have to round
Avatar
my english isnt good sry
Avatar
ddnet uses normalized floats for the components of the color so we have to decide which way to round while packing the colors into teeworlds format
Avatar
RASSSSPUTTTTTINNNN
20:00
sounds like it
Avatar
daddy cool
20:01
yeah boney m is a legend
Avatar
I was thinking of getting https://github.com/ddnet/ddnet/blob/master/src/base/color.h into vanilla this week, just figuring out how to clean up the alpha and maybe some of the constructors
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
20:03
can also trim the ugly lighten and darken hack since colors are not clamped in 0.7
Avatar
0.5 black skins' return? (edited)
Avatar
oh, hm they still don't look possible but I don't see the colors themselves being messed with, so I'm guessing the display code now clamps the lightness
Avatar
i didnt check tw's github at 0.5 times
20:10
and i have question
20:10
why are black skins deprecated? (edited)
20:11
full color control
Avatar
I actually don't remember, but not only are black skins not possible, lightness below 0.5 is not possible for tees
20:11
thats too
Avatar
because you cna't see the graphics anymore, I guess
20:12
with 0 lightness
Avatar
I guess
Avatar
and? :D (stupid question i guess)
Avatar
Oh this clamping is instead moved out into the parts that handle displaying the color, and it's everywhere
20:12
are you sure this was the best idea?
Avatar
no, that sounds like a bad idea
20:13
@gerdoe black tees weren't pleasing to look at, I think
20:13
so they got patched out
20:13
they was looking good
20:14
mythically maybe
Avatar
Okay it's isolated to the HSL picker and the skin code
Avatar
oh those times when one good player joined the game with black skin
20:14
on dm1 for example
Avatar
I guess we'll need to move it out of the HSL code sometime so we can use the picker for the editor aswell
Avatar
sniff sniff
20:15
smells like new pq on github
20:16
@Solly uganda forever*
20:18
are you thought that was a part of song?
Avatar
Emotions are drawn in black hence the lightning minimum
Avatar
how do you make
20:27
switch commands
20:27
as in the argument is x then its y
20:27
then its z
20:27
i thought u can just enter any amount of values
Avatar
switch commands? I don't think teeworlds has such a thing
20:30
ddnet has toggles, that can toggle a config variable between x and y every time you hit it
20:30
that's the closest I can think of a "switch"
20:31
just make another client that will show to you rainbow
20:32
but anyway no one will see it
Avatar
you can make a rainbow in 0.7 too but you'll need to go quite slow
Avatar
ive seen someone
20:49
being able to switch between more than 2 colors via a keybind
20:50
they said they got it from a freind and shes french and doesnt understand me completely
Avatar
a single keybind? I guess you can use cfg files, but there might be an easier way
21:49
maybe bind key "player_body_color XXXXX; bind key player_body_color YYYYY" and so on? (edited)
21:50
probably easier with separate .cfg files and a exec bind in each
Avatar
can't do it w/o config files
Avatar
if this works then i can automate the creation of it
23:22
however i coudnt loop it /:
23:23
ill try config files
Avatar
@Dune new programming language TW++ xD
Avatar
is there anyway to exclude some gametypes in the serverbrowser? (edited)
23:43
I'm annoyed already of DDRace
23:44
DDRaceNetwork should have stayed on 0.6
Avatar
good question, I don't htink so
23:48
you could try to add a filter that has all known game types
Exported 219 message(s)