Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2024-12-01 00:00 and 2024-12-02 00:00
Avatar
How can I open a tas file?
Avatar
Avatar
Evelyn
How can I open a tas file?
send it to me
06:06
I open it for you :)
Avatar
GitHub BOT 2024-12-01 06:11
[ddnet/ddnet-libs] New branch created: pr-android
06:11
Avatar
GitHub BOT 2024-12-01 06:37
Every build itself already uses all cores. By running 4 builds at once my system gets overloaded and goes OoM

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
...
Avatar
ws-client BOT 2024-12-01 07:36
<ChillerDragon> aoc is op in utc+8
Avatar
chillerdragon: good morning
Avatar
ws-client BOT 2024-12-01 07:38
<ChillerDragon> its almost 4 fred
Avatar
i just woke up
Avatar
it’s morning for me
07:38
12:38
Avatar
ws-client BOT 2024-12-01 07:38
<ChillerDragon> wtf
Avatar
ws-client BOT 2024-12-01 07:38
<ChillerDragon> @TsFreddie fix your sleep
Avatar
hoping he just moved back to canada
Avatar
pepeW making pr for ddnet exhausted me
Avatar
now im hungry
07:40
ill get cookin, later guys
Avatar
ChillerDragon
08:05
Where is the Player Search API located in Teedata?
Avatar
ws-client BOT 2024-12-01 09:25
<ChillerDragon> @Evelyn https://teedata.net/docs
Avatar
@Robyt3 im not sure how to make the text the same size
09:27
i removed the mapping thingy for the preview and its not the same
Avatar
i want to remove yourself from spectator menu
Avatar
no :D
Avatar
it feels confusing when new player accidentally do that and pause/unpause don't give enough visual changes to indicate what is happening.
09:30
SpectateCloest already filters out yourself, not sure why it is not enforced everywhere else
Avatar
Avatar
Evelyn
How can I open a tas file?
Discussion of cheats including bots and TAS is not allowed
Avatar
Avatar
Solly
@Robyt3 im not sure how to make the text the same size
You probably need the same MapScreenToInterface as ingame (edited)
Avatar
Avatar
Robyt3
You probably need the same MapScreenToInterface as ingame (edited)
?
09:52
// create nameplates at standard zoom This.Graphics()->GetScreen(&ScreenX0, &ScreenY0, &ScreenX1, &ScreenY1); This.RenderTools()->MapScreenToInterface(This.m_pClient->m_Camera.m_Center.x, This.m_pClient->m_Camera.m_Center.y);
Avatar
hmmm, looks like CNamePlates::OnRender just uses the screen size from the previous component
09:53
maybe try to print the screen size there and also use it for the preview? I guess that would break the positioning though :/
Avatar
Avatar
Souly
@Jupstar ✪ have you found what causes https://github.com/ddnet/ddnet/issues/9228 to happen?
Jupstar ✪ 2024-12-01 09:56
Yeah it's the commit i posted, i guess we could restore old behavior by making sure NaNs are not created in a different way. But it's kinda annoying to test it for a huge range of skins by just changing the code randomly, so either the dev has to understand it or we need some test setup 😄
Avatar
Avatar
Ryozuki
@Learath2 @heinrich5991 @Jupstar ✪ this makes Option::unwrap const
Jupstar ✪ 2024-12-01 09:57
nice
Avatar
Jupstar ✪ 2024-12-01 09:59
lol, looks interesting
10:02
619b419 Build Android libs - def- 7f9799b Merge pull request #42 from ddnet/pr-android - Robyt3
10:02
Simple change, prevents multi-view auto selecting yourself in game too. This eliminates all possibilities of a player accidentally spectating themselves (without using console) during a pause and become confused wondering why they can't move the camera after pausing. If someone really really want to spectate themselves for some reason, spectate and spectate_multiview still works on yourself, and of course modded server can just send a SpectatorId to force it. Note that left...
Avatar
Avatar
Jupstar ✪
lol, looks interesting
Welcome back baby ❤️
Avatar
Avatar
meloƞ
Welcome back baby ❤️
Jupstar ✪ 2024-12-01 10:06
Yeah I am directly super sick, almost didn't sleep today. Perfect come back
Avatar
Jupstar ✪ 2024-12-01 10:08
at least we are among adults here now
Avatar
pepeW poor juppy, what happened
Avatar
Avatar
TsFreddie
pepeW poor juppy, what happened
Jupstar ✪ 2024-12-01 10:11
I dunno, I can't control when I get sick xd
Avatar
Avatar
Solly
@Jupstar ✪ (ik this is wip, i like it, these r just questions x-x) (also is this made in code or drawing?) I think settings should be with editor/demos/exit because its not a server I also think the top bar should be bigger what is the 3 people icon? and is the icon at the top something something accounts? I think this works with settings as the tabs can be moved to the top or the little sticky out bit can be removed, but i think it might look weird i personally like the filters being easily gettable 2 without a burger menu, as fitting all the filters we do have into that might prove... challanging
Jupstar ✪ 2024-12-01 10:12
what is the 3 people icon?
10:12
That is simply an "explore communities"
10:12
I think kaffine once showed how he imagined communities, and I think an overview could be quite ok, similar to discord discovery thing
10:13
The settings are on the left mostly, bcs the navigation for the settings are on the left now too
Avatar
GitHub BOT 2024-12-01 10:19
307ad7c android build: Don't parallelize twice - def- 143b9ce Merge pull request #9307 from def-/pr-android-para - Robyt3
10:24
Demo spectator menu have several problems:
  • You can not left-click yourself to spectate.
  • Follow mode spectator change relies on whether the recording is spectating or not.
This PR enforces the following rule in demo player. 1. You can not change SpectatorId when in follow mode, the recording itself always decides where to look at. 2. As long as you are not in follow mode, you can change SpectatorId freely, including to yourself. Also includes a tiny refactoring that changes `CanC...
Avatar
Avatar
Jupstar ✪
Yeah it's the commit i posted, i guess we could restore old behavior by making sure NaNs are not created in a different way. But it's kinda annoying to test it for a huge range of skins by just changing the code randomly, so either the dev has to understand it or we need some test setup 😄
are you sure it only happens for specific skins?
Avatar
Jupstar ✪ 2024-12-01 10:27
not sure, no. do you assume it's all skins?
Avatar
i think it does even for darker ones
10:30
its just less noticable
Avatar
Jupstar ✪ 2024-12-01 10:30
probably all skins where the calculation created NaNs or smth like that
Avatar
skin code cursed for real
Avatar
Jupstar ✪ 2024-12-01 10:36
I honestly also don't understand the idea behind that code
10:37
it's also only applied to the body, which is weird too xd
Avatar
do we really need it to be that weird?
10:38
i thought its maybe something for teamcolors but nah
Avatar
Jupstar ✪ 2024-12-01 10:38
it's some form of grayscaling
10:40
e.g. the question is: would it be bad to completely remove that code
Avatar
sodium nitride
Avatar
Jupstar ✪ 2024-12-01 10:40
and only use the gray scaled version
Avatar
Avatar
TsFreddie
sodium nitride
Jupstar ✪ 2024-12-01 10:42
how is the bicycle game doin
Avatar
Avatar
Jupstar ✪
how is the bicycle game doin
cammo
10:43
can't tune a control that i like
Avatar
Avatar
Jupstar ✪
e.g. the question is: would it be bad to completely remove that code
well there are skins like whis where it would be even better probably
10:48
could achieve more vibrant custom colors
Avatar
MilkeeyCat 2024-12-01 11:03
I almost did first part of today's AOC in my language but I cant call qsort, it segfaults feelsbadman
11:07
WAIT I ALMOST FORGOT AOC
11:07
AAAAAAAA
Avatar
chillerdragon BOT 2024-12-01 11:08
Where have you been?
Replying to @Jupstar ✪ Yeah I am directly super sick, almost didn't sleep today. […]
Avatar
Avatar
chillerdragon
Where have you been?
Jupstar ✪ 2024-12-01 11:10
Just afk few days
Avatar
Avatar
chillerdragon
Where have you been?
Jupstar ✪ 2024-12-01 11:10
And what about you?
Avatar
@Jupstar ✪ do you know if anyone has decided to implement account into ddnet yet?
11:11
can i just add the auth part in client without touching server first. 👀
Avatar
Jupstar ✪ 2024-12-01 11:11
@Souly not perfect yet, but I'd like to have a test setup like this
crosspepe 1
Avatar
Avatar
Jupstar ✪
@Souly not perfect yet, but I'd like to have a test setup like this
this is art #showroom
Avatar
Avatar
TsFreddie
@Jupstar ✪ do you know if anyone has decided to implement account into ddnet yet?
Jupstar ✪ 2024-12-01 11:12
The account system itself is kinda finished: https://github.com/ddnet/ddnet-accounts We need secure connection and we still need the client side impl in cpp version
The DDNet account system. Contribute to ddnet/ddnet-accounts development by creating an account on GitHub.
11:13
You can actually already test it in dd-pg
Avatar
let me yoink that and post it in the town hall thingie
Avatar
jupstar
11:13
hi
Avatar
Avatar
Jupstar ✪
The account system itself is kinda finished: https://github.com/ddnet/ddnet-accounts We need secure connection and we still need the client side impl in cpp version
greenthing so can i implement it cpp in ddnet
Avatar
Avatar
meloƞ
WAIT I ALMOST FORGOT AOC
SAME I need to come up with a good gimmick to use this year
Avatar
Avatar
meloƞ
let me yoink that and post it in the town hall thingie
Jupstar ✪ 2024-12-01 11:14
It's actually not even news 😄
Avatar
Avatar
risu
SAME I need to come up with a good gimmick to use this year
i think i can even do the first question in nixlang
Avatar
Avatar
Evelyn
hi
Jupstar ✪ 2024-12-01 11:14
Hi eve, i totally missed you
Avatar
I could try for artistic Haskell solutions but I feel like I could pick something more original
11:15
Try to learn one of the APL-like languages maybe?
Avatar
chillerdragon BOT 2024-12-01 11:15
I was here. Real afk in the real world? Or just inactive in #developer
Replying to @Jupstar ✪ And what about you?
Avatar
Haskell might as well be an average commonly used language when compared to those
Avatar
chillerdragon BOT 2024-12-01 11:16
Did you do something exciting?
Avatar
Avatar
chillerdragon
I was here. Real afk in the real world? Or just inactive in #developer
Jupstar ✪ 2024-12-01 11:16
I have no real life
Avatar
chillerdragon BOT 2024-12-01 11:16
So how do you afk then
Avatar
Jupstar ✪ 2024-12-01 11:16
I spent few hours per day getting stuff in dd-pg done, and the rest I was doing random things
Avatar
Avatar
chillerdragon
So how do you afk then
Jupstar ✪ 2024-12-01 11:16
afk from discord xd
Avatar
chillerdragon BOT 2024-12-01 11:17
Oh nice the ddpg grind
11:17
Good progress?
Avatar
Jupstar ✪ 2024-12-01 11:17
Let's say it like this: I am surprised how fast a month passes
11:17
Would have liked to have more progress tbh
11:18
Avatar
chillerdragon BOT 2024-12-01 11:18
Few hours ddpg and random things sounds like you have lots of free time
Avatar
Avatar
chillerdragon
Few hours ddpg and random things sounds like you have lots of free time
Jupstar ✪ 2024-12-01 11:19
Well sadly I cannot go to the beach every day like you :c
Avatar
Speaking of skin colouring, there could be value to having an option to not grayscale skins but hue shift them instead
Avatar
chillerdragon BOT 2024-12-01 11:19
Beach was really nice today!
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
Jupstar ✪ 2024-12-01 11:20
This is the current default, now I build one with greyscale only
Avatar
there are many cases where that would look better, since a bit of colour variation would look more natural than the monochromatic result you get with grayscaling and multiplying
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
Jupstar ✪ 2024-12-01 11:22
11:22
sadly i forgot to sort the skins
11:23
but still looks pretty different
11:23
oh wait
11:23
they are sorted
11:23
nice
Avatar
sort by average luminosity for a fun gradient
Avatar
let input = open_in "inputs/day1_p1.txt" in try let lines = In_channel.input_lines input in let parse_line x = List.map int_of_string @@ List.filter (fun x -> x <> "") @@ String.split_on_char ' ' @@ String.trim x in let values = List.map parse_line lines in let lhs, rhs = List.split @@ List.filter_map (fun value -> match value with [x; y] -> Option.Some (x, y) | _ -> Option.None ) values in let lhs = List.fast_sort Int.compare lhs in let rhs = List.fast_sort Int.compare rhs in let result = List.map (fun (x, y) -> Int.abs (y - x)) @@ List.combine lhs rhs in let result = List.fold_left ( + ) 0 result in let () = print_int result in let () = print_newline () in close_in input with e -> close_in_noerr input ; raise e part 1 learning ocaml which is also kinda my first functional lang so im going slow af
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
Jupstar ✪ 2024-12-01 11:24
@Souly so i guess the idea behind the code is that the body isn't so dark. Bcs as you can see greyscale only is quite dark xd
Avatar
greyscale and then a normalization based on the brightest pixel would give you the best customization
Avatar
Avatar
risu
greyscale and then a normalization based on the brightest pixel would give you the best customization
Jupstar ✪ 2024-12-01 11:25
i guess the code kinda does that, i just don't understand it xd
11:25
but it finds sequences where the values are > 128
11:25
of 255
Avatar
Avatar
Ryozuki
let input = open_in "inputs/day1_p1.txt" in try let lines = In_channel.input_lines input in let parse_line x = List.map int_of_string @@ List.filter (fun x -> x <> "") @@ String.split_on_char ' ' @@ String.trim x in let values = List.map parse_line lines in let lhs, rhs = List.split @@ List.filter_map (fun value -> match value with [x; y] -> Option.Some (x, y) | _ -> Option.None ) values in let lhs = List.fast_sort Int.compare lhs in let rhs = List.fast_sort Int.compare rhs in let result = List.map (fun (x, y) -> Int.abs (y - x)) @@ List.combine lhs rhs in let result = List.fold_left ( + ) 0 result in let () = print_int result in let () = print_newline () in close_in input with e -> close_in_noerr input ; raise e part 1 learning ocaml which is also kinda my first functional lang so im going slow af
i'm cooking something in nixlang rn, it's not as easy as i thought it would be, who would've guessed kek
Avatar
Jupstar ✪ 2024-12-01 11:26
so it tries to find light colors ig
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
Jupstar ✪ 2024-12-01 11:26
it kinda looks like a list of pokemon lmao
Avatar
chillerdragon BOT 2024-12-01 11:27
@Ryozuki: what was the ddnet aoc invite code again? Is melon in there?
Avatar
special group ??? no i'm not!
Avatar
Others can join it using the code 677828-82ec4df2. Up to 200 users can join, including yourself.
11:29
@meloƞ i guess its cuz i dont know functional programming good yet, but it feels like my productivity is 1% xd
Avatar
Avatar
Jupstar ✪
@Souly so i guess the idea behind the code is that the body isn't so dark. Bcs as you can see greyscale only is quite dark xd
does that result in some skins having sharp pixels?
Avatar
me coding in nix is having 3 wiki tabs open rn, i feel you @Ryozuki kek
Avatar
ws-client BOT 2024-12-01 11:29
<ChillerDragon> who is dragere
Avatar
like in that aoe skin when you enable colors
Avatar
lol i had 15 tabs open with ocaml docs
Avatar
one thing i already dislike is it has bad tooling ngl
11:29
im just so used to god like tooling of rust
11:30
u can make a bad lang but if u have good tooling its good
11:30
imho xd
Avatar
Avatar
Ryozuki
u can make a bad lang but if u have good tooling its good
@MilkeeyCat hear that? add good tooling or your lang is shit! /jk
Avatar
Avatar
meloƞ
@MilkeeyCat hear that? add good tooling or your lang is shit! /jk
MilkeeyCat 2024-12-01 11:31
I will santatrollet
Avatar
for example "dune fmt" wont work unless you dune build first, and it wont work if u havent made a .ocamlformat file first, and the dune init proj X doesnt make a .ocamlformat file
11:32
its all bad decisions
11:32
bad ux
11:32
oh and the lsp doesnt work unless you dune build first on new files
Avatar
kek oh god
Avatar
and ofc dune config files are S expressions
11:33
why not toml
Avatar
"builtins.genList" expected a string... wait what
Avatar
(lang dune 3.16) (name aoc2024) (generate_opam_files true) (source (github edg-l/aoc2024-ocaml)) (authors "Edgar Luque") (maintainers "Edgar Luque") (license LICENSE) (documentation https://url/to/documentation) (package (name aoc2024) (synopsis "A short synopsis") (description "A longer description") (depends ocaml dune) (tags (topics "to describe" your project))) ; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
11:33
xD
Avatar
Avatar
Ryozuki
(lang dune 3.16) (name aoc2024) (generate_opam_files true) (source (github edg-l/aoc2024-ocaml)) (authors "Edgar Luque") (maintainers "Edgar Luque") (license LICENSE) (documentation https://url/to/documentation) (package (name aoc2024) (synopsis "A short synopsis") (description "A longer description") (depends ocaml dune) (tags (topics "to describe" your project))) ; See the complete stanza docs at https://dune.readthedocs.io/en/stable/reference/dune-project/index.html
EW
Avatar
also deps kind of work like python
11:34
so u have to make local envs
Avatar
Avatar
Souly
does that result in some skins having sharp pixels?
Jupstar ✪ 2024-12-01 11:37
i dunno. But to restore old behavior i think we have to do 2 things. NaN gets 0 Inf gets 255 I think the code is broken bcs we have the Inf part wrong
11:37
Just cursed af that code
Avatar
GitHub BOT 2024-12-01 11:45
The skin list in the menus was initially empty because s_SkinLastRefreshTime is initialized to the current refresh time, which prevents the list from being updated unless the user already has favorite skins, as adding these also cause the list to be updated. The static s_SkinLastRefreshTime variable is replaced with a member variable m_SkinListNeedsUpdate and an empty optional is used as initial value to always refresh the list. The separate m_SkinListNeedsUpdate and `m_SkinFavo...
Avatar
@Ryozuki is a number of a million a little to much as an answer? kek
Avatar
I'd go something simple along the lines of skin_lumas = float[len(skin_pixels)] for idx, pixel in skin_pixels { // magic numbers from Wikipedia skin_lumas[idx] = pixel.r * 0.2126 + pixel.g * 0.7152 + pixel.b * 0.0722 } brightest = 0.0f for _, luma in skin_lumas { if luma > brightest { brightest = luma } } brightest /= 255 if brightest == 0 { brightest = 1 } bw_skin_pixels = Pixel[len(skin_pixels)] for idx, pixel in bw_skin_pixels { value = int(skin_lumas[idx] / brightest) pixel.r = value pixel.g = value pixel.b = value } (edited)
Avatar
Jupstar ✪ 2024-12-01 11:53
/ brightest What is brightest is 0?
Avatar
Ugh I guess there is the possibility of a completely black skin
11:55
ok now it won't break
Avatar
let input = open_in "inputs/day1.txt" in try let lines = In_channel.input_lines input in let parse_line x = List.map int_of_string @@ List.filter (fun x -> x <> "") @@ String.split_on_char ' ' @@ String.trim x in let values = List.map parse_line lines in let lhs, rhs = List.split @@ List.filter_map (fun value -> match value with [x; y] -> Option.Some (x, y) | _ -> Option.None ) values in let countn x = List.fold_left (fun acc a -> if a = x then acc + 1 else acc) 0 in let result = List.map (fun x -> x * countn x rhs) lhs in let result = List.fold_left ( + ) 0 result in let () = print_int result in let () = print_newline () in close_in input with e -> close_in_noerr input ; raise e part 2
Avatar
lmao those let in statements
11:57
they are somewhat familiar
11:57
{ pkgs ? import <nixpkgs> { }, }: let parseNumberPair = line: let parts = builtins.filter (s: s != "") (builtins.split "[ \t]+" line); nums = if builtins.length parts == 2 then let first = builtins.parseInt (builtins.elemAt parts 0); second = builtins.parseInt (builtins.elemAt parts 1); in if builtins.isInt first && builtins.isInt second then [ first second ] else null else null; in nums; readNumberPairs = filePath: let content = builtins.readFile filePath; lines = builtins.filter (line: line != "") (builtins.split "\n" content); pairs = builtins.filter (x: x != null) (map parseNumberPair lines); in pairs; calculateDistance = pairs: let leftList = builtins.sort (a: b: a < b) (map (pair: builtins.elemAt pair 0) pairs); rightList = builtins.sort (a: b: a < b) (map (pair: builtins.elemAt pair 1) pairs); distances = builtins.genList ( i: builtins.abs (builtins.elemAt leftList i - builtins.elemAt rightList i) ) (builtins.length leftList); totalDistance = if distances != [ ] then builtins.foldl' (acc: dist: acc + dist) 0 distances else 0; in totalDistance; in { processInput = inputFile: let inputPairs = readNumberPairs inputFile; in calculateDistance inputPairs; }
Avatar
let is used for all in ocaml
11:57
for functions and vars
Avatar
look at my beautiful nix code which doesnt work
Avatar
let countn x = List.fold_left (fun acc a -> if a = x then acc + 1 else acc) 0
11:58
this is a function with a parameter x
11:58
it returns another function though
11:58
that accepts a parameter that is a list
11:58
xd
11:58
functional ftw
Avatar
let mul x y = x * y u can make let mul2 = mul 2
11:59
and call mul2 <value>
11:59
currying i think
11:59
idk
Avatar
Avatar
meloƞ
{ pkgs ? import <nixpkgs> { }, }: let parseNumberPair = line: let parts = builtins.filter (s: s != "") (builtins.split "[ \t]+" line); nums = if builtins.length parts == 2 then let first = builtins.parseInt (builtins.elemAt parts 0); second = builtins.parseInt (builtins.elemAt parts 1); in if builtins.isInt first && builtins.isInt second then [ first second ] else null else null; in nums; readNumberPairs = filePath: let content = builtins.readFile filePath; lines = builtins.filter (line: line != "") (builtins.split "\n" content); pairs = builtins.filter (x: x != null) (map parseNumberPair lines); in pairs; calculateDistance = pairs: let leftList = builtins.sort (a: b: a < b) (map (pair: builtins.elemAt pair 0) pairs); rightList = builtins.sort (a: b: a < b) (map (pair: builtins.elemAt pair 1) pairs); distances = builtins.genList ( i: builtins.abs (builtins.elemAt leftList i - builtins.elemAt rightList i) ) (builtins.length leftList); totalDistance = if distances != [ ] then builtins.foldl' (acc: dist: acc + dist) 0 distances else 0; in totalDistance; in { processInput = inputFile: let inputPairs = readNumberPairs inputFile; in calculateDistance inputPairs; }
wtf did nixlang copy ocaml
12:01
i like more ocaml syntax tho
Avatar
Avatar
risu
I'd go something simple along the lines of skin_lumas = float[len(skin_pixels)] for idx, pixel in skin_pixels { // magic numbers from Wikipedia skin_lumas[idx] = pixel.r * 0.2126 + pixel.g * 0.7152 + pixel.b * 0.0722 } brightest = 0.0f for _, luma in skin_lumas { if luma > brightest { brightest = luma } } brightest /= 255 if brightest == 0 { brightest = 1 } bw_skin_pixels = Pixel[len(skin_pixels)] for idx, pixel in bw_skin_pixels { value = int(skin_lumas[idx] / brightest) pixel.r = value pixel.g = value pixel.b = value } (edited)
this should produce b&w images where the brightest pixel is (close to) pure white, should make custom colours really pop though now I'm realizing that this is not taking gamma into account Why must colour be so difficult?
12:02
The magic constants from Wikipedia can be replaced with a different set too, I'm not sure what numbers are considered the most correct
Avatar
i just hope that math wont produce any sharp looking pixels
Avatar
Avatar
Souly
i just hope that math wont produce any sharp looking pixels
All I'm doing is uniformly scaling up the brightness of the image, so no sharp pixels that weren't there in the first place should appear Of course increasing the max brightness will increase the contrast a bit, so small mistakes in skins might become more noticeable
Avatar
but it ignores the black pixels no?
Avatar
Well 0 * anything is still 0, yeah, but small values close to zero will also get scaled up
12:16
the if brightest == 0 part is only in case the entire image is pure black
12:16
in that case the image will be kept pure black, and the check is simply to avoid a divide by zero (which Jupstar pointed out)
Avatar
Avatar
risu
I'd go something simple along the lines of skin_lumas = float[len(skin_pixels)] for idx, pixel in skin_pixels { // magic numbers from Wikipedia skin_lumas[idx] = pixel.r * 0.2126 + pixel.g * 0.7152 + pixel.b * 0.0722 } brightest = 0.0f for _, luma in skin_lumas { if luma > brightest { brightest = luma } } brightest /= 255 if brightest == 0 { brightest = 1 } bw_skin_pixels = Pixel[len(skin_pixels)] for idx, pixel in bw_skin_pixels { value = int(skin_lumas[idx] / brightest) pixel.r = value pixel.g = value pixel.b = value } (edited)
arch1t3cht 2024-12-01 12:21
for better results convert to linear light first
Avatar
Avatar
arch1t3cht
for better results convert to linear light first
I mentioned that too :)
Avatar
arch1t3cht 2024-12-01 12:22
ah I missed that
Avatar
I love graphics but I don't write enough code... so I know a fair bit but I can't really bang it out in code form super quickly
Avatar
Avatar
risu
The magic constants from Wikipedia can be replaced with a different set too, I'm not sure what numbers are considered the most correct
arch1t3cht 2024-12-01 12:26
for sRGB the best would be 0.2126 R + 0.7152 G + 0.0722 B (even if not blending in linear light) since sRGB uses BT.709 primaries which have these brightness values
12:26
I guess this makes slightly less sense in gamma light but it's still the most canonical values to use
Avatar
Avatar
arch1t3cht
for sRGB the best would be 0.2126 R + 0.7152 G + 0.0722 B (even if not blending in linear light) since sRGB uses BT.709 primaries which have these brightness values
oh hey I picked right :)
Avatar
arch1t3cht 2024-12-01 12:28
the 0.299 / 0.5987 / 0.114 values are for BT.601
Avatar
That 0.07 for blue always feels so crazy to me, like, intuitively it feels it should be brighter
Avatar
arch1t3cht 2024-12-01 12:28
(I'm not trying to correct you here I'm just taking any opportunity I can get to nerd out about video)
Avatar
I am currently hosting my own gitlab for private projects with friends, does anybody have experience in setting up windowns gitlab runner? Would a windows docker image be sufficient? https://hub.docker.com/r/microsoft/windows (edited)
12:36
Problem is, that this is the windows server image, but I might need at least some headless graphics support
Avatar
GitHub BOT 2024-12-01 12:38
Use the new console background noise texture also instead of the old editor background texture. Screenshots:
  • Before:
!editor-background old
  • After:
!editor-background new

Checklist

  • [X] Tested the change ingame
  • [X] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly re...
Avatar
I guess I have to go for it for now, otherwise I'd need to host a vm 😦
Avatar
GitHub BOT 2024-12-01 12:43
b4e4e5d remove self from spectate selector - TsFreddie a7eb825 Merge pull request #9308 from TsFreddie/remove-spec-self - def-
12:43
eb541f8 Support handling touch state as part of the client update - Robyt3 377664f Add ingame touch controls - Robyt3 ca59afc Merge pull request #8632 from Robyt3/Client-Touch-Input-Ingame - def-
Avatar
Jupstar ✪ 2024-12-01 12:46
@Souly Honestly I am starting to believe the older clients are buggy, not the new ones. I tried to reproduce the same loading like 15.1.3 and still get the different color. Maybe they accidentally used the real skin over the greyscaled one or smth like that? Sadly I cannot compile these old versions, else I could quickly do a git bisect
12:47
Well dunno what is wrong tbh
12:47
But it makes no sense to me
Avatar
Jupstar ✪ 2024-12-01 12:48
or the color values were wrong back then
12:48
What clients did u test?
Avatar
vanilla, recent version
12:49
and some 15.x not sure which one exactly
12:50
i think 15.1.3 but lemmie doublecheck
Avatar
Jupstar ✪ 2024-12-01 12:51
renderdoc sadly also doesnt work 😄
Avatar
i cant even download older versions cuz my net is messed up today
12:52
says it will download in 9 hours 💀
Avatar
Jupstar ✪ 2024-12-01 12:53
ok it works now to build, just had to remove some editor code that was broken
12:58
@Souly one question
12:58
Did you use the 256x128 skin or a high res skin?
Avatar
i tried both
12:58
even lower resolutions
Avatar
Jupstar ✪ 2024-12-01 12:58
bcs these versions only support 256x128
Avatar
like 64x32 or something
Avatar
was it the version where highier res skins resulted in some weird square shape on the tee?
12:59
i remember that was the case in some version
12:59
maybe i used different one for testing then
Avatar
Jupstar ✪ 2024-12-01 13:00
@Souly when i change it to 256x128 it looks like in the new clients
13:00
so this isn't a bug in new clients
13:00
it's just that the old one cannot process high res textures correctly (edited)
Avatar
Avatar
Assa
I guess I have to go for it for now, otherwise I'd need to host a vm 😦
in case anyone is interested: Nope, you can not do that. You either need to setup a VM or cross compile with mingw and use wine, I hate windows so much
Avatar
Avatar
GitHub
Click to see attachment 🖼️
Jupstar ✪ 2024-12-01 13:06
@Souly do you want to keep the issue as discussion?
13:06
Else I leave it closed, since changing skin behavior is smth that will trigger some ppl anyway
Avatar
i think leaving it open just in case would be a good idea
Avatar
Jupstar ✪ 2024-12-01 13:09
Ok but I'll change the tags, bcs imo it's not a bug compared to old versions
Avatar
anyone else has issues with downloading anything from https://ddnet.org/downloads/ ?
Avatar
Jupstar ✪ 2024-12-01 13:10
Works for me
Avatar
i thought its something with my connection but downloading builds from github artifacts works fine
13:11
but when i try to download anything from the site it estimates the download time will take some sick numbers like 9 hours or a day
Avatar
Jupstar ✪ 2024-12-01 13:11
probs cloudflare being slow for you
13:11
I get full speed
Avatar
i guess i will let you know later what version exactly i tested it on
Avatar
Jupstar ✪ 2024-12-01 13:15
it's fine
13:15
i could reprod the color when switching to 256x128
13:15
so it kinda must be resolution dependent
Avatar
GitHub BOT 2024-12-01 13:15
b9c18ad Replace editor background texture with noise texture - Robyt3 bfaf818 Merge pull request #9311 from Robyt3/Client-Editor-Background-Noise - def-
Avatar
GitHub BOT 2024-12-01 13:27
a892a21 Fix menus skin list initially being empty, refactor skin refreshing - Robyt3 3cb8a2b Merge pull request #9310 from Robyt3/Client-Menus-Skin-Refresh-Refactoring - def-
13:33
2464b46 make demo spectator id changes consistent - TsFreddie e0527a1 Merge pull request #9309 from TsFreddie/demo-spec-improvement - def-
Avatar
Avatar
Jupstar ✪
Hi eve, i totally missed you
I have already received my first earnings from ddnet
Avatar
Avatar
MilkeeyCat
I almost did first part of today's AOC in my language but I cant call qsort, it segfaults feelsbadman
MilkeeyCat 2024-12-01 14:15
Good news, it crashes only if I have code in compare function, bad news I have to write code in compare function to make it work 😬
14:16
chillerdragon: wanna read some assembly? :DD
Avatar
ws-client BOT 2024-12-01 15:05
<ChillerDragon> sure teach me some assembly @MilkeeyCat
15:05
<ChillerDragon> I stalked the rank 1 of aoc right now on github found this little gem on there https://place.zillyhuhn.com/
Avatar
MilkeeyCat 2024-12-01 15:07
chillerdragon: find the bug
Avatar
ws-client BOT 2024-12-01 15:11
<ChillerDragon> i cant see attachments
Avatar
his assembly so long it was sent to the message.txt realms
Avatar
ws-client BOT 2024-12-01 15:16
<ChillerDragon> irc does not like long assembly better use a paste service like https://zillyhuhn.com/cstd-web/index.php
Avatar
ws-client BOT 2024-12-01 15:18
<ChillerDragon> where comments
15:18
<ChillerDragon> i dont get shit
Avatar
MilkeeyCat 2024-12-01 15:18
me neither :p
15:18
BUT
15:19
if you replace compare function to compare: push rbp mov rbp, rsp mov QWORD PTR [rbp-24], rdi mov QWORD PTR [rbp-32], rsi mov rax, QWORD PTR [rbp-24] mov eax, DWORD PTR [rax] mov DWORD PTR [rbp-4], eax mov rax, QWORD PTR [rbp-32] mov eax, DWORD PTR [rax] mov DWORD PTR [rbp-8], eax mov eax, DWORD PTR [rbp-4] sub eax, DWORD PTR [rbp-8] pop rbp ret
15:19
it will work
15:19
i don't understand why
Avatar
MilkeeyCat 2024-12-01 15:41
using r14, r15 registers breaks everything, cool
Avatar
Koll Potato 2024-12-01 15:54
epic libtw2 and ddnet map moment
KEKW 5
Avatar
ws-client BOT 2024-12-01 15:59
<ChillerDragon> nice @Koll Potato
Avatar
GitHub BOT 2024-12-01 17:51
i do anything for install this game on arm64, but got nothing...
Avatar
definitely missed wasting more time on super inefficient scripts :> #!/bin/bash #Advent of Code - Day 01 mapfile -t a < <(sort -k1 -n "$1" | cut -d' ' -f1) mapfile -t b < <(sort -k2 -n "$1" | cut -d' ' -f4) for i in "${!a[@]}"; do x=$((${a[$i]}-${b[$i]})); t1=$((${t1:-0}+${x#-})); done while read -r i; do x=$(cut -d' ' -f4 "$1" | sort | uniq -c | sed 's/^[ \t]*//' | grep " $i" | cut -d' ' -f1) t2=$((${t2:-0}+(i * ${x:-0}))) done < <(cut -d' ' -f1 "$1") printf -- "p1: %s\\np2: %s\\n" "$t1" "$t2"
monkaS 1
Avatar
bro is scripting
Avatar
pepecry damn (edited)
Avatar
i bought some bluetooth iem hooks and they don't fit
20:33
feelsbadman
20:33
i could mutilate them to make them fit but then that makes them unreturnable
Avatar
Avatar
Ewan
i bought some bluetooth iem hooks and they don't fit
All my IEMs have detachable mmcx wires and all my cables have hooks that are made of wire so you can bend them to your ear
Avatar
i dont think the bluetooth to iem things are great
21:42
you get better qol with dedicated bluetooth buds
Avatar
Avatar
louis
i dont think the bluetooth to iem things are great
montikboom 2024-12-01 21:42
PLEASE STOP KIDS FROM POSTING THEIR CLIPS ON LINEAR
21:43
what u want me to do
Avatar
yeah fr louis wtf
Avatar
Avatar
louis
what u want me to do
montikboom 2024-12-01 21:43
DELET IT
Avatar
Avatar
meloƞ
yeah fr louis wtf
montikboom 2024-12-01 21:43
No mor liner❌
Avatar
can you keep that to #off-topic tho - check your channels!
Avatar
I tried to cross compile from ubunto to windows using mingw, it compiles, I get an exe with dlls and when I start it on my windows machine, it just states "Die App kann auf dem PC nicht ausgeführt werden - Wensen sie sich an den Softwareherausgeber" (This app can not be run on this computer, please contact the softwaredeveloper). Did anybody ever come across this? I already tried multiple things and don't know what the issue is
Avatar
did you correctly invoke the mingw64 toolchain with cmake? i remember it working perfectly fine for me.. hmm can you launch the .exe using wine on ubuntu? maybe it's generally borked
Avatar
Koll Potato 2024-12-01 21:58
@meloƞ go sleep
👍 1
Avatar
Avatar
Assa
I tried to cross compile from ubunto to windows using mingw, it compiles, I get an exe with dlls and when I start it on my windows machine, it just states "Die App kann auf dem PC nicht ausgeführt werden - Wensen sie sich an den Softwareherausgeber" (This app can not be run on this computer, please contact the softwaredeveloper). Did anybody ever come across this? I already tried multiple things and don't know what the issue is
montikboom 2024-12-01 21:58
Try building file on windows
Avatar
GitHub BOT 2024-12-01 21:58

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
Avatar
Learath2
All my IEMs have detachable mmcx wires and all my cables have hooks that are made of wire so you can bend them to your ear
nice
21:59
i was just able to mutilate them
21:59
works fine
Avatar
Avatar
meloƞ
did you correctly invoke the mingw64 toolchain with cmake? i remember it working perfectly fine for me.. hmm can you launch the .exe using wine on ubuntu? maybe it's generally borked
I can send you the toolchain I used: # windows-toolchain.cmake set(CMAKE_SYSTEM_NAME Windows) # Target system #set(CMAKE_SYSTEM_PROCESSOR AMD64) # Target processor architecture (x86_64 for 64-bit) # Specify the compiler paths set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) set(CMAKE_LINKER x86_64-w64-mingw32-ld) # Add extra flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -shared") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -shared") # I am missing my dlls set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_SHARED_LIBRARY_PREFIX "") # Windows doesn't use 'lib' prefix for DLLs set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # Optional: Define the Windows library path set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) # Optional: Adjust search paths for headers and libraries set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Avatar
GitHub BOT 2024-12-01 21:59
eea59d9 Update translation stats for 18.8 - def-
Avatar
Avatar
montikboom
Try building file on windows
Building on windows with MSVC works btw
Avatar
Avatar
Assa
I tried to cross compile from ubunto to windows using mingw, it compiles, I get an exe with dlls and when I start it on my windows machine, it just states "Die App kann auf dem PC nicht ausgeführt werden - Wensen sie sich an den Softwareherausgeber" (This app can not be run on this computer, please contact the softwaredeveloper). Did anybody ever come across this? I already tried multiple things and don't know what the issue is
Koll Potato 2024-12-01 21:59
is there a difference on which distro you compile?
Avatar
Avatar
Assa
I can send you the toolchain I used: # windows-toolchain.cmake set(CMAKE_SYSTEM_NAME Windows) # Target system #set(CMAKE_SYSTEM_PROCESSOR AMD64) # Target processor architecture (x86_64 for 64-bit) # Specify the compiler paths set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) set(CMAKE_LINKER x86_64-w64-mingw32-ld) # Add extra flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -shared") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -shared") # I am missing my dlls set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_SHARED_LIBRARY_PREFIX "") # Windows doesn't use 'lib' prefix for DLLs set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll") # Optional: Define the Windows library path set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) # Optional: Adjust search paths for headers and libraries set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
why did you create your own?
21:59
ddnet provides one
22:00
/cmake/toolchains/mingw64.toolchain
Avatar
Koll Potato 2024-12-01 22:00
i'm going to try on arch tomorrow
22:00
but now i sleep
Avatar
This is not ddnet related, but I don't know where to ask ;_;
Avatar
oOOOH
22:00
hmm... not sure how to debug a different application really :/
22:04
1b85bf2 Spikes freeze instead of kill in practice - SollyBunny 738df62 Merge pull request #9295 from SollyBunny/spikes_freeze_instead_of_kill_in_practice - def-
Avatar
Avatar
GitHub
Click to see attachment 🖼️
@Ewan how do you think heinrich will react to this nouis
22:05
given the last time it was tried to touch practice behaviour when hitting a kill tile led to a very fun discussion (edited)
22:09
We had a pull request about that before. I'm against this. Instead: Don't respawn the tee in practice mode, allow them to press /r to respawn at the last position.
but i guess this is what heinrich initially wanted.. hmm
Avatar
GitHub BOT 2024-12-01 22:09
e0a47f3 Update translations for upcoming 18.8 - def-
Avatar
I don't know, I give up
Avatar
Avatar
meloƞ
@Ewan how do you think heinrich will react to this nouis
no idea
22:16
i dont see the point of that at all
22:16
strange feature
22:16
is this supposed to be like an adverse consequence of hitting the kill tile lol
22:16
it's practice mode
Avatar
GitHub BOT 2024-12-01 22:19

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
I'm trying out awk this year for advent of code, I gladly take feedback :) 1: #! /usr/bin/awk -f function diff(a, b) { if (a > b) { return a - b } else { return b - a } } BEGIN { } { a[FNR] = $1 b[FNR] = $2 } END { asort(a) asort(b) for (line in a) sum += diff(a[line], b[line]) print sum } 2: #! /usr/bin/awk -f BEGIN { } { numbers[FNR] = $1 occurences[$2] += 1 } END { for (line in numbers) { number = numbers[line] sum += number * occurences[number] } print sum } (edited)
Avatar
is there a ddnet leaderboard for aoc?
Avatar
how do I get the link
Avatar
hm, its probably buried in this chat somewhere
Avatar
yeah chiller sent it to me today
22:53
ah nvm
Avatar
Avatar
Ryozuki
677828-82ec4df2 is the code to join
.
Avatar
melon beat me to it 😔
Avatar
ah okay i'm already in it
kek 2
Avatar
we're going strong on this one! (i forgot the second part and just did it like 10 minutes ago
Avatar
chillerdragon: can you help me for autofarm for clb2s?
Exported 361 message(s)
Timezone: UTC+0