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 2025-02-27 00:00 and 2025-02-28 00:00
Avatar
GitHub BOT 2025-02-27 00:08
The code uses Id and CPlayer::m_ClientID/GetCid() equally. That's wrong, because Id has to be used when sending snaps to the client, for the translation layer, and the other has to be used when using the actual client id in the code itself. This should be done before 128p server-side launches.
Avatar
What does this track? 1. Total time spent on DDNet servers 2. None AFK time spent on DDNet servers 3. Total time spent beating maps (aka sum of map completion times) (edited)
Avatar
david loves Jellycar Worlds 2025-02-27 00:26
well now thats a new error ive never seen before
00:27
yep its consistent not just a out of memory bug
00:27
(im fuzzing the map format) (edited)
00:29
yea thats more what i was exspecting. more of the most commen bug it found
Avatar
GitHub BOT 2025-02-27 00:30
Closes #9772 Adds flags so that buttons can specify which mouse buttons they react to (LMB, RMB, MMB). This is how imgui does it for it's buttons Hopefully, I didn’t miss anything, the editor's code is a big mess

Checklist

  • [x] 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 po...
Avatar
Avatar
APFFF
What does this track? 1. Total time spent on DDNet servers 2. None AFK time spent on DDNet servers 3. Total time spent beating maps (aka sum of map completion times) (edited)
The magic scripts that make DDNet run. Contribute to ddnet/ddnet-scripts development by creating an account on GitHub.
Avatar
I already knew where to look, been here before heh, just wanted to pass you a reference cuz idk sql
gigachad 1
Avatar
@Sans btw. are fine with me asking you question about your skin-renderer here and there?
Avatar
sure, go for it
00:35
@APFFF I based it mostly on this document by Patiga, with a few touchups here and there
Avatar
Avatar
Sans
@APFFF I based it mostly on this document by Patiga, with a few touchups here and there
omfg thats exactly what I was looking for haha (edited)
Avatar
btw. do you know if theres an easy way to access the SVG files instead of ripping the PNGs from ddnet.org/skins?
00:37
from where
00:38
Ah, those are not svg's
Avatar
ah nvm I got confused with a different project. there is no svgs xD
Avatar
yeah, they're rendered
00:38
with canvas
Avatar
I was just wondering how they got such high quality renderings, but I guess they use the 4k versions
Avatar
Avatar
Sans
with canvas
Canvas?
Avatar
The Canvas API provides a means for drawing graphics via JavaScript and the HTML element. Among other things, it can be used for animation, game graphics, data visualization, photo manipulation, and real-time video processing.
Avatar
crazy how opening this url made it switch to /zh-TW/ (I'm german)
00:40
Avatar
it wont even let me access the english path?
Avatar
top right
Avatar
It seems to be a Firefox thing. Works with Chrome
Avatar
Avatar
Sans
top right
That worked but manually editing the path didnt (?)
Avatar
¯\_(ツ)_/¯
00:43
mdn is on some good stuff apparently
Avatar
anyways, thanks for the ressources
Avatar
my lazy ass would have never done that research
Avatar
david loves Jellycar Worlds 2025-02-27 00:54
are assetsions enabled on the build on steam? (edited)
00:56
@Robyt3
00:57
i need to know if i should report this or not
00:57
as if the anser is no then i should report it and if the anser is yes then i shouldnt
Avatar
Avatar
Learath2
Because external apps are not audited at all. So people just make spammer apps
When you have time I wanna get a bit more details about this pls :) It randomly popped in my head again and I wanna try to find solutions (edited)
Avatar
tl;dr people here probably generally don't want new & fancy chat features unless there's a good case made for them
😭 1
01:15
it's all a big scam to make you eat pig ham
Avatar
Avatar
GitHub
Click to see attachment 🖼️
its basically this, but with anything you want
01:32
present your data more nicely
01:33
instead of the great text wall of china™️ (edited)
01:33
+also you get to customize stuff
Avatar
david loves Jellycar Worlds 2025-02-27 01:33
I FOUND A OOB WRITE YIPPY!!!!!! ill report it once i find the cause and mabey make a proof of consept!
Avatar
There's also functionality that can be added
Avatar
Avatar
david loves Jellycar Worlds
I FOUND A OOB WRITE YIPPY!!!!!! ill report it once i find the cause and mabey make a proof of consept!
you found a what now?
01:34
HUH
Avatar
david loves Jellycar Worlds 2025-02-27 01:34
a oob write
Avatar
what's that
Avatar
david loves Jellycar Worlds 2025-02-27 01:35
sadly its on the heap so unlikely to be exsplotable but ill try at least
Avatar
am confoos
Avatar
david loves Jellycar Worlds 2025-02-27 01:43
basicly it means that you might be able to hack someone if they join your server
01:43
is basicly what that means
01:43
@Sans
01:43
mabey
01:43
i need to look into it more
Avatar
that's scary heh
Avatar
Avatar
Sans
what's that
out of bounds memory write
Avatar
david loves Jellycar Worlds 2025-02-27 01:45
yea
Avatar
in languages like cpp without intrinsic memory safety it goes uncaught
01:45
it's the entry point for the majority of CVEs i see
Avatar
david loves Jellycar Worlds 2025-02-27 01:45
indded
01:46
for most CVEs that result in rce espesaly
Avatar
Avatar
Sans
When you have time I wanna get a bit more details about this pls :) It randomly popped in my head again and I wanna try to find solutions (edited)
Avatar
david loves Jellycar Worlds 2025-02-27 01:50
step 1: turn this into a OOB write primitive. so basicly contual what gets overiten and where
01:50
well ok step 1 is to understand the cause of the bug
Avatar
david loves Jellycar Worlds 2025-02-27 01:54
this is exsiting!
01:54
my first real exsplote is forming!
Avatar
david loves Jellycar Worlds 2025-02-27 02:03
wait acsualy i should reboot my pc and try agien just to be sure
02:10
ok yep that didnt break it good its not dependent on the memory layout
Avatar
that's awesome man
02:14
resume worthy item
02:14
if u can fix it 😎
Avatar
i wasnt even aware that's a thing wtf
02:58
i got no counter to that
Avatar
it's the train of thought
02:58
it's just extra
02:58
imo
02:58
and i think that's probably the sentiment of others who don't want it
Avatar
i mean
Avatar
less is more
Avatar
i dont want that specifically
02:59
but external apps are a cool idea
02:59
and very useful
Avatar
@tsk LMFAO i see u
dogohaha 1
Avatar
This is just something I whipped up out of boredom a while ago, but imagine instead of this there's literally anything, a PR, docs on something, a saved message etc.
03:01
But image generation and other bs, yikes
Avatar
i think they'd sooner add it to the ddnet bot
03:01
that's why bots are good
03:02
because the server admins can opt into them
03:02
they can't control anything about external apps
Avatar
I'm more than happy to re-write the bot in typescript but everyone is a python fanatic around here
03:02
heh
Avatar
sorry but the logic isn't so unique it requires the rest of the bot to be ported
03:03
u could do it with magick super ez
Avatar
python is weird tho 😩
Avatar
it's just an implementation detail
Avatar
Avatar
Ewan
u could do it with magick super ez
no idea whats that
Avatar
imagemagick
03:03
python lib & super duper common CLI image manipulation utility
03:04
i used npm/sharp for image manip
Avatar
im sure u did
03:05
u dont linux do u
Avatar
i used to, until valorant hit me like a horse
03:05
relapsing over valorant is insane
Avatar
the good news is
Avatar
maybe i made fun of you for it already sorry 😓
Avatar
i switched to cs2 kek
03:05
so go back
03:06
tell bill gates what's what
Avatar
i will, too lazy to make backups rn tho
Avatar
excuses
Avatar
i've got about 800gb of stuff i need to sort through
Avatar
ive basically just happened to buy more drives as i need them & now my pc is full of backup drives
03:07
it's not very efficient
Avatar
wdym, that's very nice
03:07
i wish i had more than 1 drive (excluding my boot drive) (edited)
03:08
i'd be able to sort stuff better
03:08
and even dedicate a drive to windows for god knows when i might need it
Avatar
if i had thought any of this out i'd use a NAS for all but boot/root/home drives & games
03:09
having all the devices mounted & even plugged in will have a minor effect on the rest of the system
03:09
less is more often times
Avatar
heh you dont wanna know how many random tech stuff i'd buy and set up and manage just because
03:10
if only i had the budget (edited)
03:11
brain happy when many seemingly complicated things work perfectly in unison, i understand what they do and how everything works, and i can manage stuff from any of the screens
03:11
nod
03:14
it’s cooler once it spreads to your LAN
03:14
imo
03:14
u got a whole network of cool shit
03:15
instead of just one computer
03:15
i used to host shit on my pc all the time & never turned it off but as i got older i started to notice the heat/fan noise/whatever
03:15
which is why it’s cool to have smth else so you can still treat your desktop like a normal computer lol
Avatar
eh thats not too much of a bother
03:16
what you should be crying about is the power bill kekw
Avatar
haha well
03:16
that’s why i only run one pc now
03:16
at our old place utilities were shared among all tenants
Avatar
you must've been adored by everyone
Avatar
they don’t know
03:17
of the 200+ tenants
Avatar
they don't need to know
Avatar
🤷‍♂️
Avatar
anyway, back to linux vs windows
03:18
what distro would you recommend
03:18
aside from arch, im not touching that rabbit hole
03:18
or anything based on it really
03:18
depends
Avatar
Avatar
Ewan
if u can fix it 😎
david loves Jellycar Worlds 2025-02-27 03:21
i mean depends on what you mean "fix"
03:21
if crashing it in a non-rce way counts as a "fix" then yes i could fix it
03:21
in fact i can fix it by just making the game close imeditly. that fixes any crashes
Avatar
eliminate the potential for the oob write
03:22
within the code
03:22
lol
Avatar
david loves Jellycar Worlds 2025-02-27 03:22
yea thats simple enough
Avatar
Avatar
Ewan
eliminate the potential for the oob write
david loves Jellycar Worlds 2025-02-27 03:22
ok ill make the game exit as soon as it loads is that good?
Avatar
am i misunderstanding something
Avatar
david loves Jellycar Worlds 2025-02-27 03:23
im saying ill make the game close as soon as the game loads
03:23
basicly making it into a usless progam that does basicly nothing
03:23
then unless theres a bug in libc or something no more oob writes
03:23
simple
Avatar
that’s not exactly what i had in mind but you do you
Avatar
david loves Jellycar Worlds 2025-02-27 03:24
lol
03:24
i mean it would work
03:24
also can you exsplane the save format to me?
Avatar
this purple color on my name means fairly little
03:24
idk anything about that
Avatar
Avatar
Sans
what distro would you recommend
i'm partial to nixos but i'm also probably autistic
03:43
just get something that's easy and common enough that you won't run into weird packaging lapses & breaks that come from that
Avatar
the only thing that scary about nix is programming stuff in the lang
03:43
might give it a shot tbh
Avatar
Avatar
Sans
the only thing that scary about nix is programming stuff in the lang
oh no, it isn't
03:44
this aint no typescript compiler bwoiah
03:45
in all seriousness there are some fairly hard to diagnose issues that come from basic things
03:45
many langs looks easy until you factor in the overall development experience and then it's not so simple
03:45
it also tends to take its time & in general it's pretty hard on your disk, i'd imagine
Avatar
Avatar
Ewan
@tsk LMFAO i see u
8730kissyou
Avatar
Jupstar ✪ 2025-02-27 05:35
@david loves Jellycar Worlds why do you always write some English words incorrectly. Judging your overall grammar skills it kinda looks you do it on purpose. Are you some sub kind of analphabet?
Avatar
david loves Jellycar Worlds 2025-02-27 05:37
no im just very bad at spelling
Avatar
Koll Potato 2025-02-27 05:46
or dyslexic
Avatar
david loves Jellycar Worlds 2025-02-27 05:47
can anyone exsplane the map format to me?
Avatar
Avatar
Sans
what distro would you recommend
gentoo
Avatar
Avatar
david loves Jellycar Worlds
can anyone exsplane the map format to me?
can you try to look up docs online a bit? some minimum effort
Avatar
david loves Jellycar Worlds 2025-02-27 06:11
wait theres docs?
Avatar
Avatar
david loves Jellycar Worlds
wait theres docs?
MilkeeyCat 2025-02-27 06:11
Some Teeworlds stuff in Rust.™. Contribute to heinrich5991/libtw2 development by creating an account on GitHub.
Avatar
david loves Jellycar Worlds 2025-02-27 06:12
thanks sorry
Avatar
This article aims to introduce you into DDNet development, since it's an open-source game, it relies on random people kind enough to contribute to it on their free time.
06:14
@david loves Jellycar Worlds also just in case u know, most devs are in EU and its 7 in the morning so ur lucky to get answers now xd
06:15
just woke up
06:15
☕
Avatar
david loves Jellycar Worlds 2025-02-27 06:15
ah so thats why its so inactive atm
06:15
lol
06:15
thanks
Avatar
where u from?
Avatar
david loves Jellycar Worlds 2025-02-27 06:16
usa
Avatar
david loves Jellycar Worlds 2025-02-27 06:16
also is there any tools to read the datafiles easaly
Avatar
in rust yes
06:16
twmap
06:16
This crate provides a library for safe parsing, editing and saving of Teeworlds and DDNet maps. Goals of this library are:
06:16
well idk if its low level for data files
06:17
API documentation for the Rust datafile mod in crate twmap.
06:17
looks like its there
06:17
do u know rust? good time to learn
Avatar
david loves Jellycar Worlds 2025-02-27 06:17
not yet but ig its a good time to learn yea lol
Avatar
otherwise u can check the tools/ in ddnet
06:18
and see how the map related ones handle it
06:18
in c++
Avatar
david loves Jellycar Worlds 2025-02-27 06:18
i assume it lets me edit the fealds drectly?
Avatar
but imho twmap is clean
06:18
"This crate provides a library for safe parsing, editing and saving "
06:18
idk if it lets u do invalid things
06:19
API documentation for the Rust RawDatafile struct in crate twmap.
06:19
yeah that one should do the trick
06:20
it has a load and save and all fields are public
06:20
but idk if ur goal is to find issues with the c++ code if u will find the same with rust
06:20
since rust is safe against lot more memory issues
06:21
and i think this crate doesnt use unsafe
06:22
@david loves Jellycar Worlds u probs can get more done without knowing rust with this https://github.com/ddnet/ddnet/blob/master/src/tools/map_resave.cpp
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
06:22
i recommend making ur own tool there
Avatar
Avatar
Ryozuki
but idk if ur goal is to find issues with the c++ code if u will find the same with rust
david loves Jellycar Worlds 2025-02-27 06:23
i already found a oob write atm im trying to detemen the cause and mabey make a poc rce exsplote that opens caculator
Avatar
is the write from an invalid map?
Avatar
david loves Jellycar Worlds 2025-02-27 06:24
yea
Avatar
would be cool to try it with the rust lib
06:24
im sure rust will shine
06:24
send the map when u can xd
Avatar
david loves Jellycar Worlds 2025-02-27 06:25
id rather not untill i report the bug offisaly. dont want anyone stealing my bug lol
Avatar
oh ok xD
Avatar
david loves Jellycar Worlds 2025-02-27 06:25
ie on github
06:26
also given its a oob write i might or might not disclose it privately with the staff in #✉-create-a-ticket
Avatar
GitHub is where people build software. More than 150 million people use GitHub to discover, fork, and contribute to over 420 million projects.
06:26
can u see this?
Avatar
david loves Jellycar Worlds 2025-02-27 06:26
as id rather not have 10 servers that hack you as soon as you join it lol
Avatar
i enabled private security reports
06:26
so u can send it there when u find it
Avatar
david loves Jellycar Worlds 2025-02-27 06:26
ok
06:26
well i found it im just looking for the cause
Avatar
ok, back to making my codegen intermediate layer for compilers
Avatar
Avatar
Ryozuki
can you try to look up docs online a bit? some minimum effort
i love this response tbh
Avatar
Avatar
Ryozuki
ok, back to making my codegen intermediate layer for compilers
sounds cool
07:06
how is your lang going
07:06
either one ig lol
Avatar
this one is not a lang
07:37
but a tool to build langs in rust easier
07:37
like some kind of layer before llvm
07:37
i call it IRVM
07:37
the lang im making, im implementing enums rn
07:37
but enums like rust
Avatar
I should get out of bed
Avatar
how to change font in text render? if possible only for one text(not for full game)
Avatar
let mut module = Module::new("example"); let mut func = Function::new("main", &[Parameter::new(Type::Int(32))], Type::Int(32)); let param = func.param(0)?; let entry_block = func.entry_block; let value = func.blocks[entry_block].instr_add(&param, &Operand::const_i32(4))?; let then_block = func.add_block(&[]); let else_block = func.add_block(&[]); let final_block = func.add_block(&[Type::Int(32)]); let cond = func.blocks[entry_block].instr_icmp( IcmpCond::Eq, value.clone(), Operand::const_i32(6), )?; func.blocks[entry_block].instr_cond_jmp(then_block, else_block, &cond, &[], &[]); { let value = func.blocks[then_block].instr_add(&value, &Operand::const_i32(2))?; func.blocks[then_block].instr_jmp(final_block, &[value]); } { let value = func.blocks[else_block].instr_add(&value, &Operand::const_i32(6))?; func.blocks[else_block].instr_jmp(final_block, &[value]); } { let param = func.blocks[final_block].arg(0)?; func.blocks[final_block].instr_ret(Some(&param)); } module.functions.insert(func); lower_module_to_llvmir(&module)?; makes the following ir: ; ModuleID = 'example' source_filename = "example" define i32 @main(i32 %0) { entry: %1 = add i32 %0, 4 %2 = icmp eq i32 %1, 6 br i1 %2, label %bb0_true_1, label %bb0_false_2 %3 = add i32 %1, 2 bb0_true_1: ; preds = %entry br label %bbbr ret i32 %5 %4 = add i32 %3, 6 br label %bbbr ret i32 %5 bb0_false_2: ; preds = %entry bbbr: ; preds = %bb0_true_1, %bb0_true_1 %5 = phi i32 [ %3, %bb0_true_1 ], [ %3, %bb0_false_2 ] } @MilkeeyCat current IRVM status, can make simple stuff, the api can be improved more tho
10:34
the block arguments are to handle PHI nodes in SSA automagically
10:34
i do it internally in the lowering poggers2
10:35
like MLIR
10:35
let preds = ctx.func.find_preds_for(block_idx); let mut block_args = Vec::new(); if !preds.is_empty() { let operand_len = preds.first().unwrap().1.len(); for i in 0..(operand_len) { let phy_ty = lower_type(ctx.ctx, preds.first().unwrap().1[i].get_type()); let phi_node = core::LLVMBuildPhi(ctx.builder, phy_ty, c"".as_ptr()); let mut blocks = Vec::new(); let mut values = Vec::new(); for (pred_block_idx, operands) in &preds { let value = lower_operand(ctx, &operands[i]); let pred_ptr = ctx.blocks.get(&pred_block_idx.to_idx()).unwrap(); blocks.push(*pred_ptr); values.push(value); } assert_eq!(values.len(), values.len()); core::LLVMAddIncoming( phi_node, values.as_mut_ptr().cast(), blocks.as_mut_ptr().cast(), blocks.len() as u32, ); block_args.push(phi_node); } } ctx.block_args.insert(block_idx.to_idx(), block_args); (the lowering to llvm uses unsafe cuz using the llvm c api directly)
10:38
actually found a bug the else doesnt do anything xd
10:40
; ModuleID = 'example' source_filename = "example" define i32 @main(i32 %0) { entry: %1 = add i32 %0, 4 %2 = icmp eq i32 %1, 6 br i1 %2, label %bb0_true_1, label %bb0_false_2 bb0_true_1: ; preds = %entry %3 = add i32 %1, 2 br label %bbbr bb0_false_2: ; preds = %entry %4 = add i32 %3, 6 br label %bbbr bbbr: ; preds = %bb0_false_2, %bb0_true_1 %5 = phi i32 [ %3, %bb0_true_1 ], [ %3, %bb0_false_2 ] ret i32 %5 } (edited)
10:40
easy fix
10:40
or not xD
Avatar
Avatar
Ryozuki
but enums like rust
lovely
Avatar
Avatar
david loves Jellycar Worlds
are assetsions enabled on the build on steam? (edited)
dbg_asserts are always enabled
Avatar
Avatar
Ryozuki
let mut module = Module::new("example"); let mut func = Function::new("main", &[Parameter::new(Type::Int(32))], Type::Int(32)); let param = func.param(0)?; let entry_block = func.entry_block; let value = func.blocks[entry_block].instr_add(&param, &Operand::const_i32(4))?; let then_block = func.add_block(&[]); let else_block = func.add_block(&[]); let final_block = func.add_block(&[Type::Int(32)]); let cond = func.blocks[entry_block].instr_icmp( IcmpCond::Eq, value.clone(), Operand::const_i32(6), )?; func.blocks[entry_block].instr_cond_jmp(then_block, else_block, &cond, &[], &[]); { let value = func.blocks[then_block].instr_add(&value, &Operand::const_i32(2))?; func.blocks[then_block].instr_jmp(final_block, &[value]); } { let value = func.blocks[else_block].instr_add(&value, &Operand::const_i32(6))?; func.blocks[else_block].instr_jmp(final_block, &[value]); } { let param = func.blocks[final_block].arg(0)?; func.blocks[final_block].instr_ret(Some(&param)); } module.functions.insert(func); lower_module_to_llvmir(&module)?; makes the following ir: ; ModuleID = 'example' source_filename = "example" define i32 @main(i32 %0) { entry: %1 = add i32 %0, 4 %2 = icmp eq i32 %1, 6 br i1 %2, label %bb0_true_1, label %bb0_false_2 %3 = add i32 %1, 2 bb0_true_1: ; preds = %entry br label %bbbr ret i32 %5 %4 = add i32 %3, 6 br label %bbbr ret i32 %5 bb0_false_2: ; preds = %entry bbbr: ; preds = %bb0_true_1, %bb0_true_1 %5 = phi i32 [ %3, %bb0_true_1 ], [ %3, %bb0_false_2 ] } @MilkeeyCat current IRVM status, can make simple stuff, the api can be improved more tho
MilkeeyCat 2025-02-27 10:58
epyc
Avatar
Avatar
Ryozuki
let mut module = Module::new("example"); let mut func = Function::new("main", &[Parameter::new(Type::Int(32))], Type::Int(32)); let param = func.param(0)?; let entry_block = func.entry_block; let value = func.blocks[entry_block].instr_add(&param, &Operand::const_i32(4))?; let then_block = func.add_block(&[]); let else_block = func.add_block(&[]); let final_block = func.add_block(&[Type::Int(32)]); let cond = func.blocks[entry_block].instr_icmp( IcmpCond::Eq, value.clone(), Operand::const_i32(6), )?; func.blocks[entry_block].instr_cond_jmp(then_block, else_block, &cond, &[], &[]); { let value = func.blocks[then_block].instr_add(&value, &Operand::const_i32(2))?; func.blocks[then_block].instr_jmp(final_block, &[value]); } { let value = func.blocks[else_block].instr_add(&value, &Operand::const_i32(6))?; func.blocks[else_block].instr_jmp(final_block, &[value]); } { let param = func.blocks[final_block].arg(0)?; func.blocks[final_block].instr_ret(Some(&param)); } module.functions.insert(func); lower_module_to_llvmir(&module)?; makes the following ir: ; ModuleID = 'example' source_filename = "example" define i32 @main(i32 %0) { entry: %1 = add i32 %0, 4 %2 = icmp eq i32 %1, 6 br i1 %2, label %bb0_true_1, label %bb0_false_2 %3 = add i32 %1, 2 bb0_true_1: ; preds = %entry br label %bbbr ret i32 %5 %4 = add i32 %3, 6 br label %bbbr ret i32 %5 bb0_false_2: ; preds = %entry bbbr: ; preds = %bb0_true_1, %bb0_true_1 %5 = phi i32 [ %3, %bb0_true_1 ], [ %3, %bb0_false_2 ] } @MilkeeyCat current IRVM status, can make simple stuff, the api can be improved more tho
Koll Potato 2025-02-27 12:05
what's the difference between irvm and inkwell?
Avatar
@Koll Potato inkwell api sucks and it segfaults on a invalid gep, which is why its marked unsafe
12:09
i detach completly the ir and ir builder from llvm and provide lowering backends like llvm it
poggers2 1
12:09
but the lowering is like a atomic unit so its way easier to deal with ffi ownership and lifetimes
12:09
and i can lower to other backends like qbe
12:10
my goal is to make a rly nice api
Avatar
@Jupstar ✪ if we don't know, who renders a map, why do tune layer numbers appear in the editor and not ingame (with entities enabled) (without tilebuffer)? I am wondering if this is deliberately or a bug.
Avatar
Avatar
Assa
@Jupstar ✪ if we don't know, who renders a map, why do tune layer numbers appear in the editor and not ingame (with entities enabled) (without tilebuffer)? I am wondering if this is deliberately or a bug.
Jupstar ✪ 2025-02-27 12:32
I dunno, I assume it simply never was implemented
Avatar
can I turn on the tilebuffer for ingame rendering?
Avatar
Jupstar ✪ 2025-02-27 12:37
you can, there is overlay count which is set per physics layer
12:37
and probably left out for tunes
Avatar
Avatar
Jupstar ✪
you can, there is overlay count which is set per physics layer
can you tell me how, I just want to check 🙈
Avatar
Jupstar ✪ 2025-02-27 12:38
maplayers.cpp
12:38
see how tele layer is made or smth
Avatar
yes I understand, that the tune layer is missing the overlay. I am just wondering, if I can turn on different behavior ingame. You said yesterday it was backend dependend, but not matter what backend I choose I still don't have tilebuffering enabled
12:40
Otherwise Editor is alsways tielbuffered and ingame is not, making it possible to do options for different cases
Avatar
Avatar
Assa
yes I understand, that the tune layer is missing the overlay. I am just wondering, if I can turn on different behavior ingame. You said yesterday it was backend dependend, but not matter what backend I choose I still don't have tilebuffering enabled
Jupstar ✪ 2025-02-27 12:40
it's simply not implemented for tune layers
Avatar
Avatar
Assa
Otherwise Editor is alsways tielbuffered and ingame is not, making it possible to do options for different cases
Jupstar ✪ 2025-02-27 12:40
editor is never buffered
Avatar
uh yes I mean the other way around: Ingame is always tilebuffered and editor is never, is that true?
Avatar
Jupstar ✪ 2025-02-27 12:44
ingame is buffered if the backend supports it
12:44
else it falls back to the same rendering as editor
Avatar
Back to my question, how do I disable tilebuffering ingame?
Avatar
Jupstar ✪ 2025-02-27 12:45
use opengl 1
Avatar
I already did this, and the tune numbers are also not rendered, so that can't be it. Do you understand what I mean?
Avatar
Jupstar ✪ 2025-02-27 12:46
I already told you tune numbers were simply never implemented xD
Avatar
they are in the editor? Whats the difference if they are rendering the same????
Avatar
Jupstar ✪ 2025-02-27 12:47
all numbers in phy layers are a extra draw call
12:47
has nothing todo with the layer itself
Avatar
Here is the only call on RenderTuneOverlay, which means, that this functions get called by the editor sperately for physics layers Thank you
Avatar
how to change font in text render? if possible only for one text(not for full game)
14:41
average cpp error
Avatar
kek
Avatar
Avatar
nankudo
how to change font in text render? if possible only for one text(not for full game)
TextRender()->SetFontPreset(EFontPreset::ICON_FONT); // create text container, or just draw text TextRender()->SetFontPreset(EFontPreset::DEFAULT_FONT);
14:48
darn chatgpt doesnt let u make it shut up when it goes on a wrong tangent
Avatar
Avatar
Assa
they are in the editor? Whats the difference if they are rendering the same????
I assume the tune numbers are not really useful to see ingame. You'd just have a bunch of numbers everywhere for the whole tune zone without any explanation what they mean unless you look in the editor or in debug HUD to figure out the settings of each tune zone. See #6134 which is about displaying the actual tune settings for tune zones.
Avatar
It's kinda annoying when there's a tune zone and you don't know what it does. I think we could render the tune settings when using entities mode in a not too annoying way rather than ha...
Avatar
Avatar
Solly
TextRender()->SetFontPreset(EFontPreset::ICON_FONT); // create text container, or just draw text TextRender()->SetFontPreset(EFontPreset::DEFAULT_FONT);
how can i add custom font? i added to /fonts and to index.json
Avatar
Avatar
nankudo
how can i add custom font? i added to /fonts and to index.json
ah im not sure, if you just want to be able to change font globally tclient does that
15:26
look for references to EFontPreset::ICON_FONT maybe you can add it there
Avatar
Avatar
Robyt3
I assume the tune numbers are not really useful to see ingame. You'd just have a bunch of numbers everywhere for the whole tune zone without any explanation what they mean unless you look in the editor or in debug HUD to figure out the settings of each tune zone. See #6134 which is about displaying the actual tune settings for tune zones.
I see that as well and I agree, that they'd be useless
15:59
I also have the opinion, that the switch numbers are useless
15:59
I don't even know what they do
15:59
(ingame)
16:01
When i am working on the speedtile color shader, maybe we could do a tune shader as well, but not with a gradient, so that different tune zones have different colors
16:01
but one after the other, I am already working on too many things 😄
Avatar
Avatar
Solly
Click to see attachment 🖼️
more like link error given it's only .o files
Avatar
@kebs I managed to decouple text_entities for ingame and editor fully 🥳 Thank you @Jupstar ✪ for leading me to the right place, the rendering logic is partly a bit tideous
🥳 1
Avatar
Avatar
Assa
@kebs I managed to decouple text_entities for ingame and editor fully 🥳 Thank you @Jupstar ✪ for leading me to the right place, the rendering logic is partly a bit tideous
Jupstar ✪ 2025-02-27 16:14
partly? it sucks xDD
Avatar
I just didn't want to shit too much on it xD
Avatar
It's a decade old spaghetti
Avatar
still better, then the old speedtile code 😠
Avatar
The old tile code in general is extremely sad
Avatar
Zerol Acqua 2025-02-27 16:18
can anyone look into #9762, i think its a bug
Avatar
If you draw unused tiles in tele/speedup/switch/tune layer, they will be replaced by 0 after reloading, in this video, you can see the direction, force and max speed (i forgot to set in video) of s...
Avatar
Avatar
Robyt3
I assume the tune numbers are not really useful to see ingame. You'd just have a bunch of numbers everywhere for the whole tune zone without any explanation what they mean unless you look in the editor or in debug HUD to figure out the settings of each tune zone. See #6134 which is about displaying the actual tune settings for tune zones.
since I am working on activating/deactivating this for each physics type anyway, should we may add it and make it off by default? Maybe interesting for debugging mappers
16:34
I think this is out of scope, I would have to change code I am not yet understanding, wtf is TileLayerCounter
Avatar
Jupstar ✪ 2025-02-27 16:35
It counts tile layers
Avatar
hmm wait
16:41
so for tune we would need to
  • add a new layer TileLayerCounter
  • make sure to offset the old layer by -1
  • add logic to set Index for RenderTileLayer to the tune zone ID
  • hope that render magic does it's thing
Gotcha
(edited)
Avatar
Avatar
Chairn
more like link error given it's only .o files
oh yeah mb
Avatar
GitHub BOT 2025-02-27 17:33
2e1769e Update ukrainian.txt - Veydzher e32f20c Merge pull request #9775 from Veydzher/master - def-
Avatar
In computer programming jargon, a heisenbug is a software bug that seems to disappear or alter its behavior when one attempts to study it. The term is a pun on the name of Werner Heisenberg, the physicist who first asserted the observer effect of quantum mechanics, which states that the act of observing a system inevitably alters its state. In e...
17:54
who doesnt love these?
17:57
A single-event upset (SEU), also known as a single-event error (SEE), is a change of state caused by one single ionizing particle (e.g. ions, electrons, photons) striking a sensitive node in a live micro-electronic device, such as in a microprocessor, semiconductor memory, or power transistors. The state change is a result of the free charge cre...
Avatar
Worst thing I ever had to debug was a heisenbug occuring on different thread timings if the order of operations was a bit scuffed ...
Avatar
can sb. help me with #9767 ? The tune layer renders arrows, because I am probably missing a TextureSet or something similar somewhere. This works in editor, which means that the error must be somewhere here: https://github.com/ddnet/ddnet/pull/9767/files#diff-3139c99b7ed3b99518d6b597a2652b49938ec31306d96dbe8e92bba913d4da2aR1810 But I don't see what's wrong. I use GetOverlayCenter like teleporters do
Avatar
Currently you can either turn text entities on or off. This PR allows to do this for speedtiles (only text, arrows stay) teleports switches tune zones (new feature) the editor (all or none) ...
Avatar
Avatar
Assa
can sb. help me with #9767 ? The tune layer renders arrows, because I am probably missing a TextureSet or something similar somewhere. This works in editor, which means that the error must be somewhere here: https://github.com/ddnet/ddnet/pull/9767/files#diff-3139c99b7ed3b99518d6b597a2652b49938ec31306d96dbe8e92bba913d4da2aR1810 But I don't see what's wrong. I use GetOverlayCenter like teleporters do
This adds OVERLAYRENDERFLAG_TEXT but it's never passed as an argument
Avatar
OVERLAYRENDERFLAG_TEXT maybe should be a bool
18:24
I call the function with it, it's just g_Config.m_ClTextEntitiesTune which is either 0 or 1
18:24
I am talking about the bottom part btw, where I use RenderTileLayer
Avatar
GitHub BOT 2025-02-27 18:30
Previously, rcon keys could be added with usernames longer than 63 non-null characters, which would be truncated and could not be used. Use same maximum length for the rcon username on the client side as on the server side, to allow authenticating with usernames of the maximum length.

Checklist

  • [X] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (espe...
Avatar
with opengl 1.0 this works btw (like in the editor because tile buffering) (edited)
Avatar
That should at least mean you only have to look at branches where IsTileBufferingEnabled() return true
Avatar
Which is the branch that calls RenderTileLayer for everything
18:52
I always get the arrows in the tune layer, no matter what I configure with ClTextEntities*
Avatar
I found out, that I can reproduce this bug only on one map, which I probably destroyed 😦
Avatar
Avatar
Assa
I found out, that I can reproduce this bug only on one map, which I probably destroyed 😦
"kein backup kein mitleid" xddd
Avatar
backups existieren
Avatar
Avatar
Assa
backups existieren
nice
Avatar
I don't get it I completly destroyed the rendering
19:28
Avatar
asking for a review of #9763 (speedboost limiting)
Avatar
As discussed in #9670, speedtiles can give so much speed, that they actually slow you down again (with ramp values). This PR introduces the speed_boost_max_speed tuning parameter, at which the spee...
Avatar
Avatar
Assa
I don't get it I completly destroyed the rendering
Btw if you place too many old speeders they disappear
❓ 2
Avatar
@Assa this also affects the y velocity even tho that is not affected by the ramp right?
Avatar
GitHub BOT 2025-02-27 20:08
c94e320 Add error message to auth_add/auth_add_p when username too long - Robyt3 4d0203a Increase length of rcon username to 64 bytes on client side - Robyt3 b513488 Merge pull request #9776 from Robyt3/Server-Client-Auth-Ident-Length-Fixes - def-
Avatar
Avatar
Assa
asking for a review of #9763 (speedboost limiting)
I'm a little unconvinced this should be a tune, could you justify why you think that should be the case?
20:12
Do you think there is some other creative use for this tune? (edited)
Avatar
should it be possible to have only your own namepalte shown
20:12
doing this is very easy with bitwise magic, not so if i have to exclude "own"
heartw 1
Avatar
Avatar
Assa
asking for a review of #9763 (speedboost limiting)
ah right why should this be specific to speed boosts and not a global speed limit?
Avatar
Avatar
Teero
ah right why should this be specific to speed boosts and not a global speed limit?
I don't understand the question. Adding a global speed limit would be breaking probably all maps
Avatar
Avatar
Assa
I don't understand the question. Adding a global speed limit would be breaking probably all maps
The tune
Avatar
Avatar
Learath2
I'm a little unconvinced this should be a tune, could you justify why you think that should be the case?
I can also put these in a comment, I just asked here since you are online and there might be something I'm missing that you can clarify quickly
Avatar
because this value depends on velramp, why should this be NOT a tune?
20:14
do you want this to be a constexpr instead?
Avatar
Well there is a single correct value for this at any given combination of velramp values. Unless you think there are other uses for it, it probably should be calculated
Avatar
This is a very good question. If you find a good form to calculate it immediately go ahead
Avatar
I would make it only active for the x velocity and make it a toggle. It should auto calculate the correct max speed
Avatar
Wolfram|Alpha brings expert-level knowledge and capabilities to the broadest possible range of people—spanning all professions and education levels.
20:18
where 1.4 is velramp curvature, 50 is tickspeed, 550 is velramp start and 2000 is that other velramp value
Avatar
Well it should be trivial, no? The first derivative is trivial to find roots for
20:20
It should be x = 2000/(50 log(1.4))
20:21
So x = othervelrampvalue/(tick_speed * log(curvature)) (edited)
Avatar
to be nitpicky, ln 😛 (edited)
Avatar
No, natural log, loge
Avatar
okay, I'll update the code and remove the tuning value
Avatar
I think that's better if there is no use for it otherwise
Avatar
the other use for it is to turn it off
20:23
I know it's debatable if we want that or not, since we have that functionality with the old speedtiles (unlimited uncapped)
Avatar
Avatar
Assa
okay, I'll update the code and remove the tuning value
There is one concern I guess, you'll need to make sure you recalculate it everywhere a velramp tune change happens
Avatar
yes, you'd need to recalculate it on every tick (edited)
Avatar
on every tick? really?
20:24
othervelrampvalue, tick_speed and curvature don't change every tick, do they?
Avatar
usually not, they change when you change the tune zone or an admin enters a tune command
20:26
you see where this is going?
Avatar
So I'd expect it to be recalculated when one of those things happen
Avatar
Avatar
Learath2
So x = othervelrampvalue/(tick_speed * log(curvature)) (edited)
is that calculation really that expensive, because it's just one line. For other things we would need to add way more logic
Avatar
To be fair good point, I actually don't know, just do it every tick see if there is perceptible performance degradation
20:30
I imagine std::log isn't too optimized, but we can replace that with some approximate log if needed, a taylor series approximation should be pretty accurate and cheap if needed
20:30
We don't need it extremely precise anyway
Avatar
this can probably be branch optimized as well by the cpu, and if you compare the new speedtile code with the old one, don't complain about complexity or performance xDDD
Avatar
I'm fairly sure it's not cheap enough to do per speedtile though
Avatar
bre this is going to be called once per tick per player right?
20:32
Compared to all the other shit in the DDNet codebase that is allowed this doesn't take any performance xdd
Avatar
Avatar
Teero
bre this is going to be called once per tick per player right?
Yeah, I'd imagine so, probably still fine and if it shows up in a profile an approximation is a way to optimize it out
Avatar
Avatar
Learath2
Yeah, I'd imagine so, probably still fine and if it shows up in a profile an approximation is a way to optimize it out
Have you ever looked at any of the collision functions?
20:32
This won't even show up on any profiler...
Avatar
in python i could just add a @cached for lookup xD
20:33
would still be slower, because python (edited)
Avatar
Avatar
Assa
in python i could just add a @cached for lookup xD
Honestly if std::log is more optimized than I think, a cache-miss would instantly make it slower, so caching is not the best idea
Avatar
Avatar
Learath2
So x = othervelrampvalue/(tick_speed * log(curvature)) (edited)
also what do we do if we play with values and get a negative log or devide by 0?
Avatar
Avatar
Assa
also what do we do if we play with values and get a negative log or devide by 0?
Can you even set the curvature negative for the velramp?
Avatar
curvature just needs to be 1, because log(1) = 0? (Can't remember if this is true for ln)
Avatar
divide by zero is only possible with the curvature at 1, but then the velramp becomes just a straight line towards infinity
20:41
I guess then the max is indeed infinite, idk what even happens when you set these things, does the game still work? 😄
Avatar
setting curvature 1.0 would be the perfect fix for ddnet 2, so we don't need to do this at all (edited)
Avatar
With curvature 1 I think there is no drag at all, you just keep going faster and faster as you rocket 😄
20:43
Anyway, I actually don't know what to do with the degenerate cases which happen for curvature <= 0
Avatar
Do you think it's own tuning value is maybe a bit better in this case? 😄
Avatar
no just clamp it? xd
Avatar
curvature <= 1 actually, the values between 0 and 1 are also funky, you get exponentially faster as you go faster
20:46
I think clamping is a good option
Avatar
Yeah, I'd say find a minimum that is still sane and don't allow anything below it
20:47
like 1.1 or sth a little closer to 1
Avatar
what if tickspeed is 0? /s
Avatar
Oh I guess you could just clamp it for this calculation only, that'd only add an arbitrary limit to the speed tiles operating at extremely bizarre curvature values
Avatar
Avatar
Assa
what if tickspeed is 0? /s
The function won't be called then.
Avatar
Avatar
Learath2
I imagine std::log isn't too optimized, but we can replace that with some approximate log if needed, a taylor series approximation should be pretty accurate and cheap if needed
you don't need that, log2 is really easy to compute and then just a multiplication
Avatar
Avatar
Learath2
So x = othervelrampvalue/(tick_speed * log(curvature)) (edited)
interesting that velramp start doesn't matter at all
21:29
should be probably max( formula above, velramp_start / 50)
21:34
@Learath2 @Teero this would be my next code for this: float MaxRampSpeed = GetTuning(m_TuneZone)->m_VelrampRange/(50 * log(maximum(GetTuning(m_TuneZone)->m_VelrampCurvature, 1.01f))); MaxSpeed = maximum(MaxRampSpeed, GetTuning(m_TuneZone)->m_VelrampStart / 50) * MaxSpeedScale;
Avatar
Avatar
Robyt3
dbg_asserts are always enabled
david loves Jellycar Worlds 2025-02-27 21:37
ok good that means thats safe.
Avatar
Avatar
Chairn
you don't need that, log2 is really easy to compute and then just a multiplication
Probably, I wouldn't really assert it without benching but sounds reasonable
Avatar
GitHub BOT 2025-02-27 22:27
a71a4c9 Add flags to button logic - KebsCS 9657db2 Merge pull request #9774 from KebsCS/pr-button-flag - Robyt3
22:30
Translations made by z0rba and Anthony (danishgoat29)

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 m...
🇩🇰 4
Exported 437 message(s)
Timezone: UTC+0