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 2023-01-31 00:00:00Z and 2023-02-01 00:00:00Z
Avatar
(Sorry for the meme; also this is obligatory.) I think we should transition to Rust and aim to have it done by the next major release: Nobody really likes C++ or CMake, and there's no clear pa...
10:00
gigachad ngl
Avatar
Lol is the project so small?^^
Avatar
it didnt port all at once
10:06
This should be thought of as a "port" instead of a "rewrite" because we would not start from scratch; instead we would translate C++ to Rust, incrementally, module by module, in the span of one release. We'll use an FFI so the Rust and C++ bits can talk to each other until C++ is gone, and tests and CI keep passing at every commit.
>
To prove it can work, in this PR I've ported FLOG, topic monitor, wgetopt, builtin_wait, and some others to Rust. The Rust bits live in a crate that lives inside the C++ and links with it. You can just build it the usual way:
10:07
the plan xd
Avatar
Avatar
Ryozuki
it didnt port all at once
I just don't understand wtf his plan is
Avatar
Avatar
Jupstar ✪
I just don't understand wtf his plan is
to port fish to rust
Avatar
He wants it in one release but goes over cpp bindings
Avatar
he didnt say he wants it in one release tho?
Avatar
Why not complete rewrite xd
10:08
The pr says it
Avatar
Ah he means major release
10:10
This should be thought of as a "port" instead of a "rewrite" because we would not start from scratch; instead we would translate C++ to Rust, incrementally, module by module, in the span of one release. We'll use an FFI so the Rust and C++ bits can talk to each other until C++ is gone, and tests and CI keep passing at every commit.
10:10
Was confused by the"span of one release" part
Avatar
@heinrich5991 did u consider https://github.com/corrosion-rs/corrosion when adding rust to ddnet?
Marrying Rust and CMake - Easy Rust and C/C++ Integration! - GitHub - corrosion-rs/corrosion: Marrying Rust and CMake - Easy Rust and C/C++ Integration!
10:12
@Jupstar ✪
10:12
crab wins fish
Avatar
Or crab killed fish
Avatar
Why even a crab
10:13
I like that anime girl more
10:13
@Jupstar ✪ also the anime girl as details
10:13
the ampersan as a pin
10:14
its hilarious
10:14
&
10:14
10:14
kek
10:14
where is c++ chan
10:15
10:15
found her
Avatar
Is that the granny from Kiki's delivery service Then she is cool xd (edited)
Avatar
Avatar
Jupstar ✪
Is that the granny from Kiki's delivery service Then she is cool xd (edited)
No thats the howlings (?) moving castle (edited)
10:39
kikis delivery service is the girl riding a broom i think (edited)
10:39
And that kid doesnt get old
Avatar
Avatar
default
kikis delivery service is the girl riding a broom i think (edited)
But there is a granny in the show xd
10:45
That wants to fly with the broom
10:45
But yeah it's different xd
Avatar
Yea I know all Ghibli movies
Avatar
Users are reporting issues on our map since Vulkan been made default on DDNet clients. !renderer-bug The problem arises only on enveloped quads with RGBA EnvPoints values greater than 1, and only in game, not in the editor. Clapping all env points to 1 doesn't completely fix the issue, as Quad Color * Env Color with EnvColor > 1 doesn't necessarly produce a capped 255 value, thus every...
Avatar
Avatar
GitHub
Click to see attachment 🖼️
@Jupstar ✪ who should i ask for the fix?
Avatar
Avatar
f
@Jupstar ✪ who should i ask for the fix?
Puppet#0463
11:29
I dunno if he already did it, but we talked about it in pm (edited)
Avatar
Avatar
Jupstar ✪
Puppet#0463
xD
11:32
i see
11:32
he sent me here
11:32
hahahaha
11:32
i guess i'll have to code the tool then
Avatar
Oh. You can still ask patiga. He is good with his tool and just clamping env points to 1 sounds ez
11:36
If you ask kindly he might do it^^
Avatar
clamp is ez i could also manage to do it manually
11:36
but quads should be fixed too
11:37
its not enough to reduce the value on the env
11:37
quads are too many..... a script is needed (edited)
Avatar
Oh it's not enough? I assume it clamps the quad color itself then?
Avatar
the final result wont be the same
11:38
we tried...
11:38
its because of the multiplication
11:38
if the final result is less than 255
11:38
its not you can reduce only the env value
11:38
the equation is not balanced anymore
Avatar
Ah yeah I see
Avatar
so the tool should foreach every quad
11:39
and see the max value it reaches with the current env points
11:39
and change both ...
11:39
i really hoped someone else did this already xd
Avatar
I only remember I talked about it with patiga a few years ago already. But it wasn't really ever a problem, since ddnet maps don't rely on it. Mh yeah kinda annoying, but rn I also cannot help You BCS not at a computer
Avatar
Avatar
Jupstar ✪
I only remember I talked about it with patiga a few years ago already. But it wasn't really ever a problem, since ddnet maps don't rely on it. Mh yeah kinda annoying, but rn I also cannot help You BCS not at a computer
im kinda surprised you havent experienced this problem on ddnet maps... is so easy to set a color env value > 1... you see something in the editor thinking that's the effect, than in game it's completely different
11:51
we also just realized this now cause users starting to report this only now, as they got the renderer switched without really being aware of this
Avatar
Avatar
f
im kinda surprised you havent experienced this problem on ddnet maps... is so easy to set a color env value > 1... you see something in the editor thinking that's the effect, than in game it's completely different
But it's only important while also having an alpha< 1
Avatar
yes... the probability this problem arises is proportional to your number of quads and envs
11:52
and we use those massively
Avatar
Avatar
f
we also just realized this now cause users starting to report this only now, as they got the renderer switched without really being aware of this
I remember it was reported a few years ago. But thought the maps where fixed back then
Avatar
i guess thats why
Avatar
Avatar
Jupstar ✪
I remember it was reported a few years ago. But thought the maps where fixed back then
i guess it was easier for you to manually fix ye
Avatar
@Patiga interested in writing a small script. I want to know if ddnet maps rely on it.. what is twgpu doing in this scenario?
Avatar
cool, let me know if i can help
Avatar
Avatar
Jupstar ✪
@Patiga interested in writing a small script. I want to know if ddnet maps rely on it.. what is twgpu doing in this scenario?
twgpu so far just allows > 1 envelope values and uses them as such, didn't see a issue with it back then
12:01
the result is pretty well defined and the color is clamped automatically at the end of rendering
12:02
but I can see how it is sort of unexpected that you can make stuff brighter I suppose, is that the illogical part you are talking about?
Avatar
Avatar
Patiga
the result is pretty well defined and the color is clamped automatically at the end of rendering
But does it clamp it manually?
Avatar
I don't think so
Avatar
The GPU driver might simply use the alpha value and multiply it with the rgb value and only clamps that result
12:03
So if rgb is 2 and alpha 0.5 result is rgb = 1
Avatar
huh, I didn't know about that
Avatar
Old renderer would clamp the rgb
Avatar
would you be against manual clamping?
12:04
at the end of the fragment shader
Avatar
I generally prefer to leave it to the GPU and so all kinds of clamping in the editor already
12:04
I'll rationalize it again
12:05
But if it's not ub from Vulkan spec. We should probs allow it
Avatar
I mean negative values are bonkers and are allowed too
Avatar
True
Avatar
up until recently I only saw negative/above 1 values as: influences the interpolation differently compared to 0/1
12:07
but I think values above 1 can be used in a sensible way and I think software such as blender also handles values this way
Avatar
They often use such information for brightness
12:07
E.g. hdr
12:08
But that works affect the whole scene
12:08
They also probably don't use rgb xd
Avatar
in the shader editor (the one with the nodes), rgba values can also be set above 1, just checked
12:10
you don't even have to use math nodes
12:11
if you use the slider it will default into the range 0-1, but if you insert 2, the range of the slider is 0-2
12:13
I don't understand hsv yet. there you can't raise hue and saturation above 1, but value and alpha can have any positive values
12:14
honestly I'd be fine with both behaviors, allowing values above 1 would be fine by me
12:14
how do you see it?
Avatar
Avatar
Patiga
how do you see it?
I looked into the spec and some khronous opengl wiki. They clearly give the calculation of the alpha blending and say it is clamped after the fragment output. So I guess it's good to allow it generally
12:16
It makes the maps more robust against such changes anyway
12:16
So even if we change it back in future the maps will just work
Avatar
what changes do you mean?
Avatar
The change that the old renderer clamped the value in the cpu
Avatar
Instead of letting the GPU do it. Only problem remains it. If this means the old renderer has to upload floating points now
12:18
Instead of normalized color valley
12:18
Values
12:19
I changed that one day to match opengl 3.3 behavior. But i think vanilla uses fp
Avatar
eh, yeah that is unfortunate, wasn't aware of which renderer introduces which behavior
12:19
and vanilla also doesn't clamp?
Avatar
Avatar
Jupstar ✪
Instead of normalized color valley
couldn't you still upload the original values, only let the gpu convert them to floats and divide by 1024?
Avatar
Without shaders it's hard xd
Avatar
ow haven't touched opengl yet 😅
12:21
btw that is also an issue, many mappers think that 1000 = 1, and not 1024
12:22
I even found that in some mapper tutorial somewhere :/
Avatar
Yeah xd
12:22
If we want to talk about map format. I can give u many issues xdd
12:22
I'd call that one an editor issue tho
12:23
the users shouldn't have to work with fixed point numbers
Avatar
Ah I see xd
Avatar
@Jupstar ✪ @Patiga if this might help you: noticed that the map is buggy also with opengl 3.3.0, but not with the other versions of opengl (edited)
👍 1
Avatar
Avatar
Ryozuki
@heinrich5991 did u consider https://github.com/corrosion-rs/corrosion when adding rust to ddnet?
I used it to understand how to embed rust into cmake. however, it didn't really do much and wasn't worth the extra dependency
Avatar
I am trying to add flag to dfng (which is based on ddnet). I have problems when trying to compile. dfng-16.5flag/src/game/server/gamecontext.cpp: In member function ‘virtual void CGameContext::OnInit()’: dfng-16.5flag/src/game/server/gamecontext.cpp:3339:37: error: expected type-specifier before ‘CGameControllerCTF’ 3339 | m_pController = new CGameControllerCTF(this); | ^~~~~~~~~~~~~~~~~~
15:51
I used the 0.6 source for the flag entity and the ctf mod with some changes.
Avatar
do you define CGameControllerCTF somewhere?
Avatar
c++ class CGameControllerCTF : public IGameController { public: CGameControllerCTF(class CGameContext *pGameServer); (edited)
15:56
on ctf.h under game/server/gamemodes
Avatar
i love c++ cmake
17:09
1 hour to add a dep
17:10
finally i get to code
Avatar
Avatar
Mr.Gh0s7
on ctf.h under game/server/gamemodes
Did you #include ".../ctf.h" in gamecontext.cpp?
Avatar
Avatar
deen
Did you #include ".../ctf.h" in gamecontext.cpp?
yeah that was it thanks although I get segfault now xD. I'll put everything under DDRace.cpp.
Avatar
run with debugger to figure out the crash
Avatar
it segfaults at this line 78: ((CGameControllerDDRace *)(pGameServer->m_pController))->m_pInitResult = InitResult; on score.cpp under game/server
17:27
So i'll just add the flag-ing to the ddrace controller ;p
Avatar
1cd9eac rewrite int64_t to CClientMask - Valentin Bashkirov 79f72a5 move typedef to protocol.h - 0xfaulty 056ae40 removed bitmask.h - 0xfaulty 9bd4379 Merge #6293 - bors[bot]
Avatar
Again my curiosity: since ddnet has controller support: would it be possible (just technically) to release ddnet for xbox/ps5? (edited)
Avatar
I guess, as long as the consoles can reach regular servers
Avatar
Haha, cool, that would be so funny.
Avatar
xbox is windows anyway
17:40
thats also why u can play xbox games on win10+
Avatar
Is it all intel 64 bit?
Avatar
amd64
17:41
but yeah
Avatar
'拏 MAhdiyar 2023-01-31 17:41:12Z
What Is Error ?
Avatar
Avatar
'拏 MAhdiyar
What Is Error ?
i dunno what exactly its used for maybe for the checksum or for the git commit displayed at the version string but i guess smth like that
17:42
but no idea how to fix xd
Avatar
'拏 MAhdiyar 2023-01-31 17:43:08Z
omg
Avatar
Avatar
'拏 MAhdiyar
omg
did you not use git clone
17:43
but just downloaded the source?
Avatar
Avatar
Jupstar ✪
did you not use git clone
'拏 MAhdiyar 2023-01-31 17:44:01Z
ohhh yes
Avatar
Avatar
Jupstar ✪
but just downloaded the source?
'拏 MAhdiyar 2023-01-31 17:44:05Z
yes
Avatar
@heinrich5991 can we detect it ^
Avatar
The build should still work with the source download though, if not then that's an issue of the build system
Avatar
f3f592c Update Persian translations (by Quick) - def- d89434c Merge #6314 - bors[bot]
Avatar
i love
18:45
18:45
c++ error messages
18:45
i wanted to do some ddnet coding but im reminded why i stay with rust
18:46
it prints this t o tell me there is a duplicate symbol xd
Avatar
that's no c++ error messages
18:51
that's build system telling which command failed
Avatar
same shit
18:52
the build is part of the language
18:52
tooling is essential
Avatar
it's not
Avatar
for me it is
Avatar
here you use Ninja i believe
18:52
ninja is at least 30 years more recent than c++
18:53
it's like blaming the patient when the error is due to the doctor
Avatar
xd
Avatar
tooling is essential
Avatar
rust tooling is better, but in this case u probs only need to read the last sentence anyway
Avatar
so far 75% of my time has been spent adding a library xd
Avatar
rest is maybe nice to have actually
18:55
in case u arent sure why the error happens
Avatar
0x00007ffff582dbf0 in vtable for __cxxabiv1::__si_class_type_info () from /usr/lib/gcc/x86_64-pc-linux-gnu/12/libstdc++.so.6
19:03
i get a segfault here now xd
19:08
zzz
Avatar
xd
19:10
maybe cuz we dont use namespaces
19:10
the class names collide
19:10
i expected too much
19:16
fixed xd
Avatar
I have switched to NixOS recently and the Steam release stopped working for me 🤔 2023-01-31 21:04:51 I http: fetching https://info.ddnet.org/info?name=Scrumplex 2023-01-31 21:04:51 I http: https://master2.ddnet.org/ddnet/15/servers.json failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 2023-01-31 21:04:51 I http: https://info.ddnet.org/info?name=Scrumplex failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 2023-01-31 21:04:51 I http: fetching https://info.ddnet.org/info?name=Scrumplex 2023-01-31 21:04:51 I http: https://master1.ddnet.org/ddnet/15/servers.json failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ...
Avatar
Avatar
Scrumplex
I have switched to NixOS recently and the Steam release stopped working for me 🤔 2023-01-31 21:04:51 I http: fetching https://info.ddnet.org/info?name=Scrumplex 2023-01-31 21:04:51 I http: https://master2.ddnet.org/ddnet/15/servers.json failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 2023-01-31 21:04:51 I http: https://info.ddnet.org/info?name=Scrumplex failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 2023-01-31 21:04:51 I http: fetching https://info.ddnet.org/info?name=Scrumplex 2023-01-31 21:04:51 I http: https://master1.ddnet.org/ddnet/15/servers.json failed. libcurl error (60): SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed ...
Can you open https://master2.ddnet.org/ddnet/15/servers.json in a browser successfully?
20:10
curl also works fine
20:11
I expect there are some quirks with Steam on NixOS here
20:19
Looks like it works fine when i use the Steam Linux Runtime as a compat tool
Avatar
see #3909
Avatar
[2021-06-14 09:18:48][http]: libcurl version 7.22.0 (compiled = 7.55.0-DEV) […] [2021-06-14 09:18:49][http]: http https://master4.ddnet.tw/ddnet/15/servers.json [2021-06-14 09:18:49][http]: http ht...
Avatar
Hello, i can ask questions about coding here?
Avatar
dont ask to ask, just ask?
Avatar
How to "substring"?
Avatar
Avatar
newlesstee
How to "substring"?
Do you mean in general or in tw/ddnet code?
Avatar
depends heavily on the language if it's not tw/ddnet
Avatar
Avatar
Robyt3
Do you mean in general or in tw/ddnet code?
ddnet code
Avatar
would it be helpful if there was an additional option like "Has people not playing", so it's more accessible to find empty maps?
f3 5
Exported 217 message(s)