Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/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 2022-11-21 00:00:00Z and 2022-11-22 00:00:00Z
Avatar
@heinrich5991 i can't access demo's map using your libtw2, both from demo reader and demo writer
00:36
How feelsbadman
Avatar
it might not be implemented
Avatar
Looks like so saddo
Avatar
it seems the map is always at the same offset of the file
00:38
depending on the demo version
Avatar
Yep, and size is defined by header byte
Avatar
so you could get the size with the library (or yourself)
00:39
and then just read the map file from the offset until offset + length
00:39
for hte map
Avatar
Fair enough, just was trying to avoid doing something myself nouis
Avatar
(or you could try PRing the libtw2 repo to add support for map reading. it might be a little bit convoluted though)
Avatar
Avatar
heinrich5991
(or you could try PRing the libtw2 repo to add support for map reading. it might be a little bit convoluted though)
Sounds like a perfect variant but i can barely read ur code, not saying about writing something good myself, too nooby in rust feelsbadman
Avatar
sorry that I didn't write docs for it
00:44
in newer code, I try to add documentation 🙂
Avatar
Btw its kinda hard to use libtw2, maybe i didn't understand something about cargo, but i had to use smth like demo = { git="link to libtw2 repo" branch="master" } cuz just libtw2="0.0.0" quite didnt work
Avatar
that's correct. I didn't release it on crates.io because I didn't want to make stability guarantees :/
Avatar
2c993d0 A Koule 12, A Koule 13, A Koule 16 - ddnet-maps
Avatar
Avatar
Anime.pdf
Click to see attachment 🖼️
.pdf
08:00
ChillerDragon check out nushell
08:00
Actual shell with data types and structured data
Avatar
[quakenet] Ryozuki BOT 2022-11-21 10:54:11Z
day 3 of trying to match huffman bits
10:54
idk what im doing wrong
Avatar
Put prints after all steps and see where it differs
11:12
Log driven debugging for smaller algorithms is often quite helpful
Avatar
I think heinrich's teeworlds huffman implementation works, maybe compare with that if you'd rather have a rust reference
Avatar
[quakenet] Ryozuki BOT 2022-11-21 11:20:12Z
i copied kinda the cpp to rust 1on1
11:20
and i get a shift overflow panic on debug
11:21
does it overflow on cpp or im doing smth wrong
11:21
mathcing the behaviour doing a checked_shl and unwrap_or 0 gives wrong results
11:21
matching
11:23
i dont wanna copy his code
11:23
its ugly too
Avatar
[quakenet] Ryozuki BOT 2022-11-21 11:26:15Z
hmm changing the order of the sort makes it not overflow
11:26
but the bits dont match his table
11:26
is the table even accurate
11:29
im taking his table as a source of truth
11:29
but never checked it
11:32
the bad thing is tw huffman is huffman with quirks
11:34
or idk
11:34
i must suck
Avatar
I don't remember. I can take a look though if you are stuck
Avatar
[quakenet] Ryozuki BOT 2022-11-21 11:38:50Z
well i sent a gist
11:39
to see the bits it produces run cargo t -- --nocapture
11:39
updated it
11:40
the table in the appendix
11:42
actually u can try it here
11:42
since my code has no deps
11:42
100: is the eof symbol iirc
Avatar
'拏 MAhdiyar 2022-11-21 14:09:48Z
root@kinger:~/build# cmake .. CMake Error: The source directory "/root" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. What is error In terminal linux < cmake .. >
justatest 1
Avatar
I told you you need to first cd into the directory where you downloaded the source
Avatar
'拏 MAhdiyar 2022-11-21 14:33:46Z
root@kinger:~/build# cd /root root@kinger:~# mkdir build mkdir: cannot create directory ‘build’: File exists root@kinger:~# I did this now, now Mkdir won't work!
14:33
@Learath2
Avatar
don't be root either, you'll mess up things
Avatar
'拏 MAhdiyar 2022-11-21 14:35:09Z
No, I changed the file
14:35
root@kinger:~# cd /var/www/html/blocker-mod-src-master root@kinger:/var/www/html/blocker-mod-src-master# mkdir build root@kinger:/var/www/html/blocker-mod-src-master# cmake .. CMake Error: The source directory "/var/www/html" does not appear to contain CMakeLists.txt. - Specify --help for usage, or press the help button on the CMake GUI.- Now I received this error @Chairn@Learath2
Avatar
@'拏 MAhdiyar root bad
Avatar
Avatar
ReiTW
@'拏 MAhdiyar root bad
'拏 MAhdiyar 2022-11-21 14:44:56Z
I proceed to mkdir build, but when I try to run cmake, it gives an error
Avatar
You missed the cd build after the mkdir
Avatar
'拏 MAhdiyar 2022-11-21 14:47:59Z
mkdir: cannot create directory ‘build’: File exists
Avatar
You created it already, just cd
Avatar
'拏 MAhdiyar 2022-11-21 14:51:18Z
Yes, I am using cmake now, it gives me an error
14:51
CMake Error: The source directory "/var/www/html/blocker-mod-src-master" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
Avatar
[quakenet] Ryozuki BOT 2022-11-21 14:51:43Z
oof blockers
bluekitty 2
Avatar
'拏 MAhdiyar 2022-11-21 14:52:35Z
I haven't created CMakeLists.txt yet
troll 2
14:52
@Learath2
Avatar
Cmakelists is part of the source. You don't create it
Avatar
'拏 MAhdiyar 2022-11-21 14:53:28Z
So why does it give an error?
14:53
@Learath2
Avatar
Is there a cmakelists.txt?
Avatar
Avatar
Learath2
Is there a cmakelists.txt?
'拏 MAhdiyar 2022-11-21 14:54:26Z
in source folder?
Avatar
'拏 MAhdiyar 2022-11-21 14:55:14Z
No !
14:55
@Learath2
Avatar
Ok, this is an old mod without cmake. So you need to use bam
Avatar
'拏 MAhdiyar 2022-11-21 14:56:40Z
how to install bam? that ? apt install bam
Avatar
Bam is a fast and flexible build system. Bam uses Lua to describe the build process. It&#39;s takes its inspiration for the script files from scons. While scons focuses on being 100% correct wh...
14:56
You compile bam yourself too
Avatar
'拏 MAhdiyar 2022-11-21 14:57:00Z
i have
Avatar
Ok I don't remember how to use bam though. I think it's something like bam server-release
15:01
ChillerDragon: Aren't you biggest bam fan? Help the man
Avatar
Help the man build the bot client
Avatar
Avatar
Learath2
Ok I don't remember how to use bam though. I think it's something like bam server-release
yes it is
Avatar
Idea: Add a HUD warning for when player is in /pause looking away and action starts happening f.e (someone hammerhits him). This warning would be optional. Thoughts?
Avatar
'拏 MAhdiyar 2022-11-21 15:30:12Z
root@kinger:/var/www/html/blocker-mod-src-master/DDNet-16.1# cmake .. CMake Error: The source directory "/var/www/html/blocker-mod-src-master" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. I used a source that has cmak.. but it gives an error @Learath2
Avatar
@'拏 MAhdiyar what repo are you trying to build?
Avatar
Avatar
nouaa
@'拏 MAhdiyar what repo are you trying to build?
'拏 MAhdiyar 2022-11-21 15:33:09Z
Compile DDNet Source
Avatar
That's not ddnet though
15:33
Blocker mod src
Avatar
'拏 MAhdiyar 2022-11-21 15:33:43Z
No No
15:34
This is just a folder that I placed
15:34
@nouaa
Avatar
Avatar
'拏 MAhdiyar
root@kinger:/var/www/html/blocker-mod-src-master/DDNet-16.1# cmake .. CMake Error: The source directory "/var/www/html/blocker-mod-src-master" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. I used a source that has cmak.. but it gives an error @Learath2
Damn try "cmake CMakeLists.txt"
Avatar
Avatar
WarHammer
Damn try "cmake CMakeLists.txt"
'拏 MAhdiyar 2022-11-21 15:44:11Z
i used , errored 😐
Avatar
Create a directory next to the cmakelists. Cd into the directory. Do cmake .. then do make it's not even supposed to be difficult :/
Avatar
And it is written in readme.txt
15:46
nouis
Avatar
@Learath2 do assertions allow optimizations in c ?
16:19
In rust it allows some
16:21
Avatar
What flavour of assertions are we talking about? builtin_unreachable is optimized around by both gcc and clang
16:23
So if your assert failures do resolve to a call to unreachable, you will get optimizations
16:24
The teeworlds kind where we just dbg_break as far as I know can't be optimized around
16:26
(I'd guess rust relies on the exact same mechanism and lets LLVM handle these)
16:27
Assert macro in rust is like a if check and a panic
16:27
So llvm optimizes that cuz the if condition
Avatar
One thing I don't remember is if LTO can handle these nowadays. E.g. I pass an assert that an array is of length n, then I pass it to a library which asserts on it aswell. Do we get to elide that idk
Avatar
'拏 MAhdiyar 2022-11-21 16:37:28Z
[ 43%] Building CXX object CMakeFiles/DDNet.dir/src/game/generated/checksum.cpp.o [ 43%] Linking CXX executable DDNet [ 85%] Built target DDNet [ 85%] Linking CXX executable DDNet-Server [100%] Built target DDNet-Server Completed Where is DDNet-server.exe?
Avatar
probably out/build
16:37
or build/
Avatar
Or in directory where you started make command (edited)
Avatar
'拏 MAhdiyar 2022-11-21 16:38:51Z
It is empty
Avatar
Show us
16:39
Directory
Avatar
'拏 MAhdiyar 2022-11-21 16:41:48Z
16:42
[ 0%] Built target json [ 1%] Built target steam_api [ 1%] Built target mastersrv-shared [ 24%] Built target pnglite [ 24%] Built target engine-shared [ 29%] Built target game-shared [ 30%] Built target config_retrieve [ 31%] Built target config_store [ 32%] Built target dummy_map [ 34%] Built target map_optimize [ 35%] Built target unicode_confusables [ 36%] Built target dilate [ 36%] Built target crapnet [ 37%] Built target uuid [ 39%] Built target fake_server [ 40%] Built target map_convert_07 [ 40%] Built target map_extract [ 40%] Built target map_resave [ 41%] Built target map_diff [ 42%] Built target map_replace_image [ 84%] Built target DDNet [ 84%] Built target packetgen [100%] Built target DDNet-Server
Avatar
What commands did you run and what is ur OS
16:44
I mean OS where you are building it
Avatar
'拏 MAhdiyar 2022-11-21 16:44:31Z
Linux / ubuntu cd /var/www/html/blocker-mod-src-master/DDNet-16.1 mkdir build cmake .. make -j8
Avatar
You forgot cd build
Avatar
Avatar
Anime.pdf
I mean OS where you are building it
'拏 MAhdiyar 2022-11-21 16:44:48Z
Linux
Avatar
After mkdir
Avatar
'拏 MAhdiyar 2022-11-21 16:45:00Z
try again ?
Avatar
'拏 MAhdiyar 2022-11-21 16:45:07Z
Ok
16:47
i started compile for again
Avatar
Wait wtf is inside blocker-mod-src and DDNet-16.1
16:47
Can you screenshot them too? (edited)
Avatar
'拏 MAhdiyar 2022-11-21 16:48:13Z
Sure
16:48
Avatar
I mean directories
Avatar
'拏 MAhdiyar 2022-11-21 16:48:55Z
100%
16:49
16:49
This is now complete
Avatar
That file DDNet-Server on the right there is the executable
16:49
On linux executables don't have a special file extension like .exe
Avatar
Your project structure is weird tho justatest
Avatar
Avatar
Learath2
That file DDNet-Server on the right there is the executable
'拏 MAhdiyar 2022-11-21 16:50:39Z
Yes
Avatar
Avatar
Anime.pdf
Your project structure is weird tho justatest
'拏 MAhdiyar 2022-11-21 16:50:46Z
xD
16:52
Is this project right for Linux? @Learath2
Avatar
Avatar
'拏 MAhdiyar
Is this project right for Linux? @Learath2
You built it from linux, so yes, its for linux
Avatar
Avatar
Anime.pdf
You built it from linux, so yes, its for linux
'拏 MAhdiyar 2022-11-21 16:55:33Z
that's good
16:55
Thanks for helping @Anime.pdf @Learath2 @nouaa 🌹
Avatar
? Why do I bounce more when i open chat but when I dont there is not a bounce at all? XD
Avatar
that doesnt make any sense at all
Avatar
new technique dropped poggers2
Avatar
Yesterday it worked perfectly fine? Weak and strong didnt change
Avatar
That is bizarre wtf
Avatar
Perhaps stop botting?
Avatar
chillerdragon BOT 2022-11-21 17:28:12Z
Nice but the thing I like about bash is that it is usually preinstalled so that’s kinda a dealbreaker for me (@Ryozuki)
ChillerDragon check out nushell
Avatar
@noby
Avatar
'拏 MAhdiyar 2022-11-21 17:58:08Z
I want to run DDNet-Server but it doesn't have format! @Anime.pdf
Avatar
which format
Avatar
'拏 MAhdiyar 2022-11-21 17:59:26Z
I click on DDNet-Server but it doesn't open
17:59
@Anime.pdf
Avatar
@heinrich5991 what is a InputDiffWithoutNew?
Avatar
Avatar
Brokecdx-
? Why do I bounce more when i open chat but when I dont there is not a bounce at all? XD
i bet it's server handling input differently when chat is open
Avatar
I've found something a little too unreasonably annoying in gentoo. Container stuff is a little too underbaked
Avatar
Avatar
'拏 MAhdiyar
I click on DDNet-Server but it doesn't open
Xd
21:06
Linux
21:07
./DDNet-Server
21:07
if it give an error
21:07
Try "chmod +x *"
Avatar
Avatar
'拏 MAhdiyar
100%
What a hell bro
21:09
61°
Avatar
Avatar
Learath2
I've found something a little too unreasonably annoying in gentoo. Container stuff is a little too underbaked
why
Avatar
It doesn't have something like containers/common to bring in all the config file examples and docs and stuff, so each container system is left to install their own, which makes it pretty annoying
Avatar
what would be the least spaghetti way to access entities such as shields inside CGameTeams?
🍝 5
Avatar
Avatar
WarHammer
61°
its fahrenheit
Avatar
Avatar
Ravie
what would be the least spaghetti way to access entities such as shields inside CGameTeams?
with carbonara
Avatar
with fork (spoon not recommended) (edited)
Avatar
Avatar
Ravie
what would be the least spaghetti way to access entities such as shields inside CGameTeams?
dunno is there no other way, e.g. in a higher level component? else just access it over the whatever provides u these entities xd
Avatar
Avatar
Ravie
what would be the least spaghetti way to access entities such as shields inside CGameTeams?
What sort of access do you want to other entities?
Avatar
Avatar
Ravie
what would be the least spaghetti way to access entities such as shields inside CGameTeams?
what do you try to do? shields seem like gameplay, and CGameTeams manage the teams. I'd guess you should rather approach it from the shields
21:30
if it's gameplay
Avatar
I'm implementing a kind of pickup that needs to get reset when a team goes empty
Avatar
register from the pickup into the team that it should notify u as soon as it is empty
Avatar
or create a new method on entities that is called when a new team is created
Avatar
that sounds reasonable
Avatar
I think the second one makes a little more sense given the structure we have
21:33
A virtual method on CEntity that is overridden by your new entity
Avatar
Avatar
heinrich5991
or create a new method on entities that is called when a new team is created
wouldn't I still need access to entities from CGameTeams for this?
Avatar
you could also create a proxy method on whatever you have, gamecontroller, gamecontext, gameworld
Avatar
why does the entity even need to exist before the team was created how are we handling it with smth like doors?
Avatar
those unfortunately all exist before the team is created
Avatar
We have sth like ResetRoundsomething
21:35
That goes and resets all switches
Avatar
well i guess thats the spot to add it then isnt it
21:36
or create a new logic that is better designed xd
21:36
once u touched server code u doomed anyway
21:37
after 2 years someone will ping u and tell ya u changed physics
Avatar
Yes, in there you'd do something like for(auto &e : GameServer()->GameWorld()->Entities() e->OnTeamReset();
21:37
I don't even know if we expose Entities outside of the gameworld though
21:38
Which might be one more thing you have to add
21:38
One more restart, fingers crossed I didn't miss any other kernel configuration requirements that are written nowhere
Avatar
Avatar
Learath2
@heinrich5991 what is a InputDiffWithoutNew?
@heinrich5991 seems I can't even teehistorian_dump any file, did we change something?
Avatar
teehistorian died and nobody noticed?
21:40
where do you find InputDiffWithoutNew?
21:41
(only access to web interface rn)
Avatar
Avatar
heinrich5991
where do you find InputDiffWithoutNew?
Step 1) Take any(?) (newish maybe?) teehistorian file from the archive Step 2) Run teehistorian_dump on it
Avatar
ah
21:43
sounds like something that Zwelf might have changed
Avatar
I only tested, 5 files, 1 was truncated improperly, I thought that was the issue, but it happened on any other random teehistorian file on ger2 aswell
Avatar
Avatar
Learath2
Yes, in there you'd do something like for(auto &e : GameServer()->GameWorld()->Entities() e->OnTeamReset();
oh I see CGameContext has a public m_World, somehow I missed that, I guess I was looking more for a getter function like everything else has
Avatar
Avatar
Learath2
I only tested, 5 files, 1 was truncated improperly, I thought that was the issue, but it happened on any other random teehistorian file on ger2 aswell
yea, seems like something that Zwelf might have changed
21:48
it's when we get a an InputDiff without a preceding InputNew, or a InputNew after having already received an InputNew
21:55
seems like libtw2 needs an update
Avatar
where is libtw1
Avatar
it's teeworlds 🙂
Avatar
where is learath1
21:56
so many questions xd
Avatar
where's heinrich5990
21:58
I probably shouldn't get started on this ^^
Avatar
Ryozuki
22:03
meh
22:04
Ryozuki0 are you there
Avatar
ryozuki is simply already perfect
22:06
it doesnt need versioning
22:07
who gives heinrich discord nitro so he can change his tag number to 1995
Avatar
please donate to DDNet instead
Avatar
so you can abuse doc comments in rust to have any syntax u want use bash_to_rust::btr; fn main() { btr!( /** echo "hi_chillerdragon" # */ # if u need */ line has to start with /// /// whatever bash s/*/ /** ls -l */ ); } pretty funny. so u can basically implement any language directly inside rust macros does it also have a mode where it gives u all tokens unparsed?
22:14
so basically the text as string xd
22:14
anyway i'd say u can claim that u know rust now chillerdragon xd
22:14
just write bash
Avatar
I absolutely hate whatever demon company is behind docker
22:15
They seem to have arbitrarily decided that to pull some PUBLIC images, created by open source developers, for their software, requires a log in, not all but some images
22:19
This corporate tinge to the entire containers thing gives me nausea
Avatar
podman pog
Avatar
podman relies on the same disgusting backends
22:21
i think
22:21
u can disable a repo
22:21
i had the same as u
22:21
with the login
22:21
but i removed a redirect
22:22
it has
22:22
on the default config
22:22
and just use the google repo
22:22
or smth
22:22
i dont remember
22:22
default config is dumb
Avatar
google repo is also shit pepeW
22:23
gentoo installing podmans testing registries.conf is also stupid
22:24
@Learath2 and u know what they block by default?
22:24
the hello world container
22:24
i was like
22:24
wtf is going on
22:24
and i had to edit the config xd
Avatar
I honestly got brain damage from installing this stuff
Avatar
ye containers suck
22:24
use nixos
22:24
for servers
Avatar
Literally made by silicon valley, for silicon valley
22:26
pog
22:26
agdq schedule
22:26
7:13 PM Terraria Haboo 0:15:00 1:50:00 Moon Lord no major abuses — PC
22:26
i need to watch this
Avatar
Dude it's in like 2 months xd
22:27
I only like races. Competitive best
Avatar
The arch default registries.conf is also pretty unhelpful but atleast it's not completely wrong
Avatar
What are u even trying the whole day to encounter such situations
Avatar
Avatar
Jupstar ✪
I only like races. Competitive best
speedruns are competitive
Avatar
Avatar
Ryozuki
speedruns are competitive
Yeah but it's more fun live
Avatar
the speedrun is live
22:30
in agdq
Avatar
Bro
22:30
U know what i mean
22:30
im confused
Avatar
I like when 4p play there
Avatar
Against each other
Avatar
i dislike those the most
22:30
xd
22:31
unless
22:31
its tetris
22:31
but they dont do that anymore
Avatar
Lol
Avatar
Avatar
Jupstar ✪
What are u even trying the whole day to encounter such situations
me?
Avatar
Avatar
Learath2
me?
Yes
Avatar
I'm literally doing the tamest docker task, trying to compose a mariadb nginx php stack
Avatar
that sounds like not the tamest thing
22:41
it's running more than one container
Avatar
It fails on running the first single container, dw
Avatar
ah
Avatar
Discord mapping 79 entire gigabytes of address space is quite funny 😛
Avatar
haskell maps 1 TiB by default, I think
Avatar
ASAN maps 20TB 😄
23:04
i think most java stuff also maps around 100GB
Avatar
I wonder what they do with it in discord. ASan uses it as a very clever trick
Avatar
Avatar
heinrich5991
seems like libtw2 needs an update
@heinrich5991 is the update simple at all? I need to review a file soon-ish
Avatar
yes, update is simple
23:34
probably
23:34
can do it later
23:35
basically just patch out the check, I think
Avatar
does anyone know an ipv4 range that would basically allow anyone to join? its for a tw server
Avatar
0.0.0.0-255.255.255.255
Exported 313 message(s)