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-10-06 00:00:00Z and 2022-10-07 00:00:00Z
Avatar
Avatar
Ryozuki
yea
Jupstar βœͺ 2022-10-06 03:50:58Z
I hope you did some benchmarks
03:51
Else we can't compare
Avatar
I didnt xd
Avatar
another day on nixos
06:39
Avatar
chillerdragon BOT 2022-10-06 06:58:59Z
Wat nix can do
06:59
Sounds niche
Avatar
Google it
Avatar
// Are you there god??/ ??=define _(please, help) ??=define _____(i,m, v,e,r,y) r%:%:m ??=define ____ _____(a,f,r,a,i,d) main(__)<%____(!_(-~-??-((-~-??-!__<<- ??-!!__)<<-??-(!!__<<!!__))+-~-~-??--~-~ -~-~-~-~-??-(-~-~-~-~-??-!!__<<-~!!__),- ??-!__))<%??>%>_(__,___)??<____ (printf("please let me die??/r%d bottle%s" " of bee%s""""??/n",(!(___ %-~-~!!___))?--__+!___++:__+!___++,!(__-!!___) &&___%-~-~!!___??!??!!(___%-~-~!!___??!??!__ -(-~!!___))?"":"s",___%-~-??-!!___<-??-!!___? "r on the wall":"eeeeeeer! Take one down,pass ??/ it around")&&__&&_(__,___),"mercy I'm in pain")??<??>??>
justatest 1
07:23
valid c
07:23
gcc -w --trigraphs
Avatar
try explaining this entire section to someone 200 years ago
Avatar
Tolerance for weird errors
>
Note if you're going into more weird languages, you'll run into types of errors you almost certainly won't hit in the popular ones.
>
You'll get opaque error messages, especially if the language has invariants that aren't common in other environments (Rust's ownership checker is probably the most common example of "no analogue in a more common language," but this can also mean Mercury's determinism checks, or Pony's "reference guarantees"). To be clear: these parts are exactly why learning a new language is fun! This is what it costs to reap the reward of Perlis langauges (a language that changes how you think, from the quote: "A language that doesn’t affect the way you think about programming is not worth knowing.")
07:33
Tips and narratives around picking a weird language for your project
Avatar
@Jupstar βœͺ do you happen to know what the max amount of images is for maps?
11:11
I created one with too many and now it uses other textures from the game when it tries to display some of them
Avatar
Jupstar βœͺ 2022-10-06 11:35:45Z
64
11:36
But i actually thought ddnet clamps
11:36
And not randomly access out of bounds
11:38
Well it clamps loading in mapimages.cpp
11:39
Maybe not at runtime dunno
11:40
Tbh the map should not even load if it's so buggy
Avatar
huh I thought 64 was an arbitrary limit by the editor
Avatar
Jupstar βœͺ 2022-10-06 11:40:38Z
Even if we clamp it will show wrong results
Avatar
Avatar
Patiga
huh I thought 64 was an arbitrary limit by the editor
Jupstar βœͺ 2022-10-06 11:40:51Z
Sadly no
11:40
Vanilla
11:41
I just created a script to turn images/gifs/videos into menu backgrounds, but haven't found a suitable video file that is <= 2 seconds yet
11:42
hm, then I should probably also introduce that 64 limit in twmap
Avatar
Jupstar βœͺ 2022-10-06 11:44:44Z
U could do texture atlas
11:45
8k should be supported by almost anything
Avatar
hm true
11:46
that sounds like a big hassle though, I think I'll just stay with the limitation and drop remaining frames
11:47
didn't want to create complicated logic, only automate the current process
11:47
aww mkv doesn't get embedded
11:48
depending where I was in the menu a different texture was shown instead of the too many frames
11:48
this one showed me that those are indeed other game textures ^^
Avatar
change the file extension to mp4 and it'll embed
Avatar
fineee :p
11:49
poggers 2
Avatar
Jupstar βœͺ 2022-10-06 11:50:30Z
We can must increase the limit for ddnet but check it in map realease tool
11:50
Just*
11:51
But yeah auto correction must is fine too
Avatar
I mean my use case here isn't really something that should be accommodated to explicitly
11:51
but yeah I'll add the check I guess
Avatar
Jupstar βœͺ 2022-10-06 11:52:23Z
Mhh 64 images are 260 mb
11:52
Guess 256 should work out xd
11:52
Ah actually double bcs mipmap
11:53
So 128
Avatar
64 should already be 512MB i think
11:53
1920 * 1080 * 4 * 64 / 1024 / 1024 506.25
11:54
it adds up quite quickly πŸ˜…
Avatar
Jupstar βœͺ 2022-10-06 11:55:18Z
Yeah mipmap
11:55
So x2 for u
Avatar
so 64 -> 1 GB
Avatar
Jupstar βœͺ 2022-10-06 11:56:03Z
Maybe lower framerate
Avatar
Avatar
Patiga
so 64 -> 1 GB
Jupstar βœͺ 2022-10-06 11:56:23Z
Yes if you want fullhd res true
Avatar
ah true
Avatar
I just found this networking guide/rescourse https://www.gabrielgambetta.com/client-server-game-architecture.html. It's well written if anyone wants to check it out
13:15
It's for fast-paced multiplayer
13:19
It also has a cool demo showing the effect of lag, client predictions, reeconciliation, and interpolation https://www.gabrielgambetta.com/client-side-prediction-live-demo.html
Avatar
it doesn't include any equivalent for anti-ping but for an FPS it's not needed because of lag compensation
14:34
it would be cool to do server side rollback or "lag compensation" in teeworlds/ddnet. I tried to make it once but saving and loading world states is not as easy on the server as it is on the client right now (edited)
14:36
I guess it's probably unreasonable for an FPS client to run a full physics simulation on the client like we do
Avatar
server rollback probably doesn't really work that well with entity projecties
Avatar
how come?
Avatar
even our hooks isn't instant hit like lots of completive FPS do
Avatar
ah I should have prefaced that the serverside rollback in ddnet would only be for preventing lag spikes. if you tried to sync the players and the server in real time then it would be a nightmare yes (edited)
Avatar
i'm talking more about bullets projectiles
Avatar
Why wouldn't server rollback work for entity projectiles though?
Avatar
well, server rollback implies that it favors client views, so it tries to match what client sees when dealing with bullet collision. that might make the party taking damage see bullet hitting them that looks like missed.
Avatar
Wouldn't the same concept of applying lag compensation apply to rollback projectiles?
Avatar
i think lag compensation and collider rollback are the same thing.
14:42
maybe there are other server rollbacks that i don't know justatest
14:42
if you want to deal with lag spikes then usually what people do is just to accept client states instead of only inputs. but that also introduces complexity in physics and cheat detection.
Avatar
the idea is that you only do rollback on the server if you were missing client inputs from past ticks (it would actually be always but just for simplification) then when a client lags and drops inputs if the client also sends their past inputs on every tick then the server can go back and re-simulate with their inputs that it didn't have before. This is kinda what overwatch does (edited)
Avatar
oh i see
14:43
but in that case i think most game would just increase the play ahead on the client-side and call it a day.
Avatar
yes but that's not acceptable for ddnet xd
14:44
ye
Avatar
also you can still do that
14:44
you can use both
Avatar
definitely should fix the O(n^2) physics before doing anything rollback tho.
Avatar
I mean the client seems fine with it
14:45
it runs the same O(n^2) physics up to 200 times every tick I think (edited)
14:45
maybe its not the same physics?
Avatar
i mean server cpu are usually weaker.
Avatar
I suppose
14:46
even 2 ticks of rollback is already a 4x improvement in "play ahead" buffer over current ddnet
14:47
under normal conditions
14:48
I have not profiled a server with many players so idk if the physics are actually the most expensive part
14:49
probably is I guess
Avatar
and maybe snapping as well?
Avatar
dunno xd
14:55
idk how most physics optimizations work but I guess the issue is that it's hard to determine if it's impossible for 1 tee to interact with another tee since with tunes and all sorts of things you basically can never rule it out. it's much harder than just rigid body collisions
14:56
maybe it is possible but you would have to be quite careful before skipping some physics (edited)
Avatar
justatest i mean you can probably assume the tuning wouldn't be so ridiculous like zooming across the screen and collide with a tee on the other side of the map within one tick
Avatar
idk I haven't looked closely at which parts are O(n^2) and which are not
14:59
I assume projectiles are just O(n) ?
Avatar
n is all entities, which includes character and projectiles and pickups
14:59
a simple quadtree could be a huge improvement already.
Avatar
i mean you can probably assume the tuning wouldn't be so ridiculous like zooming across the screen and collide with a tee on the other side of the map within one tick
meanwhile sg bug, giving infinite speed upwards happy
Avatar
justatest no sure which bug is that, and are we keeping that kind of speed as features as well
Avatar
yea, its when you are at the exact same position as the other tee (inside of each other), and shoot sg
Avatar
I thought we have to keep all features xd
Avatar
i see
Avatar
division by 0 and so on
Avatar
there are too many "features" to keep track of
Avatar
yeah that's a large part of the issue I think (edited)
15:02
everyone afraid to touch physics
Avatar
i mean does div by 0 even has the same behavior in different compilers
Avatar
also no tests
Avatar
yea its undefined I think. it was discussed a few days ago that it was still not replaced with explicit behavior
Avatar
i couldn't see we keeping a feature that might behave differently in the future or on different hardware lol
Avatar
oh wait its probably not undefined, no? float math is pretty well defined iirc
Avatar
i have no idea (edited)
Avatar
Avatar
Patiga
yea its undefined I think. it was discussed a few days ago that it was still not replaced with explicit behavior
kek sounds like we are just gonna if that one and assign it to Infinity or something.
Avatar
ah, its defined by the ieee standard but its not enforced in the c++ standard according to https://stackoverflow.com/questions/42926763/the-behaviour-of-floating-point-division-by-zero
Avatar
it should be easy to keep that bug since it only happens when both tees are at exactly the same position, so it's easy to check
Avatar
ye, but I don't really think we should keep it tho.
15:05
maybe as a map bug compatibility or something.
Avatar
idk, making any change to the physics will be controversial
15:07
but if the sg bug prevents doing a more optimized physics then I think there will be many other things that also prevent it
Avatar
Iirc div by 0 is ub
15:07
In c++
Avatar
Avatar
TsFreddie
a simple quadtree could be a huge improvement already.
it needs to refactor everything as i got it
15:42
i tried to integrate quadtree buut...
15:42
nothing is done right it seems
Avatar
it would be nice if there was a small number above the friend heart that says how many friends are in this one server
Avatar
that's a really good idea
Avatar
Why bother optimizing physics unless we are allowing higher player counts? We have enough headroom per tick to do whatever we want, unless it becomes too tight I really wouldn't bother with it
Avatar
Avatar
Iza
it would be nice if there was a small number above the friend heart that says how many friends are in this one server
Nice idea, could you open an issue on github for it?
16:03
If not I'll try not to forget to create one after this lecture
Avatar
ok i'll do
Avatar
it would be nice if there was a small number above the friend heart that says how many friends are in this one server (see screenshot for reference) !DDNet_wnGq83UXPv
Avatar
i find this notice is not nicely positioned, at least in german idk how it is with english, maybe find a better place for it
Avatar
suggestion: when people are voting for a map change - maybe the server could /save your progress (if possible) if the map change vote goes through so you dont lose progress
Avatar
Avatar
Iza
i find this notice is not nicely positioned, at least in german idk how it is with english, maybe find a better place for it
or just make the proportions better with margins idk (edited)
Avatar
Since it looks ugly overlaid over the other tabs

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 possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind'...
Avatar
Thanks @Iza ^
Avatar
Jupstar βœͺ 2022-10-06 16:51:24Z
@Patiga where is the tool? πŸ˜„
Avatar
i think nixos is better suited for servers
17:38
actually its like a glorified docker xd
17:38
ill switch to gentoo without systemd
thonk 1
❓ 1
πŸ‡Ό 1
πŸ‡­ 1
πŸ‡Ύ 1
17:41
ill buy a 64gb usb3.2 and install this https://github.com/ventoy/Ventoy
A new bootable USB solution. Contribute to ventoy/Ventoy development by creating an account on GitHub.
17:41
so i dont need to bother again
17:45
but at this price range
Avatar
Indirect leak of 5447 byte(s) in 13 object(s) allocated from: #0 0x7f1467217817 in __interceptor_malloc (/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/libasan.so.6+0xb2817) #1 0x7f1444275ff7 (<unknown module>)
17:51
I get these bizarre leaks, it smells like they are in external libraries, but why do they end up being from unknown_module?
Avatar
Ok, if ever you get stumped by the output of ASan or LSan, report_objects=1 for LSan and fast_unwind_on_malloc=0 on ASan options helps a lot
18:52
(maybe that's how we should run it on CI too? it is slower, but it'll give stack traces that are actually useful in some cases)
18:56
I call every cleanup function properly and curl still leaks, maybe rust people were right, there are no good C libraries
Avatar
Ok, actually I do cleanup properly, leak sanitizer just runs too early, hm
19:16
Why on gods green earth is leak sanitizer running before all global destructors happen?
Avatar
Jupstar βœͺ 2022-10-06 19:20:22Z
why do u rely on exit time destructors
Avatar
Avatar
Learath2
I call every cleanup function properly and curl still leaks, maybe rust people were right, there are no good C libraries
good good
Avatar
Avatar
Ryozuki
good good
Jupstar βœͺ 2022-10-06 19:26:58Z
lmao, maybe read 1 sentence later πŸ˜„
Avatar
no need
19:27
BASED
Avatar
Avatar
Learath2
Why on gods green earth is leak sanitizer running before all global destructors happen?
Jupstar βœͺ 2022-10-06 19:27:43Z
just use valgrind
19:28
it also shows uninitialized values without needing an own compiled memsanitizer compatible os xd
19:29
@Ryozuki if u create a thread, do you also destroy it manually? or do you think it's better to leave it to the OS?
Avatar
i mean a thread is destroyed by joining it
19:30
maybe with a timeout of 0 xd
Avatar
Jupstar βœͺ 2022-10-06 19:30:30Z
yeah i mean a co thread u use the whole time
Avatar
It's bizarre, it does do the leak check after the destructor, but it reports things that are guaranteed to be freed after the destructor as still leaks
Avatar
Avatar
Jupstar βœͺ
yeah i mean a co thread u use the whole time
i use a signal for that usually or smth
Avatar
Jupstar βœͺ 2022-10-06 19:31:15Z
question is would a perfect OS, also trust its software so much that it doesn't care
Avatar
Kinda off-topic what's teewolds connection sceme? What protocols are used?
Avatar
Jupstar βœͺ 2022-10-06 19:31:21Z
need to make the perfect OS
Avatar
Avatar
Mr.Gh0s7
Kinda off-topic what's teewolds connection sceme? What protocols are used?
Jupstar βœͺ 2022-10-06 19:31:32Z
UDP
19:31
no "real" connection as in tcp
19:32
basically own connection logic
Avatar
Avatar
Jupstar βœͺ
no "real" connection as in tcp
We do a handshake and establish some sort of reliable transport on top of UDP, but yeah, it's not tcp
Avatar
Ok thanks
19:34
i found this blog post some days ago
19:34
he uses threading
19:35
and no, he doesnt guess the password its not about that
Avatar
Ok, I'm out of ideas and bored at this point
19:46
I allocate the exact same place I call curl_global_init and free where I call curl_global_cleanup, my allocation is not detected as expected, but stuff allocated by curl through global_init and freed in global_cleanup get detected as leaks
Exported 186 message(s)