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 2024-04-27 00:00:00Z and 2024-04-28 00:00:00Z
Avatar
Avatar
ws-client
<ChillerDragon> @ƤØŢĀŤ0Co that sounds like a lot of work. Not sure if anyone is motivated to pick that up.
I would do it, pain and sweat, the problem is I have close to no experience in any C-like language, that sounds like a fun gamemode for a change
troll 1
Avatar
chillerdragon BOT 2024-04-27 01:36:20Z
@Sans: gather experience by doing it
Avatar
Avatar
Ewan
nobody is reading this wall of text on discord
he did already
02:56
i didn't read i just have amazing inference powers
Avatar
wrong reply
02:56
he opened issue i mean
03:01
well then someone link it
Avatar
Avatar
GitHub
Click to see attachment 🖼️
😃 2
04:54
caccf05 Fix warning because of incorrect format argument for size_t - Robyt3 c5a0d85 Use size_t for CImageInfo::m_Width and m_Height - Robyt3 17ae602 Merge pull request #8268 from Robyt3/Snapshot-Print-Warning-Fix - def- c22ba00 Merge pull request #8270 from Robyt3/Image-size_t - def-
Avatar
Avatar
zhn
Click to see attachment 🖼️
i dont read those anymore
05:19
mb
Avatar
Hello devs
05:57
Can you devs tell me which program used to make this game
05:57
And how did make online
Avatar
Avatar
Smlsd
Can you devs tell me which program used to make this game
it's made from scratch
Avatar
Avatar
Smlsd
And how did make online
also made from scratch
06:24
but it uses cpp and udp for network
Avatar
Avatar
Jupstar ✪
it's made from scratch
? justatest
greenthing 1
Avatar
angy me broki something oopsie daisy (edited)
07:38
2024-04-27 09:37:07 I glslprogram: Error! Shader program wasn't linked! The linker returned: Program Link Failed for unknown reason. ah gg
Avatar
Avatar
ws-client
<ChillerDragon> @ƤØŢĀŤ0Co that sounds like a lot of work. Not sure if anyone is motivated to pick that up.
ƤØŢĀŤ0Co 2024-04-27 07:39:38Z
Alright, Im not that strong in c++, but I believe I could try to do this. I will need some help tho, but thats what github is for, right🤗?
Avatar
oh god damn it i confused source_dir with destination_dir kek
Avatar
Avatar
ƤØŢĀŤ0Co
Alright, Im not that strong in c++, but I believe I could try to do this. I will need some help tho, but thats what github is for, right🤗?
justatest setup repo and i might check in from time to time kek
Avatar
ƤØŢĀŤ0Co 2024-04-27 07:41:39Z
Sure! Just woke, so not at this moment tho
Avatar
Avatar
Robyt3
interesting, I didn't know it's supposed to work like that. looks like I don't have steam API in there though DDNet.exe: error while loading shared libraries: steam_api.dll: cannot open shared object file: No such file or directory
i wrote a small python script that merely copies the .exe and steam_api.dll that automatically executes after a clean rebuild which fixed it for me, couldnt find another way without modifying the cmakelist - only thing that bugs me is why steam_api.dll gets generated within /build/Debug while all other .dll's are under /build/ - is there a reason for that?
Avatar
Avatar
meloƞ
angy me broki something oopsie daisy (edited)
did you move ur executable in different directory?
Avatar
Avatar
MilkeeyCat
did you move ur executable in different directory?
yes - my data folder is under Project/build - while msvc builds the target (and for some reason steam_api.dll) under Project/build/Debug
Avatar
Commenting this line out or turning on debug mode shows errors on the first connection to a server. After reconnect they are gone. https://github.com/ddnet/ddnet/blob/c22ba00b59b8a4f9e4dd7e36d5a76fbad4a18899/src/engine/client/client.cpp#L2003 ./DDNet-Server ./DDNet "debug 1;connect localhost" Prints this one first connect if the client connects again the errors are gone ``` 2024-04-27 15:44:57 D client: dropped weird object '(out of range)' (32767), failed on '(type o...
Avatar
While discussing issues related to binds, one suggestion was to add bind categories/groups so we could do more actions not only in game but in menus, demo player, editor, etc. See #3995, #3995 (com...
Avatar
ws-client BOT 2024-04-27 08:11:31Z
<ChillerDragon> https://github.com/ddnet/ddnet/issues/8271 can some powerful githubber assign me to this issue?
Commenting this line out or turning on debug mode shows errors on the first connection to a server. After reconnect they are gone. ddnet/src/engine/client/client.cpp Line 2003 in c22ba00 if(g_Confi...
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-addresssan...
Avatar
ws-client BOT 2024-04-27 08:24:09Z
<ChillerDragon> ty jopsti
Avatar
did i break my fix_style.py or is this actually intended? kek
Avatar
Hello, I would like to contribute but besides during studies, I never programmed in C/C++, any suggestion for tools or tutorials to get started? I prefer working with linux, but right now I only have the OS on a dualboot with nothing related to programming on it
Avatar
check the github readme: https://github.com/ddnet/ddnet on how to get started with the ddnet codebase, if you're unfamiliar with c++ programming in general there are hundreds of good youtube videos and blogposts related to the basics - if you're atleast familiar with those you can check other sources like ryo's blogposts: https://edgarluque.com - he has done articles for UI Code, Code conventions and an Intro to the DDNet game source code - there is also: https://wiki.ddnet.org/wiki/Development
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
My personal website.
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.
Avatar
Avatar
meloƞ
check the github readme: https://github.com/ddnet/ddnet on how to get started with the ddnet codebase, if you're unfamiliar with c++ programming in general there are hundreds of good youtube videos and blogposts related to the basics - if you're atleast familiar with those you can check other sources like ryo's blogposts: https://edgarluque.com - he has done articles for UI Code, Code conventions and an Intro to the DDNet game source code - there is also: https://wiki.ddnet.org/wiki/Development
Thank you very much, I'll have a look ! (sorry if it's a question frequently asked, I should probably have searched a bit more before asking)
Avatar
no worries - glad to help you out
👍 1
Avatar
Avatar
meloƞ
did i break my fix_style.py or is this actually intended? kek
You may be running the wrong version of it on accident? Or did we get strongarmed into upgrading from clang-format-10?
Avatar
im using clang-format 10.0.1 - i dont really know if that can be considered the "wrong" version
Avatar
Mh, then idk
Avatar
Avatar
meloƞ
i wrote a small python script that merely copies the .exe and steam_api.dll that automatically executes after a clean rebuild which fixed it for me, couldnt find another way without modifying the cmakelist - only thing that bugs me is why steam_api.dll gets generated within /build/Debug while all other .dll's are under /build/ - is there a reason for that?
this is a VS generator thing
09:48
use a good one
Avatar
Avatar
Jupstar ✪
it's made from scratch
Tell me real
Avatar
Avatar
Smlsd
Tell me real
i told you real
10:57
something made from scratch means, it was completely self made
10:58
and teeworlds/ddnet really reinvents all wheels
Avatar
that's what gigachads do (edited)
Avatar
See commit messages. #8262 is not fixed entirely by this, as I could not reproduce the assertion and the potential race condition is not prevented yet.

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
  • [ ] C...
Avatar
Avatar
Smlsd
Tell me real
its not based off of anything, the development started 20 years ago (iirc)
Avatar
Avatar
Jupstar ✪
i told you real
Bro just tell me now godot or unity or gamemaker2 or something
pepeW 5
😬 4
Avatar
Avatar
Smlsd
Bro just tell me now godot or unity or gamemaker2 or something
it's made in unreal engine 5 and uses raytracing only
11:39
if you don't have a rtx 4090 the game will run like shit
Avatar
runs fine on my nvidia mx130 :clueless:
Avatar
Avatar
Jupstar ✪
if you don't have a rtx 4090 the game will run like shit
are you talking about DDRaceNetwork(DDNet) right ?
Avatar
Avatar
Jupstar ✪
it's made in unreal engine 5 and uses raytracing only
never knew raytracing was turing complete poggers2
Avatar
Avatar
meloƞ
angy me broki something oopsie daisy (edited)
You've been Microsofted! Install Trisquel NOW! (edited)
Avatar
The command confusingly assumed the empty string if no argument was passed.

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...
Avatar
Avatar
Smlsd
Bro just tell me now godot or unity or gamemaker2 or something
its - literally - made - from - scratch XD https://github.com/ddnet/ddnet
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
Avatar
meloƞ
its - literally - made - from - scratch XD https://github.com/ddnet/ddnet
bro if you dont what to tell how it's made then just dont ping him bruh (edited)
Avatar
Avatar
MilkeeyCat
bro if you dont what to tell how it's made then just dont ping him bruh (edited)
true
Avatar
yo how can i use the ddnet http system to do smth like this? curl http://localhost:5555 -d '{ "data": "hello" }' ive figured out how to do a simple request but how can i attach data like i do with -d on the cli?
Avatar
system()
13:40
🧌
13:40
yea exactly
13:43
oh ok seems like it is HttpPostJson (edited)
Avatar
can also use curl easy api
Avatar
Hello, Im trying to re-create the rainbow feature on my tee wehn i enable my button. Im new to tw modding, and ive been scratching my head about this for a while today. But unfortunatley i need to go work, and still unable to figure a soultion to this. My idea was that when i change to my config, i can just set the color of my tee's body color to whatever i want. I can set the color to a static value in the render.h file however this cant be changed once set. Im just wondering if anyone has any ideas on how I will be able to achompish my idea, Teero had mentioned to me using tw ticks. but he couldnt explain it in english for me lol so im still stuck. (Thanks for trying tho teero <3 )
Avatar
Avatar
Tyrone
Hello, Im trying to re-create the rainbow feature on my tee wehn i enable my button. Im new to tw modding, and ive been scratching my head about this for a while today. But unfortunatley i need to go work, and still unable to figure a soultion to this. My idea was that when i change to my config, i can just set the color of my tee's body color to whatever i want. I can set the color to a static value in the render.h file however this cant be changed once set. Im just wondering if anyone has any ideas on how I will be able to achompish my idea, Teero had mentioned to me using tw ticks. but he couldnt explain it in english for me lol so im still stuck. (Thanks for trying tho teero <3 )
This is in the render.cpp file
14:24
Im probably just being dumb lol but ty in advance if anyone has the idea :D
Avatar
i did it like this iirc: RenderInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSVA(round_to_int(LocalTime() * 20.f) % 255 / 255.f, 1.f, 1.f)); (edited)
Avatar
Avatar
meloƞ
i did it like this iirc: RenderInfo.m_ColorBody = color_cast<ColorRGBA>(ColorHSVA(round_to_int(LocalTime() * 20.f) % 255 / 255.f, 1.f, 1.f)); (edited)
Hmm ok thank you, I will try this. If anyone else also has any ideas would be appreciated! Always cool to hear how others do stuff
Avatar
also i placed it in the Render function of players.cpp CPlayers::RenderPlayer (edited)
Avatar
Was this in your render.cpp file also? Rn my codes kinda everywhere and anywhere lol
14:29
Oh okay awesome
14:30
This is the monstrocity of a client I’m making rn lmao
Avatar
oh god justatest
Avatar
Just playing around with all settings
Avatar
stormax client:
14:32
Avatar
What is this hahahhaa
14:33
Looks cool
Avatar
fetching of ddnet.org/players and ddstats.qwik.space and displaying it there :D (edited)
Avatar
I did it before work rq :D
14:54
14:54
ty @meloƞ <3
Avatar
Motivation: This pull request introduces new features that enable regular players to perform the same actions on a dummy as they would with their primary character. The motivation behind this enhancement is to improve the gameplay experience by allowing for more dynamic and realistic training simulations. Key Benefits: Consistency and Control: By enabling regular players to mimic actions on a dummy, players gain greater control over their training environment. This consistency helps ...
16:02
690912e Fix invalid sound index used when loading external sound fails - Robyt3 3b0d9cd Fix editor crash with sound preview when sound is not valid - Robyt3 941a302 Ensure editor preview image and sound are unloaded properly - Robyt3 1153507 Fix double-free when reading opus file fails - Robyt3 4d37775 Only change sample variables when it was decoded successfully - Robyt3 51012bc Fix potential out-of-bounds writes on invalid opus files - Robyt3 cfb5b15 Log error code if opus file cannot be opened - Robyt3 d0e27fd Fix memory leak of opus file structure - Robyt3 d06f6d3 Handle failure of op_pcm_total function - Robyt3 9cf3094 Also check for incorrect sample index with assertion - Robyt3 4f94316 Make change_map parameter non-optional - Robyt3 a36ae18 Merge pull request #8274 from Robyt3/Server-ChangeMap-Argument - def- 516315e Merge pull request #8273 from Robyt3/Sound-Various-Fixes - def-
Avatar
yo, do you think tokenizer should tokenize basic types like i32, u8 or should it spit out just as in ident and it's parser's job to deal wit that? thonk
Avatar
Avatar
MilkeeyCat
yo, do you think tokenizer should tokenize basic types like i32, u8 or should it spit out just as in ident and it's parser's job to deal wit that? thonk
a proper tokenizer should parse them properly
18:28
and not as ident
18:28
at least as Type(Ident)
Avatar
Tokenizer tokenizes
18:28
Is it perhaps a lexer we are talking about here?
Avatar
the thing which takes raw dawg string and returns bunch of tokens justatest
Avatar
Some people make the tokenizer and lexer in one. But a tokenizer only splits the raw text into tokens with no extra context. It's a lexer that attaches context to those tokens
Avatar
mh true
Avatar
Anyway, I'm guessing you are making a lexer. Which means you should attach more context to your tokens, so yeah i32 would usually get attached some context to indicate it's a type by a lexer
Avatar
i guess even with a lexer you would not really do it
18:34
where is our playboy ryo
Avatar
Hi, I am trying to make some optimizations in my 0.6 compatibility layer and made the following commit, but there are issues which I currently cant resolve. Connecting doesn't work correctly for 0.7 clients this way for some reason https://github.com/fokkonaut/F-DDrace/commit/78d50e5b965caac9da04c6ecb6d77dc486fb2979
18:36
I tried to adapt to ddnet's way of unpacking twice
Avatar
Avatar
MilkeeyCat
yo, do you think tokenizer should tokenize basic types like i32, u8 or should it spit out just as in ident and it's parser's job to deal wit that? thonk
r u writing ur own programming language? 😄
Avatar
Here can be your ad. Contribute to MilkeeyCat/milklang development by creating an account on GitHub.
Avatar
Avatar
Jupstar ✪
r u writing ur own programming language? 😄
it's hard to call a programming language but im trying justatest
Avatar
Avatar
MilkeeyCat
it's hard to call a programming language but im trying justatest
and what happened to your demo player project?
Avatar
Avatar
Jupstar ✪
and what happened to your demo player project?
waiting when someone add support for quads 😏
Avatar
ask gerdoe
18:41
kek
Avatar
Avatar
fokkonaut
Hi, I am trying to make some optimizations in my 0.6 compatibility layer and made the following commit, but there are issues which I currently cant resolve. Connecting doesn't work correctly for 0.7 clients this way for some reason https://github.com/fokkonaut/F-DDrace/commit/78d50e5b965caac9da04c6ecb6d77dc486fb2979
with optimizations, do you mean performance? or more like refactoring?
Avatar
Both
Avatar
if you want more performance you should focus on other code i'd say
18:51
what i spotted as biggest bottlenecks in the server yet are:
  • the O(n²) physics handling of tees
  • snapshot deltas
  • many connections (tho you probably can only scale this one with more cores) tbf i handle snapshot deltas differently to ddnet, so maybe the implementation is just bad. for physics, reducing it to O(n) improved the game a lot
18:51
Avatar
how high did you peak it before it breaks?
18:51
iirc you mentioned it already but i forgot
Avatar
Avatar
meloƞ
how high did you peak it before it breaks?
i think the highest stable i tried was 1800. then the prediction code could not keep up and thought the network is lagging and increased prediction margin xD then everything was just getting worse and worse but i had 2000 connected once
18:52
just didnt work very long
18:53
and ofc i'm on a desktop pc, which is probably faster than the average VPS u buy 😄
Avatar
:D imagine hosting this on a 2€ vps
18:54
you gonna get a hatemail followed by a picture of a burning server
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
but tees here are still stacking, which isn't optimal on a free map it might work with 2000 tees at once
18:54
but only if i disable snapshot deltas.. that thing completely destroys performance 😄
18:54
i defs need a better method here
18:55
Zstandard - Fast real-time compression algorithm. Contribute to facebook/zstd development by creating an account on GitHub.
18:55
i'd be interested in that
18:55
but no rust lib
Avatar
Avatar
Jupstar ✪
Click to see attachment 🖼️
my favourite scene
Avatar
Avatar
Jupstar ✪
what i spotted as biggest bottlenecks in the server yet are:
  • the O(n²) physics handling of tees
  • snapshot deltas
  • many connections (tho you probably can only scale this one with more cores) tbf i handle snapshot deltas differently to ddnet, so maybe the implementation is just bad. for physics, reducing it to O(n) improved the game a lot
yeah this ccharactercore::move call is just hilarious :p, o(n) physics would break everything though
Avatar
Avatar
zhn
yeah this ccharactercore::move call is just hilarious :p, o(n) physics would break everything though
i'd say no xd
19:14
it breaks nothing
19:14
at least as i implemented it
Avatar
what did you implement then huh
19:15
i basically used a tee like a tile on a tilemap xd
19:15
and thanks to my RAII entities it automatically deregisters from playfield etc.
19:16
ah and also all relevant physics use checks by radius
19:16
that makes this a lot more easy
Avatar
Avatar
Jupstar ✪
what i spotted as biggest bottlenecks in the server yet are:
  • the O(n²) physics handling of tees
  • snapshot deltas
  • many connections (tho you probably can only scale this one with more cores) tbf i handle snapshot deltas differently to ddnet, so maybe the implementation is just bad. for physics, reducing it to O(n) improved the game a lot
how can you reduce it to O(n) when you can have collisions with every tees ?
Avatar
Avatar
Chairn
how can you reduce it to O(n) when you can have collisions with every tees ?
it is O(1) in average case
19:17
in worst case it's O(n)
19:17
(per character tick)
Avatar
add_or_move does nothing but just gets tee and sets pos
19:17
i dont see any physics related code
Avatar
the average case is that tees don't stack
Avatar
in worst case it's O(n²)
Avatar
if they don't stack i simply look at neighbours
Avatar
Avatar
Chairn
in worst case it's O(n²)
it's easier to talk here in tick per character
💀 1
19:17
than over all chars
19:18
so O(n) in worst case per char
Avatar
if u are sourounded by 16 tees it might be smth like O(16)
Avatar
so O(n) per character is O(n²) for the game
Avatar
which is the case in my screenshot
Avatar
Avatar
Chairn
so O(n) per character is O(n²) for the game
yeah it's n * n, where every n is character count
19:19
but it even iterates over "empty" characters
Avatar
Avatar
Chairn
so O(n) per character is O(n²) for the game
and its currently O(n²) in cpp code afair
Avatar
so it's basically 64*64
Avatar
it's always O(n²) for physics collision
19:19
you can segment the game in smaller region to reduce the complexity though
Avatar
Avatar
Chairn
you can segment the game in smaller region to reduce the complexity though
and thus in average case it's not O(n²)
19:20
with that argument a hashmap is also not O(1)
19:20
bcs they also only mean the average case
19:21
for ddnet you might want to sort the ids, so it's 100% same physics
Avatar
Avatar
Jupstar ✪
and thus in average case it's not O(n²)
the lookup is still n²
Avatar
Avatar
fokkonaut
Hi, I am trying to make some optimizations in my 0.6 compatibility layer and made the following commit, but there are issues which I currently cant resolve. Connecting doesn't work correctly for 0.7 clients this way for some reason https://github.com/fokkonaut/F-DDrace/commit/78d50e5b965caac9da04c6ecb6d77dc486fb2979
It seems to me like pSevendown is only ever set to false now except when it's initialized to true, is that intended? I would try to replace https://github.com/fokkonaut/F-DDrace/commit/78d50e5b965caac9da04c6ecb6d77dc486fb2979#diff-9f0365db9b2c308b61066eb7d11ecc9fc43c8c63b846f6cdb6632788e6d9c66cR364-R365 with *pSevendown = !(pPacket->m_Flags & 1); and see if works
Avatar
Avatar
Chairn
the lookup is still n²
i seriously don't understand what you mean 😄
Avatar
Avatar
Robyt3
It seems to me like pSevendown is only ever set to false now except when it's initialized to true, is that intended? I would try to replace https://github.com/fokkonaut/F-DDrace/commit/78d50e5b965caac9da04c6ecb6d77dc486fb2979#diff-9f0365db9b2c308b61066eb7d11ecc9fc43c8c63b846f6cdb6632788e6d9c66cR364-R365 with *pSevendown = !(pPacket->m_Flags & 1); and see if works
sevendown means 0.6
19:25
And the unused flag is only used in 0.7
19:25
which is why sevendown is set to true intiially
Avatar
on average it has to lookup 9 tiles. in worst case smth like 12 i guess
19:25
and as said i assume tees not stacking
Avatar
oh, you look tiles nearby
19:25
in current algo, you lookup all tees and compute distance
Avatar
Avatar
Chairn
in current algo, you lookup all tees and compute distance
yeah 😄
Avatar
Avatar
fokkonaut
which is why sevendown is set to true intiially
But previously you set pSevendown also to true when GetSevendown returned true, now it only gets set to false there
Avatar
But now the initial value is different
Avatar
So you first receive one message where it gets set to false and then everything else will use the wrong branch
19:27
if (*pSevendown) behave differently now I assume
Avatar
Hm. I'm not sure
Avatar
Just try the suggested change I guess
Avatar
I think I tried it already and it didnt work. I'm not on my pc currently
19:28
i'll see..
Avatar
Maybe you could record the connecting messages with Wireshark and then compare how it differs due to this commit
Avatar
@Robyt3 after 9hr working on switch screen still it's not perfect :|, am I noob or it's hard to reach perfect switch screen ?!
Avatar
Avatar
Robyt3
Maybe you could record the connecting messages with Wireshark and then compare how it differs due to this commit
trie
19:30
true*
Avatar
Avatar
Peakies
@Robyt3 after 9hr working on switch screen still it's not perfect :|, am I noob or it's hard to reach perfect switch screen ?!
It's not exactly easy, 5 different fullscreen modes, 2 backends, 3 operating systems are a lot of combinations
Avatar
Avatar
Chairn
it's always O(n²) for physics collision
I think you can do n logn no? With a bsp tree
Avatar
@Jupstar ✪ how do you handle tees speed, when a tee can cross tens of tiles in a single tick ?
Avatar
Avatar
Learath2
I think you can do n logn no? With a bsp tree
but you have to generate it once per tick, no?
Avatar
Avatar
Robyt3
It's not exactly easy, 5 different fullscreen modes, 2 backends, 3 operating systems are a lot of combinations
shit I just stuck on 1 operation system called as Windows and Vulkan backend and fucking fullscreen modes 😐
Avatar
Avatar
Chairn
@Jupstar ✪ how do you handle tees speed, when a tee can cross tens of tiles in a single tick ?
only one tee is moving at once, so that's no problem
Avatar
well, you could always use the previous one and say a tee can only change to a neighbour node
this 1
Avatar
Avatar
Chairn
well, you could always use the previous one and say a tee can only change to a neighbour node
i don't replace any "normal" logic. i simply reduce the amount of players checked against
19:32
if a tee moves, it moves in small segments
19:32
so for every segment it rechecks all tees
19:32
just like the normal physics does
Avatar
I think you can do even better, but too much wine in me to remember the related keywords now
Avatar
Avatar
Learath2
I think you can do even better, but too much wine in me to remember the related keywords now
good feast!
Avatar
Avatar
Learath2
I think you can do even better, but too much wine in me to remember the related keywords now
100%
Avatar
Something something temporal coherence, something locality something
Avatar
Avatar
Learath2
I think you can do even better, but too much wine in me to remember the related keywords now
maybe you can refresh your mind with this: https://en.wikipedia.org/wiki/Collision_detection
Avatar
Avatar
Learath2
Something something temporal coherence, something locality something
the biggest problems with trees are, that you have to update them every tick
19:35
and updating trees not the nicest
19:35
else raytracing would run at 500 fps 😏
Avatar
Space hashing maybe?
Avatar
Avatar
Jupstar ✪
else raytracing would run at 500 fps 😏
I can do raytracing in O(1)
Avatar
you could probably also optimize the segment moving
Avatar
space partitioning ?
Avatar
I build a replica of the scene irl, add lights, then take a picture
Avatar
Avatar
Learath2
I can do raytracing in O(1)
most raytracing impls cache older rays. which is why sometimes moving from very dark to very light actually looks quite bad
Avatar
It takes about 2 weeks consistently
Avatar
just let the rays trace themselves
19:37
good strategy
Avatar
Avatar
Peter0x44
just let the rays trace themselves
the sun is also just a GPU starting many threads for many rays
19:38
😏
Avatar
Avatar
Chairn
space partitioning ?
Yeah I guess I'm thinking space partitioning, but in an O(1) manner rather than keeping an up to date tree
Avatar
isn't ray tracing going the other way ? like from the camera to the light source
Avatar
Avatar
Chairn
isn't ray tracing going the other way ? like from the camera to the light source
Depends. There are algorithms that go either way. Though all the performant ones indeed start from the camera
Avatar
Avatar
Chairn
isn't ray tracing going the other way ? like from the camera to the light source
that is the hardest to answer question. but modern implementations do i think
19:39
but the other way around can also be better in some cases
Avatar
There are algorithms that launch rays from light sources then use complicated things far beyond my understanding to cull rays that wont ever reach the camera
19:40
They still take hours to converge on complex scenes though iirc
Avatar
Avatar
Learath2
Yeah I guess I'm thinking space partitioning, but in an O(1) manner rather than keeping an up to date tree
i don't think there is an O(1) algorithm for this
Avatar
1987 Thibault and Naylor[3] described how arbitrary polyhedra may be represented using a BSP tree as opposed to the traditional b-rep (boundary representation). This provided a solid representation vs. a surface based-representation. Set operations on polyhedra were described using a tool, enabling constructive solid geometry (CSG) in real-time. This was the forerunner of BSP level design using "brushes", introduced in the Quake editor and picked up in the Unreal Editor. 1990 Naylor, Amanatides, and Thibault provided an algorithm for merging two BSP trees to form a new BSP tree from the two original trees. This provides many benefits including combining moving objects represented by BSP trees with a static environment (also represented by a BSP tree), very efficient CSG operations on polyhedra, exact collisions detection in O(log n * log n), and proper ordering of transparent surfaces contained in two interpenetrating objects (has been used for an x-ray vision effect). 1990 Teller and Séquin proposed the offline generation of potentially visible sets to accelerate visible surface determination in orthogonal 2D environments. 1991 Gordon and Chen [CHEN91] described an efficient method of performing front-to-back rendering from a BSP tree, rather than the traditional back-to-front approach. They utilized a special data structure to record, efficiently, parts of the screen that have been drawn, and those yet to be rendered. This algorithm, together with the description of BSP Trees in the standard computer graphics textbook of the day (Computer Graphics: Principles and Practice) was used by John Carmack in the making of Doom (video game). 1992 Teller's Ph.D. thesis described the efficient generation of potentially visible sets as a pre-processing step to accelerate real-time visible surface determination in arbitrary 3D polygonal environments. This was used in Quake and contributed significantly to that game's performance
Avatar
sad that i am too lazy to wanting to fully understand it
Avatar
In computer science, binary space partitioning (BSP) is a method for space partitioning which recursively subdivides an Euclidean space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise to a representation of objects within the space in the form of a tree data structure known as a BSP tree. Binary sp...
Avatar
it's actually really peak stochastics
19:43
xd
Avatar
Avatar
Chairn
i don't think there is an O(1) algorithm for this
O(1) algorithm to find which chunk you are in is trivial if the chunks are same size. Finding a chunks neighbours are also O(1) in such a case. Then it's a matter of checking for collisions within the chunk, which is I guess O(n^2) in the worst case that everyone is in one chunk, but you should be able to tune chunk size to make sure that only happens for cases where n is small enough that it doesnt matter
Avatar
Avatar
Jupstar ✪
it's actually really peak stochastics
what's the relation with collision detection or space partitioning ?
19:45
i guess you could try random position for 10^6 and say, i got not collision after this many tries, but kinda inefficient 😄
Avatar
Avatar
Chairn
what's the relation with collision detection or space partitioning ?
space partioning is simply to reduce the amount of "possible" checks
19:45
or what do you want to hear
Avatar
i don't see the relation between monte carlo and what we were discussing
Avatar
Avatar
Chairn
i don't see the relation between monte carlo and what we were discussing
we were talking about if cameras shoot rays vs light sources
19:47
btw afaik the ray tracers in GPU expect you to build a BVH
19:47
A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects, which form the leaf nodes of the tree, are wrapped in bounding volumes. These nodes are then grouped as small sets and enclosed within larger bounding volumes. These, in turn, are also grouped and enclosed within other larger bounding volu...
19:49
19:50
stochastic is kinda very useful math. but also the kind of math i never like learning
19:50
bcs there are 1 trillion approaches that only differ by small things xD
Avatar
but BVH is not stochastic either
19:51
neither is ray tracing afaik (edited)
Avatar
Avatar
Chairn
but BVH is not stochastic either
u wanted me to to talk about space partioning. bvh is kinda a special case
Avatar
Avatar
Chairn
neither is ray tracing afaik (edited)
ray tracing is a LOT of stochastics
19:52
u shoot rays in random directions and want an approximation of light influence
19:53
ok tbf it always depends on the algorithms used
19:54
i dunno how much companies like disney approximate vs actually just execute rays to get best results
Avatar
Avatar
Learath2
https://youtu.be/gsZiJeaMO48 this convo reminded me of this video. Pretty nice content
really good video. just music is annoying 😄
Avatar
YES, so annoying
Avatar
Avatar
Learath2
https://youtu.be/gsZiJeaMO48 this convo reminded me of this video. Pretty nice content
Saw this video prob a year ago or months, this is so well explained
20:31
Music wasn't that bothering for me
Avatar
it's too mathematical for a video imo
Avatar
Avatar
Chairn
it's too mathematical for a video imo
I'm a little biased since I love math visualized kinda videos
Avatar
i am always surprised how (reasonably small) heap allocations have only a low/non-existing effect on performance. tried to optimize bsdiff by removing the heap allocations, made 0 difference 😂 so 600 players seems to be the limit then for now :c and that defs won't scale with more connections without using more cores. underwhelming (edited)
Avatar
Avatar
Jupstar ✪
i am always surprised how (reasonably small) heap allocations have only a low/non-existing effect on performance. tried to optimize bsdiff by removing the heap allocations, made 0 difference 😂 so 600 players seems to be the limit then for now :c and that defs won't scale with more connections without using more cores. underwhelming (edited)
Modern arena allocators are very good at these
Avatar
ok zstd is absolute banger, it's not only 15x faster than bsdiff, but also a tiny bit smaller in size. Didn't expect that.
Avatar
good afternoon #developer
Avatar
Avatar
Jupstar ✪
ok zstd is absolute banger, it's not only 15x faster than bsdiff, but also a tiny bit smaller in size. Didn't expect that.
yea
Avatar
Its 1am for me justatest
Avatar
ws-client BOT 2024-04-27 23:56:25Z
<ChillerDragon> morning fred
Exported 278 message(s)