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-02 00:00:00Z and 2022-11-03 00:00:00Z
Avatar
Avatar
Voxel
Am I allowed to do something like this? Or, how do I manage 2 packets at once?
in that function you get one message. the type says which message it is
00:10
you can't cast the void * to messages other than the one that was specified by the type
Avatar
How even ARE the OnInit / OnRender / OnMessage things treated?
Avatar
Avatar
heinrich5991
you can't cast the void * to messages other than the one that was specified by the type
So would I need to add another if state for if(MsgType == NETMSGTYPE_SV_KILLMSGTEAMS) under the other one?
Avatar
yes, hat would work
Avatar
what does this mean when compiling lol (edited)
Avatar

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
BloodDrippn
what does this mean when compiling lol (edited)
u are missing some libs prob
07:18
apt install libgles-dev
07:18
actually just do sudo apt install build-essential cmake git glslang-tools google-mock libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev python spirv-tools
07:27
i want my ddnet-map-gen to not need to depend on the image files but instead include_bytes! it, this would help me boo
Avatar
I'm not at home rn, I assume you tested it? happy
Avatar
i ran cargo test
07:37
which i assume has tests loading stuff
Avatar
ah right it is tested by the madir format I think, but its not in the normal map parsing otherwise
07:38
*MapDir
Avatar
Avatar
Ryozuki
actually just do sudo apt install build-essential cmake git glslang-tools google-mock libavcodec-extra libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfreetype6-dev libglew-dev libnotify-dev libogg-dev libopus-dev libopusfile-dev libpng-dev libsdl2-dev libsqlite3-dev libssl-dev libvulkan-dev libwavpack-dev libx264-dev python spirv-tools
okay thanks
Avatar
updated my ddnet-map-gent tool
10:19
with binaries for windows users, in the future i may make a gui, and render it using twgpu
10:19
can make fly and maze maps for now
10:20
altho the fly map is pretty simple
Avatar
did u just sent smth written in go
10:20
justatest
10:20
fake ryo
Avatar
rendered pic using twgpu for the maze and fly map examples
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
xd
Avatar
Avatar
Ryozuki
rendered pic using twgpu for the maze and fly map examples
wow how big is that? 😄
Avatar
honestly spent more time making it a good cli app than improving the map gen algorithm
10:21
1000x1000
Avatar
ah insane 😄
Avatar
the render is a big weird tho xd
10:23
i may not need to make the gui myself
10:24
Automatically create GUI applications from clap3 apps
10:24
i use clap 4 tho
10:28
Also you can give it a seed
10:28
So u can recreate maps for seeds u find interesting
Avatar
now make it for gores
Avatar
Like minecraft BASED
10:28
Yeah that shouldnt be too hard
10:28
And i also wanna try ddnet parts
10:29
Wonder how far i can get
10:29
Then ill make a ddnet server, where everyday a new map is added
10:29
Infinite content
Avatar
Make it so if you finish the map you get teleported to the next map
Avatar
Oh lol
10:33
But what if other ppl are playing
Avatar
multi server support
Avatar
Avatar
Ryozuki
But what if other ppl are playing
It's impossible with the way we structure the code rn, but you can host multiple CGameWorlds in one server by selectively snapping. Or maybe add a new redirect message so the client gets redirected to the new server
11:05
I interviewed at a uni club to become a php coder. I feel nasty
11:05
U get a job at a club?
Avatar
Only applied because I want new friends
Avatar
Ah lol
11:06
Too bad they are php peasants
Avatar
Avatar
Ryozuki
U get a job at a club?
Special sort of club, you spend time, you get credits in exchange
11:06
Why is there no c club?
11:06
Or c++
Avatar
They get to give you credits in turn because they make stuff for the uni. They repair computers, make software
Avatar
Also isnt there a linux club
Avatar
No social clubs here. Very utilitarian form of clubs in polytechnics
11:07
But im sure a linux club would make interesting stuff
11:07
Well idk never been to one
11:08
They could make a personalized distro for the uni
11:08
Interesting project
Avatar
This club I applied to also helps with the sysadmin work. They are I guess the closest thing to a linux club
Avatar
I would legit found a rust club
Avatar
I have a circuit theory lecture in an hour. I'm extremely tired and starving. Do I head home and watch it remotely or do I suffer?
Avatar
And cultivate some followerw
11:09
And make the anti C convention BASED
Avatar
Avatar
Ryozuki
I would legit found a rust club
There was a go club for a brief while with a lot of girls for some reason
11:09
Women love Go
Avatar
"Delete unsafe C from the 🌍!"
11:09
uhh
11:10
Why go fuckyousnail
11:10
@Learath2 the few classes i took at a uni
11:10
There was just 3 girls
11:11
monkalaugh
11:11
Out of 150
Avatar
Avatar
Ryozuki
@Learath2 the few classes i took at a uni
It's like only 10% girls here. Polytechnics are just male dominated
Avatar
I also went to a polytechnic yeah
Avatar
But the Go club was closer to 50% for whatever reason
11:14
In my experience, its hard to find dedicated devs like in this chat irl
11:14
Maybe i havent had luck yet
11:14
Ppl simply dont do open source too lol
11:15
And windows..
Avatar
Avatar
Ryozuki
Ppl simply dont do open source too lol
Pretty rare indeed. Most people I met around here were more so lightly interested in programming and just did whatever their lectures cover
11:27
interesting read
11:27
the whole website itself has rly interesting stuff
11:28
Avatar
I thought 1st one would be faster. But as soon as he said 2nd is faster I understood where I went wrong
11:38
It's that the cache tag doesn't change with an increment of this size. So you keep getting cache misses 😄
11:48
damn
11:48
what a cheat sheet
Avatar
Popcnt is my fav instruction
11:54
@Learath2 can u do this without intrinsics?
11:54
i guess the compiler can optimize to this
Avatar
Avatar
Ryozuki
i guess the compiler can optimize to this
It can, but it doesnt really very reliably notice the pattern
Avatar
Since the vulkan loader drops support for useful extensions (or the extension loading process changed between 1.0 & 1.1, not sure) Which causes OBS not to work lets wait for a response in https://github.com/KhronosGroup/Vulkan-Loader/issues/1048 tho

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...
cerealspit 1
Avatar
Have you ever been asked the interview question “how do you count the number of bits set in an integer?”
Avatar
Avatar
Learath2
It can, but it doesnt really very reliably notice the pattern
it does if u know this quick simple trick
11:58
unsigned int count_set_bits(unsigned int x) { unsigned int ret; for(ret = 0; x; x &= (x - 1)) ret++; return ret; }
Avatar
Was just reading it. That's very cute
Avatar
Avatar
Ryozuki
@Learath2 can u do this without intrinsics?
__builtin_popcnt(x)
Avatar
Avatar
Learath2
I have a circuit theory lecture in an hour. I'm extremely tired and starving. Do I head home and watch it remotely or do I suffer?
what do you call circuit theory?
Avatar
Avatar
Chairn
what do you call circuit theory?
Study of ideal circuits analytically and numerically
Avatar
Thevenin equivalent?
Avatar
Stuff like nodal analysis, KVL/KCL, thevenin/norton
Avatar
Avatar
Chairn
__builtin_popcnt(x)
The 32-bit signed integer type.
Avatar
what's kvl/kcl?
Avatar
it doesn't say if it optimizes to intrinsic if available...
Avatar
Avatar
Chairn
what's kvl/kcl?
Kirchhoff's voltage and current law
Avatar
oh, nobody ever use acronym for those in France 😄
Avatar
Avatar
Chairn
it doesn't say if it optimizes to intrinsic if available...
it will
12:39
also the statement doesn't really make sense. you mean "if it optimizes to the assembly instruction if available"
Avatar
Honestly almost all of the class teeechnically boils down to applying KCL and KVL. The hard part is seeing the simplifications, you'll have to do like a dozen variable linear equation otherwise 😄
Avatar
yeah, you usually just solve a linear system, sometimes linear differential equation system (edited)
Avatar
Atleast the static part that is. It gets harder next week when we start RC and RL circuits and AC steady state the week after thar
Avatar
is matrix bot broken?
12:40
i get notification that instantly disappear
Avatar
Avatar
Chairn
is matrix bot broken?
It's probably spam
12:41
Yep, crypto scam spam
Avatar
pub fn popcnt(data: u128) -> u32 { data.count_ones() }
12:42
apparently the default x86_64 target doesn't have popcnt
Avatar
you need to have the correct cpu flag (edited)
Avatar
yea, see the above link
Avatar
how do i change optimization level? -O3 says error there
Avatar
--opt-level=3
Avatar
uh, compilation failed
12:46
error: Unrecognized option: 'opt-level' (edited)
Avatar
Chibuzor Bobbi BOT 2022-11-02 12:46:19Z
Hey 👋
Avatar
dammit, this guy is stubborn
Avatar
Did someone ping me
Avatar
ah nvm
12:48
@Chairn -C opt-level=3
👍 1
Avatar
Chibuzor Bobbi BOT 2022-11-02 12:51:52Z
Hello my name is Bobby you how are you doing
Avatar
can we kick this guy out of matrix?
Avatar
Stfu bobby
Avatar
We don't want to invest in crypto
Avatar
I invest in rust
12:52
bluekitty
Avatar
People still think it's crazy to invest in cryptocurrencies Do you know what is really crazy? Invest in cryptocurrencies
Avatar
@Anime.pdf nice pfp
12:53
Sticker
Avatar
troll emoji
Avatar
Avatar
Ryozuki
@Anime.pdf nice pfp
I wrote one rust program, now i can legally set ferris on my pfp
12:54
Spread the knowledge
12:54
Avatar
Lol nice one
Avatar
Avatar
GitHub
Click to see attachment 🖼️
#6000 btw 😮
Avatar
Since the vulkan loader drops support for useful extensions (or the extension loading process changed between 1.0 & 1.1, not sure) Which causes OBS not to work lets wait for a response in https...
Avatar
Poggers
Avatar
There should be a big party with live music, expensive food and casino when we hit #10000
Avatar
Im reading that website more and more
14:13
You rly can go down a rabbit hole to optimize stuff
14:13
Software prefetching looks cool but hard to know when to use
Avatar
so we can optimize ddnet even further?
14:20
@Voxel it can always be done
14:20
Thing is, optimizing code is one of the hardest things a programmer can do
14:20
iirc
Avatar
another interesting web https://www.agner.org/optimize/
Software optimization manuals for C++ and assembly code. Intel and AMD x86 microprocessors. Windows, Linux, BSD, Mac OS X. 16, 32 and 64 bit systems. Detailed descriptions of microarchitectures.
Avatar
Avatar
Voxel
so we can optimize ddnet even further?
there is still lot of potential if we'd use vulkan better 😄 could eliminate most useless memcpys that happen in the frontend
Avatar
itd be funny when we finally rls a optimization update and now the game runs like 5x faster
14:27
or smth
Avatar
vulkan did 2.5x perf on desktop GPUs
14:27
isnt that a big step already xd
Avatar
Avatar
Jupstar ✪
vulkan did 2.5x perf on desktop GPUs
not for me xd
Avatar
Avatar
nori
not for me xd
desktop gpus
Avatar
Avatar
nori
not for me xd
but u a special case anyway xD
14:29
when do u finally try x11
14:29
come to the dark side
Avatar
i don 't wanna betray wayland
14:30
i'm using wayland only for 2.5 yrs
Avatar
This protocol is meant to be used by drivers to be able to hint to the compositor if and when it should employ asynchronous page flips for presentation....
14:31
but since i already tested it and had even more FPS i'm not in your weird situation 😄
14:32
there was a huge RADV perf improvement lately for cheap draw calls. maybe its the perfect usecase for integrated cards
Avatar
int gcd(int a, int b) { while (b) b ^= a ^= b ^= a %= b; return a; }
14:36
funny
Avatar
Btw, why you have .gitlab folder in github repo and there is no gitlab repo of it
Avatar
i bet 10 cents it was chillerdragon
Avatar
It was
Avatar
lmao
14:37
guess for his own repos
Avatar
I did some profiling recently and the result was that recvfrom was the main culprit (#1996), optimising anything else would probably not bring great returns
Avatar
clonning ddnet repo for mods are kinda issue, you can just download and upload it again, its kinda disturbing. You can make only one fork of repo, its not a solution, so maybe making ddnet a template repo a good idea, or maybe other repo with only stable vesions. I created repo like this on my own and its incredibly handy to use https://github.com/AnimeIdiots/ddnet-template/
DDraceNetwork, a free cooperative platformer game. Contribute to AnimeIdiots/ddnet-template development by creating an account on GitHub.
Avatar
Clone ddnet and create branches
14:45
Each branch is a mod
Avatar
for 64p server it would probs be worth to make the gamecore not doing O(n²) all the time also we use distance, instead of distance_squared (which COULD cause physic changes), but purely mathematically, isnt different
Avatar
Solved
Avatar
Avatar
Ryozuki
Clone ddnet and create branches
Avatar
@Anime.pdf someone already made a ddnet mod template
14:45
Search teefrake
14:45
Teeframe*
14:45
On github
Avatar
Skeleton for creating modifications on top of the latest DDNet version. Forked from https://github.com/ddnet/ddnet. - GitHub - teeframe/ddnet-skeleton: Skeleton for creating modifications on top of...
14:46
and rly good documented
14:46
here
14:46
yes that
14:46
the readme tells u more info
Avatar
when do we start with ddnet 2.0
Avatar
Avatar
Jupstar ✪
when do we start with ddnet 2.0
with nim? greenthing
Avatar
with bash
Avatar
i read few years ago in deen's blog about ddrace 2.0 on nim, couldnt find it anymore (maybe it wasnt deen's blog)
Avatar
i think rust would be more realistic
Avatar
but maybe in 20 years when we start there are better languages anyway
Avatar
carbon
14:50
troll
Avatar
maybe simply GPU side only 😉
Avatar
Carbon this
14:51
fuckyousnail
Avatar
in 200 years any word you say is a programming language
14:52
c the rusty carbon over there?
Avatar
Tee lang poggers2
Avatar
teeworlds emotes are a language too
Avatar
teeworlds chat is best ide
14:54
btw i saw Headshot's server, he recompiled it and applied changes right in game, you just lagged for few seconds
14:54
justatest
Avatar
yes
14:54
jet-live e.g. for linux
14:54
can do that
14:55
c++ hot code reload for linux and macos. Contribute to ddovod/jet-live development by creating an account on GitHub.
14:55
but for e.g. classes u need to write your own reload logic.. since it obviously cannot tell what the new class layout will change runtime wise
14:56
but for simply UI, physic changes u can use it 😄
14:56
basically everything that changes per frame
14:59
c++ stl smh
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
did he also test with lto + ofast + static c++
15:01
else its a lie
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
give me url
15:03
this guy knows a lot
Avatar
mhh godbolt + lto is struggle
15:08
i cannot read it
15:08
but without LTO, the asm is defs bit longer for std::min_element
15:08
Compiler Explorer is an interactive online compiler which shows the assembly output of compiled C++, Rust, Go (and many more) code.
15:08
cannot say what happens perf wise tho
Avatar
Hi, I'm planning to attend FOSDEM 2023 on the first Februar weekend (https://fosdem.org/2023/). Is anyone interested in meeting there? I'm also considering to submit a DDNet stand request (https://fosdem.org/2023/news/2022-09-26-stands-cfp/).
15:14
well its too early for me to know cuz i may change jobs soon but it would be cool to go
Avatar
cool link. don't have time to read it right now, I'll open a tab ^^
Avatar
Avatar
Ryozuki
int gcd(int a, int b) { while (b) b ^= a ^= b ^= a %= b; return a; }
is that even defined behavior?
Avatar
C++17 onwards yes
15:18
Iirc
Avatar
Avatar
Ryozuki
well its too early for me to know cuz i may change jobs soon but it would be cool to go
Nice, I'd be happy to meet you there 😁 Let's see how it goes.
Avatar
You can even write the body of the loop as this confusing one-liner — and it will even compile without causing undefined behavior warnings since C++17
Avatar
Avatar
Zwelf
Nice, I'd be happy to meet you there 😁 Let's see how it goes.
yeah
15:20
int gcd(int a, int b) { if (a == 0) return b; if (b == 0) return a; int az = __builtin_ctz(a); int bz = __builtin_ctz(b); int shift = std::min(az, bz); b >>= bz; while (a != 0) { a >>= az; int diff = b - a; az = __builtin_ctz(diff); b = std::min(a, b); a = std::abs(diff); } return b << shift; }
15:20
this is one of the fastest gcds
15:21
Brussels is close enough that looks cheap to travel xD (edited)
Avatar
Avatar
Anime.pdf
clonning ddnet repo for mods are kinda issue, you can just download and upload it again, its kinda disturbing. You can make only one fork of repo, its not a solution, so maybe making ddnet a template repo a good idea, or maybe other repo with only stable vesions. I created repo like this on my own and its incredibly handy to use https://github.com/AnimeIdiots/ddnet-template/
Skeleton for creating modifications on top of the latest DDNet version. Forked from https://github.com/ddnet/ddnet. - GitHub - teeframe/ddnet-skeleton: Skeleton for creating modifications on top of...
15:30
deen hasnt scrolled monkalaugh
Avatar
Yeah, too late 😄
Avatar
well, i didnt know of this, but still need to manually create repo, template will do everything for you 🥹
Avatar
Avatar
Zwelf
Hi, I'm planning to attend FOSDEM 2023 on the first Februar weekend (https://fosdem.org/2023/). Is anyone interested in meeting there? I'm also considering to submit a DDNet stand request (https://fosdem.org/2023/news/2022-09-26-stands-cfp/).
Would be interesting if a few people are interested in going. I'm not sure yet if I'll go
Avatar
Great to hear, lets see if more want to go 🙂
Avatar
I'm considering it
heartw 1
16:00
cargo install teemasterparser
Avatar
can you exclude the ddnet, kog servers?
Avatar
Notbyet
17:18
Yet
Avatar
365c484 Switch to Vulkan 1.1 - Jupeyy bffbc44 Merge #6000 - bors[bot]
Avatar
Yknow I wonder, What if we created an Enum or something to list all the font icon symbols we use, so it's more readable in the code (edited)
Avatar
@deen i wrote in the OBS discord for now, if they consider it a bug i'll also create an issue there
Avatar
Operating System Info Windows 10 Other OS Windows OBS Studio Version Other OBS Studio Version (Other) No response OBS Studio Log URL OBS Studio Crash Log URL No response Expected Behavior Recording...
18:45
valve engineers
18:45
top notch kekw
Avatar
nah, hackers are top notch
18:51
Oof*
Avatar
chillerdragon BOT 2022-11-02 21:07:19Z
Yo yopstar I wanna see you on fosdem
Avatar
wtf even is that
Avatar
doesnt sound very cool xD
21:23
8000hackers. and i dont use rust
Avatar
Avatar
Jupstar ✪
8000hackers. and i dont use rust
read the book quick
Avatar
i cant read
Avatar
Avatar
Learath2
😦
dont be sad, i just wait for godot 4
Avatar
yeah me too
Avatar
Avatar
Jupstar ✪
dont be sad, i just wait for godot 4
before you learn to read?
Avatar
Avatar
Mr.Gh0s7
yeah me too
have an project in mind?
Avatar
Avatar
Learath2
before you learn to read?
i dont need to read, i feel it
Avatar
kinda like 3d teeworlds I kinda started it in 3 but code is too messy so I am gonna continue it in 4
Avatar
nice
Avatar
I rqed at the networking stage xD but I had made a console start ui (not much tbh)
Avatar
is it hard? i actually was thinking about a multiplayer game, but it would defs require to be tick based. I dunno how hard it is with that engine
Avatar
Feel it in your bones
Avatar
1ecc0ad chore(Gitignore): add ignore all folders cmake-build-* for Clion - IntelligentQuantum d83cf0a Merge #5999 - bors[bot]
Avatar
Only way how you can fix bug in valve games as a community member: Step 1: Study programming Step 2: Get a job in Valve Step 3: Make update you wanted Step 4: Quit Ez
Avatar
If that would work. Why didn't somebody do that to port csgo to source engine 2 yet xd
Avatar
Avatar
Jupstar ✪
If that would work. Why didn't somebody do that to port csgo to source engine 2 yet xd
You need to cooperate and communicate with other double agents but you lose those abilities on step 1
Exported 324 message(s)