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-01-20 00:00:00Z and 2022-01-21 00:00:00Z
Avatar
Avatar
Jupstar ✪
@louis: i rebased the tick stuff now, there might be bugs with particles and other effectsThe physics will feel similar to the real tw physics. Remarkable are: ● 1 Tile Gores techniques are MUCH easier. I am not sure if that comes from the simple fact that hooks are just checked more often(bcs more ticks) or if thats already a floating point rounding thing ● I also fixed the cursor in this commit, so enable the hookline and do a 360° cursor rotation will feel amazing(one of the few physics changes i'd love to see in teeworlds upstream) https://github.com/Jupeyy/ddnet/actions/runs/1717766287
cool, seems like you can't hang on a ceiling with freeze anymore
01:00
ig a lot of core teeworlds moves would break
Avatar
[quakenet] Jerry_ BOT 2022-01-20 02:47:41Z
Hello
02:48
Is there an android ddnet client?
Avatar
Hi
Avatar
Hello!
Avatar
chillerdragon BOT 2022-01-20 08:51:10Z
axaxax bulgi trol (<@749222324980416602_=5bquakenet=5d=20breton>)
would some moderator be so kind and ban BulgarianTee for blocking the race on GER2 (port 8300)?
Avatar
Not nice...
Avatar
chillerdragon BOT 2022-01-20 09:10:38Z
if(CRYPTO_FOUND) target_compile_definitions(${target} PRIVATE CONF_OPENSSL) target_include_directories(${target} PRIVATE ${CRYPTO_INCLUDE_DIRS}) endif()how do i not fall back to md5? and get proper openssl support? ._. im on debian and got libssl-dev installed
09:11
I want to roll some own crypto :D
Avatar
chillerdragon BOT 2022-01-20 09:19:55Z
ok ez got it by building opessl from src
Avatar
I just build the whole Android project now to check if there is other stuff:
  • SDL also renamed a CMAKE flag
  • apparently we updated icons, 512x512 was removed
  • the newer compiler version warned about mismatched c function signature(SDL_main)
  • since we moved all resize stuff to the main thread i made sure the main thread gets the updated window, which is important for android
I tested it on phone, so it works now and fixes #4615

Checklist

  • [x] Tested the change ingame
  • ...
Avatar
Jupstar ✪ BOT 2022-01-20 10:34:34Z
@deen: first benchmarks are in i dunno if the ryzen 4500u is legit, but it even outperforms the 4700uhttps://openbenchmarking.org/result/2201208-NE-4500UMID308 https://openbenchmarking.org/result/2201196-NE-4700UMID731the 4700u is probably legit i guess
10:41
in cinebench only ryzen 7 6800u seems to outperform M1 single core (and maybe intel chips, but their naming is too confusing xD) https://www.cpu-monkey.com/de/cpu_benchmark-cinebench_r23_single_core-15 So weird that it runs so bad on DDNet
10:42
they also should rename it to single thread, if thats single thread performance
10:43
but ok, in their disclaimer they say it doesnt use hyper threading, so i guess they meean only a single thread running
Avatar
Jupstar ✪ BOT 2022-01-20 10:51:35Z
maybe in clang you can enable hardware floating point calculation or smth like that i really have no idea how powerful M1 is in specific workloads I know ARM is generally really good in integer calculations performance
Avatar
integer masterrace
Avatar
55a1406 Further android build fixes - Jupeyy ca7a613 Merge #4619 - bors[bot]
Avatar

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 if it works standalone, system.c especially
  • [ ] 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-addresssanitizer--u...
Avatar
What happens if I join an almost full server, let's say 62 tees, with old client, where MAX_CLIENTS is less than 64? Would it crash? Or does it ghost some tees?
Avatar
chillerdragon BOT 2022-01-20 12:07:15Z
by less than 64 you mean 16?
12:08
you then can only see 16 tees at once. It wont crash. And the server has to fake chat messages a bit but other than that it works pretty fine.
Avatar
Avatar
Jupstar ✪
maybe in clang you can enable hardware floating point calculation or smth like that i really have no idea how powerful M1 is in specific workloads I know ARM is generally really good in integer calculations performance
something like that should be done automatically. I don't think I need to set anything manually
Avatar
Jupstar ✪ BOT 2022-01-20 12:35:34Z
https://openbenchmarking.org/result/2201202-NE-DDNETJSTA16 well i get more than double fps than you in the cpu bound benchmark
12:35
in android you need to set it your own too
12:36
so there must be smth that blocks full performance i guess, either the WaitForIdle() or some compiler flag
Avatar
yeah, I'm only running at 30-40% of a single CPU, not sure why
Avatar
Jupstar ✪ BOT 2022-01-20 12:37:19Z
well it waits for the GPU calls, so i guess thats not impossible
12:38
i also get higher fps and lower cpu usage with asyncrender old set to 0, but only in the CPU bound test
12:40
maybe using zoomed out is the better test anyway. We removed some bottleneck now anyway, so its less of an CPU test than it was with the old DDNet version
12:41
ok when i zoom out i still get around same fps
Avatar
actually the further I zoom out the more fps I get
12:41
that's weird
Avatar
Jupstar ✪ BOT 2022-01-20 12:41:33Z
i raelly dunno what improved so much. Maybe bcs of the extended snapshot thing
12:41
it might render less
Avatar
but the extended snapshot is not in the recorded demos, is it?
Avatar
Jupstar ✪ BOT 2022-01-20 12:42:14Z
well not new ones
12:42
but we cleaned up how the extended ones were found
12:42
or its some prediction update by nuborn that removed some floating point calculation
12:44
can you remove the WaitForIdle call, i think you said it only crashes when resizing?
12:44
so just dont resize? xd
12:44
(for testing)
Avatar
yes, I did that for the benchmarks I uploaded
12:46
otherwise even fewer fps
Avatar
Jupstar ✪ BOT 2022-01-20 12:46:15Z
oh
Avatar
Avatar
chillerdragon
you then can only see 16 tees at once. It wont crash. And the server has to fake chat messages a bit but other than that it works pretty fine.
Does the server send you only nearest 16 tees in that case? Or just 16 highest ID tees? Other tees can interact with you but you don't see them, right?
Avatar
You see the closest 16 tees
12:48
My server uses the same idea for 128 players, you see the closest 64
12:48
well, 63 actually, because the last slot is empty with a space as name to show fake chat messages by players outside of the range
Avatar
Here's another sample from the Multeasymap (CPU-bound, 100%)
Avatar
Jupstar ✪ BOT 2022-01-20 12:49:28Z
RenderTilemap again
12:49
thats OGL 1.x only
Avatar
sigh, no idea why it keeps getting enabled
12:50
[2022-01-20 13:49:57][gfx]: Created OpenGL 4.1 context. [2022-01-20 13:49:58][opengl]: Vendor string: Apple [2022-01-20 13:49:58][opengl]: Version string: 4.1 Metal - 76.3 [2022-01-20 13:49:58][gfx]: GPU vendor: Apple [2022-01-20 13:49:58][gfx]: GPU renderer: Apple M1 Pro [2022-01-20 13:49:58][gfx]: GPU version: 4.1 Metal - 76.3
Avatar
Jupstar ✪ BOT 2022-01-20 12:51:11Z
i think when the graphic page shows modern GL it also uses it
12:51
in settings
Avatar
huh, so I should turn that off?
12:51
that's news to me
Avatar
Jupstar ✪ BOT 2022-01-20 12:51:37Z
no
12:52
i mean, bcs you said it keeps resetting
Avatar
well, it's not resetting, it's 4.1.0, successfully initialized and still uses RenderTilemap
Avatar
Jupstar ✪ BOT 2022-01-20 12:52:45Z
yeah but thats a string send by the GPU driver
12:52
i cannot control it
12:52
it can say any version it wants
12:53
thats probs the max supported GL version
Avatar
So we are not actually using opengl 4.1?
12:53
even with "Created OpenGL 4.1 context."?
Avatar
Jupstar ✪ BOT 2022-01-20 12:53:40Z
we use GL 3.3 and default 3.0 and have fallbacks for 2.1 and 1.x
12:53
did you manually set the gfx_opengl_major and minor to 4 and 1?
12:54
it should automatically never use GL 4.x
Avatar
Jupstar ✪ BOT 2022-01-20 12:54:18Z
but 3.3 is comptabile to 4.x so you can specify that yeah
12:54
well weird
Avatar
At 3.3.0 still looks fine:
12:54
[2022-01-20 13:53:59][gfx]: Created OpenGL 3.3 context. [2022-01-20 13:54:00][opengl]: Vendor string: Apple [2022-01-20 13:54:00][opengl]: Version string: 4.1 Metal - 76.3 [2022-01-20 13:54:00][gfx]: GPU vendor: Apple [2022-01-20 13:54:00][gfx]: GPU renderer: Apple M1 Pro [2022-01-20 13:54:00][gfx]: GPU version: 4.1 Metal - 76.3
Avatar
Jupstar ✪ BOT 2022-01-20 12:54:46Z
and it still uses RenderTileMap?
Avatar
ah, indeed not anymore
Avatar
Jupstar ✪ BOT 2022-01-20 13:12:45Z
I guess you could try or check compiler flags: llc -march=arm64 -mattr=help and find your CPU and floating point extension then you can use -mcpu=apple-<whatever> -mfpu=<fpu-name> -mfloat-abi=<fabi> But if you are certain your clang uses the right flags, then maybe its something different Are we using some hardware fences on macos that slow everything down for example?
13:13
Your GPU seems to be much faster than mine, so i guess thats not any bottleneck
Avatar
Avatar
fokkonaut
well, 63 actually, because the last slot is empty with a space as name to show fake chat messages by players outside of the range
Nice trick. Did you manage how to fake the scoreboard too?
Avatar
There is no -mfpu on aarch64
13:23
Scoreboard also just shows the 15 closest tees
Avatar
Jupstar ✪ BOT 2022-01-20 13:26:07Z
ok weird, can you upload a profile output without rendertilemap (@deen)
There is no -mfpu on aarch64
13:26
just want to see where its wasting so much time
Avatar
e4be3f5 Shutdown components - ChillerDragon 2c32686 Merge #4620 - bors[bot]
Avatar
Avatar
Wohoo
Nice trick. Did you manage how to fake the scoreboard too?
What deen said, scoreboard shows only 63 tees for my case
Avatar
Jupstar ✪ BOT 2022-01-20 13:30:50Z
ok, i dunno how to read that, but i assume thats just the number of calls? (@deen)
Avatar
@Wohoo, where it gets tricky is when it comes to team highlighting in combination with connected dummy. The whole client uses one single array of teams, so that means players in a team are forced to have the same id on the main as on the dummy. I made a system which provides exactly that
13:32
Otherwise when swapping between main and dummy one of them shows wrong players as highlighted
Avatar
Avatar
fokkonaut
Otherwise when swapping between main and dummy one of them shows wrong players as highlighted
Ok. Can server decide what tee shown on client scoreboard and what tee shown as in-game players? Is this possible to decide at server level?
Avatar
The server sends specific client ids (0-63) to the client, which information. Usually, the client ids that the server sends are the real client ids. In the case of 64->128, or 16->64 player support the ids are being re-used, so that they are "fake", because the client only knows about 16/64 player slots.
13:44
The scoreboard is clientside, means the client will display the information it receives from the server
Avatar
Avatar
Jupstar ✪
ok, i dunno how to read that, but i assume thats just the number of calls? (@deen)
It's a sampling profiler, so how many samples were in this code (ran for 30 seconds with 1 sample per millisecond)
13:47
so something like 25000 means it spent all its time in there
Avatar
Jupstar ✪ BOT 2022-01-20 14:00:19Z
alright, but since you removed that WaitForIdle in the benchmarks, it doesnt matter. Maybe you'll find anything, would defs be cool to see how good that chip really is :D (@deen)
so something like 25000 means it spent all its time in there
14:02
does collect points link to /players/milk on purpose?
Avatar
Jupstar ✪ BOT 2022-01-20 14:03:05Z
i think he was famous in the past
14:03
in like 2014 xD
Avatar
yeah i think linking to Points Calculation in /ranks/ would make more sense
Avatar
197a74b Link to generic /players/ page - def-
Avatar
I don't think there is anything obviously wrong with the way it's running on m1 on macos. It might actually just be the floating point performance
Avatar
Jupstar ✪ BOT 2022-01-20 14:36:00Z
i also doubt its so slow atleast as good as other laptops It uses the 5nm and has a reasonable high TDP, so there is nothing that should hold it back
Avatar
Jupstar ✪ BOT 2022-01-20 14:56:49Z
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/src/engine/client/client.cpp at 2c32686101dd7df36de842db808b78c37f86930e · ddnet/ddnet
14:58
other than that it doesnt look like any mac specific code causes problems
Avatar

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 if it works standalone, system.c especially
  • [ ] 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-addresssanitizer--u...
Avatar
Jupstar ✪ BOT 2022-01-20 15:02:58Z
but i guess that changes nothing drastically :D
Avatar
57d3407 Forgot a part of the asyncrender revert - def- 670c47f Merge #4621 - bors[bot]
Avatar
How would i go about compiling/building android client? I checked the git repo and installed the deps but when i run the script theres always some kind of error
Avatar
Jupstar ✪ BOT 2022-01-20 15:13:49Z
Are you the person that created the issue?
Avatar
(Followed scripts/android/README.md)
15:14
No
Avatar
Jupstar ✪ BOT 2022-01-20 15:14:24Z
do you use upto date ddnet repo
15:14
i fixed stuff today
15:14
u gotta rebuild the ddnet-libs
Avatar
ah yes, the libs. That may have been the problem. Where should I generate them, does it even matter? (edited)
Avatar
Jupstar ✪ BOT 2022-01-20 15:15:51Z
somewhere, just not in the source directory
Avatar
Alright, in that case, im assuming the scripts will know where i generated them?
15:17
Or do i have to specify location in main build script args or smt
Avatar
Jupstar ✪ BOT 2022-01-20 15:17:57Z
the script will output a ddnet-libs that you can manually copy into the real ones
15:18
ah yeah
15:18
scripts/android/gen_android_libs.sh /tmp/smth
Avatar
:o real ones? Where are those?
Avatar
Jupstar ✪ BOT 2022-01-20 15:18:59Z
in the ddnet source directory
15:19
Lol
15:19
Ok, thanks for your help
15:19
Will try again later
15:27
@Learath2 look they are leaking from ddner
15:27
Ddnet
15:27
monkalaugh
Avatar
maybe if it becomes more of an issue everywhere we might get some sensible action
Avatar
Most places are websites, so putting it behind cloudflare etc is enough
15:56
But now with http3 being udp, we might be able to pretend to be http3 traffic 😄
Avatar
won't help with cloudflare
17:47
it's only using http/1.1 with the backend afaik
Avatar
Jupstar ✪ BOT 2022-01-20 19:02:42Z
@deen: can you profile without waitforidle and maybe also with callgrind, i'm still interested what causes it xD
Avatar
when does tw supports quic
19:55
Significant work has gone into optimizing TCP, UDP hasn't received as much attention, putting QUIC at a disadvantage. Let's explore a few tricks that help mitigate this.
Avatar
  • Move CRenderTools::RenderTilemapGenerateSkip to CLayers::InitTilemapSkip, as it can be a private function in CLayers.
  • Add missing CLayers::NumLayers accessor.
  • Improve code style.

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 if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bou...
Avatar
Avatar
Jupstar ✪
@deen: can you profile without waitforidle and maybe also with callgrind, i'm still interested what causes it xD
callgrind is linux only
20:22
and i did without the waitforidle
Avatar
Jupstar ✪ BOT 2022-01-20 20:29:35Z
oh so it actually wastes so much time locking the mutex? thats really weird (@deen)
and i did without the waitforidle
20:30
i read that locking is slow in macos, but apparently nowadays they just do spinlocks or smth to prevent blocking as much as possible
20:30
also the other benchmark is still so fast that i kinda doubt its a problem there
20:37
atleast i wouldnt understand the graphics thread takes so much time :/
Avatar
i guess not locking the mutex, but waiting for it. That just means the graphics thread is waiting for the other thread, right?
Avatar
1810ff3 Move InitTilemapSkip to CLayers - Robyt3 6c558c2 Improve code style of InitTilemapSkip - Robyt3 e929387 Add CLayers::NumLayers - Robyt3 4791bc4 Remove unnecessary trailing semicolons - Robyt3 6d3aaae Merge #4622 - bors[bot]
Avatar
Jupstar ✪ BOT 2022-01-20 22:11:52Z
Possible. What do fps say if you turn on entities and maybe disable score and health HUD (@deen)
i guess not locking the mutex, but waiting for it. That just means the graphics thread is waiting for the other thread, right?
22:12
Normally I'd say the graphic thread is faster
22:13
Also with async render old it should only lock an unlocked mutex bcs the graphic thread additionally sets a hint, if it finished current buffer
Avatar
entities make it go from 300 to 500 fps on the Multeasymap Halloween demo
Avatar
Jupstar ✪ BOT 2022-01-20 23:23:38Z
Considering that entities also removes a bit of CPU work.. Preparing envelopes, draw calls, iterating through layers. This is still way too less. Either the gl driver sucks with something specific, like nameplates or tee rendering. Or we actually have to assume it hits some weird bottleneck (@deen)
entities make it go from 300 to 500 fps on the Multeasymap Halloween demo
Exported 165 message(s)