01:52 < bridge_> @sollybunny what ide are you on that you get these clang warnings? 02:07 < bridge_> nvm i think vs has it too, just need to configure with msvc 02:14 < bridge_> you can use clang in visual studio 04:58 < bridge_> Clangd extension in vsc 05:04 < bridge_> @mpft why did you ? me lol 05:04 < bridge_> 05:04 < bridge_> who was questioning whether you could do that 05:04 < bridge_> kebs asked how to get clang warnings 05:04 < bridge_> it's easier to just use clang than configure msvc 05:05 < bridge_> look at clang-cl 05:05 < bridge_> I never said this is the only way to do it 05:06 < bridge_> but if you want clang warnings in VS you can just get them directly, which I figured kebs might want 05:07 < bridge_> i see 05:08 < bridge_> i thought you were contesting something someone said 05:08 < bridge_> or like 05:08 < bridge_> i wasn’t sure 07:49 < bridge_> helo 08:22 < bridge_> @kebscs watch out when you give (even parts) of ip adresses: https://ipinfo.io/ips/26.254.0.0/16 08:22 < bridge_> @kebscs watch out when you give (even parts) of ip adresses: 09:14 < bridge_> why is here a maximum: https://github.com/ddnet/ddnet/blob/e55084575d8a2423575284d0a89d4b908640f898/src/game/client/components/maplayers.cpp#L1077 09:14 < bridge_> but not here: 09:14 < bridge_> https://github.com/ddnet/ddnet/blob/e55084575d8a2423575284d0a89d4b908640f898/src/game/client/components/maplayers.cpp#L1064 09:50 < bridge_> The person who wrote maplayers really must hate border checks 10:01 < bridge_> Why 10:06 < bridge_> Look at all of this lines to calculate if a layer or border is drawn: https://github.com/ddnet/ddnet/blob/e55084575d8a2423575284d0a89d4b908640f898/src/game/client/components/maplayers.cpp#L784 10:06 < bridge_> 10:06 < bridge_> This is just a rectangle inside/outside check, can't be too hard, right? 10:06 < bridge_> Look at all of this lines to calculate if a layer or border is drawn: 10:06 < bridge_> 10:06 < bridge_> This is just a rectangle inside/outside check, can't be too hard, right? 10:07 < bridge_> And a clamp 10:09 < bridge_> exactly 10:11 < bridge_> Vsc for c++ :nouis: 10:20 < bridge_> with my "exactly " I am agreeing to your "clamp" statement, answering your question mark 10:23 < bridge_> I am just curious what exactly you want to remove here. Is there some std function that can do the same? xd 10:25 < bridge_> Ah your problem is the number of lines this has 10:25 < bridge_> I see 10:29 < bridge_> What's the issue? That looks like a department of defense ip 10:44 < bridge_> @essigautomat do you only rewrite code or do you also plan to actually refactor smth, as in making using of data structures to more cleanly define a rendering pipeline 10:49 < bridge_> The line there is a bit blurry, I guess I only want to rewrite code and apply clean code standards 10:50 < bridge_> But after I am done with this we have a better base to actually introduce a new data structure 10:57 < bridge_> Alr, the whole looping over layers and counting layers to skip can be written away. 10:57 < bridge_> 10:57 < bridge_> If you go even further, split rendering into background -> physics -> foreground. 10:57 < bridge_> This defines a clean way to process the rendering and removes stupid render order bugs if the mapper places a front layer after a design layer (after game layer). 10:57 < bridge_> 10:57 < bridge_> Then you basically have a pipeline like 10:57 < bridge_> 10:57 < bridge_> RenderLayerType { 10:57 < bridge_> Tile, 10:58 < bridge_> Quad 10:58 < bridge_> } 10:58 < bridge_> 10:58 < bridge_> where you could define all properties needed per type required to render 11:21 < bridge_> @learath2 https://stackoverflow.com/questions/13722426/why-can-lambdas-be-better-optimized-by-the-compiler-than-plain-functions 11:21 < bridge_> @learath2 11:22 < bridge_> I am on my way there, we're getting there 😄 the other PR was from yesterday 11:23 < bridge_> I still need to move the GAME_LAYER Rendering to all other entities to make this clean 11:24 < bridge_> And try to patch it ugly into the normal tile layer rendering 11:24 < bridge_> And not try to patch it ugly into the normal tile layer rendering 11:24 < bridge_> And not try to patch it ugly into the normal tile layer rendering as it's currently done 11:25 < bridge_> I think that is more about passing functions into other functions. 11:25 < bridge_> 11:25 < bridge_> a static declared function should be as good as a lambda. 11:25 < bridge_> If the lambda is not inlined that it's kinda like a object on the stack (or worst case heap) 11:27 < bridge_> 😮 that confuses me a bit. 11:27 < bridge_> 11:27 < bridge_> Do you want to write a own rendering function just for game layer or what 11:27 < bridge_> Or do you mean in the looping over all layers 11:28 < bridge_> I want to generalize entity rendering, take a look how map layers renders LAYER_FRONT, LAYER_TUNE , etc and compare it to LAYER_GAME 11:28 < bridge_> Ah yeah 11:29 < bridge_> Step 1: Move Game layer to other entities 11:29 < bridge_> Step 2: Generalize the F out of them 11:29 < bridge_> only the texture for overlays and layer differs 11:30 < bridge_> In my (huge) test refactoring I split this into RenderWithBuffer and RenderWithoutBuffer and the layer with buffer just reduced to RenderTileLayer (Number) more or less 11:31 < bridge_> according to other sites and recources lambdas get trivally inlined by the compiler almost always 11:51 < ws-client> @robyt3 is the use ``std::sqrt`` in contributing.md? 11:51 < ws-client> @Assa no way you played teewars 11:53 < bridge_> That's nice to hear 11:54 < ws-client> @Assa i recently saw a video about c++ lambda inline optimization and the tl;dr is C++ bad, rust better xd https://www.youtube.com/watch?v=SqT5YglW3qU 11:55 < bridge_> why not? My cousain showed me this game when I was like 8 or 10 idk 11:55 < bridge_> Rust stays winning fr 11:56 < bridge_> simply prefer std 11:57 < bridge_> Not right now. The use of C headers should be checked in the CI already, so I think the only way to use functions like sqrtf would be to leech off of another include I think. 11:57 < bridge_> Not right now. The use of C headers should be checked in the CI already, so I think the only way to use functions like sqrtf would be to leech off of another include. 11:58 < ws-client> well if you plan to keep mentioning it in reviews it should probably go into CONTRIBUTING.md 12:02 < bridge_> in the end the code needs to be reviewed anyways, whatever you write in the contrib.md 12:03 < bridge_> I just want to point out, to not be tooo detailed 12:04 < bridge_> Makes it easier to point to an existing guideline than explain it from scratch/copy paste it each time 12:05 < bridge_> yes but please don't add every edge case ^^ Like my custom enum style which is undetected 12:05 < bridge_> What guideline do you want to add chiller? 12:07 < bridge_> yes but please don't add every edge case ^^ Like my custom enum style which is undetected (by CI, but found by Robyt) 12:17 < bridge_> Wow emscripten cmake is like the slowest thing I've ever seen 12:17 < bridge_> hello 12:18 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359110102954803434/Bildschirmaufnahme_20250408_121756.webm?ex=67f6496b&is=67f4f7eb&hm=e6514eeded16938738aca3973bec5dd8aa30b9be6dfe3a6cf90fc983575e0c33& 12:18 < bridge_> It runs since 5 minutes finding nothing 12:19 < bridge_> do you not have libc? xd 12:19 < bridge_> It's emscripten 12:19 < bridge_> It's for WASM for browsers 12:19 < bridge_> oke it's for web things right? 12:43 < bridge_> yes 12:45 < bridge_> I remembered you just removed all of the HTTP stuff, but even if I do that in addition to the smaller fixes from my PR it hangs when starting the graphics command processor. Emscripten doesn't support starting a pthread and immediately waiting for it, as the thread will only be restarted eventually when controll is returned to the event loop 12:45 < bridge_> I remembered you just removed all of the HTTP stuff, but even if I do that in addition to the smaller fixes from my PR it hangs when starting the graphics command processor. Emscripten doesn't support starting a pthread and immediately waiting for it, as the thread will only be started eventually when control is returned to the event loop 12:45 < bridge_> How is the toolchain file even read? 12:46 < bridge_> The readme doesn't include it in the cmake cmd line 12:46 < bridge_> It's included in CMakeLists 12:46 < bridge_> ```cmake 12:46 < bridge_> if(CMAKE_SYSTEM_NAME STREQUAL "Emscripten") 12:46 < bridge_> include(${PROJECT_SOURCE_DIR}/cmake/toolchains/Emscripten.toolchain) 12:46 < bridge_> endif() 12:46 < bridge_> ``` 12:48 < bridge_> `emcmake` just sets all the environment automatically so `cmake` works without additional flags 12:49 < bridge_> I see 12:49 < bridge_> How did you even debug that xD 12:49 < bridge_> For me it just casually uses like 100% CPU 12:50 < bridge_> If you press the stop button that your browser should be throwing at you then there is a backtrace in the console showing what hung 12:51 < bridge_> And it shows that it was waiting on the conditional variable either after starting the HTTP or graphics processor thread 12:51 < bridge_> Error messages where usually more readable in Chromium based browsers though 12:51 < bridge_> But I tried every change with Chromium and Firefox to make sure 12:51 < bridge_> Yeah I see, it indeed hangs in some HTTP stuff 12:52 < bridge_> I wonder how I solved that back then for graphics at least 12:52 < bridge_> You can just remove that waiting on HTTP though, it will appear to work 12:52 < bridge_> Yeah, I don't know what changed for the graphics, it looks like the same thread starting and waiting was present in the commit you linked 12:53 < bridge_> I also read the Emscripten added but then reverted some pthread feature, so maybe my version is too new now :pepeW: 12:54 < bridge_> I also had to upgrade emscripten, linking failed 12:57 < bridge_> @milkeeycat how do u do symbol resolution, do u have generics? imho thats what complicates it 12:58 < bridge_> im making a small refactor 12:58 < bridge_> I'm about to rewrite passes im my compiler xd 12:58 < bridge_> I haven't looked at the code in a while and it looks ass 12:59 < bridge_> I'll also refactor how inference is done :\ 12:59 < bridge_> https://pastebin.com/dK6tWRcr 12:59 < bridge_> i should too, the biggest problem is giving priority to some types when its ambigous 13:00 < bridge_> e.g u may not know the type yet and its a int like type, u may have a default i32 type but u need some type of weight in case another expresion is more explicit 13:01 < bridge_> I do inference by making a type problem and then solving it btw 😏 13:01 < bridge_> At least I hope that's what it does 13:06 < bridge_> Maybe SDL changed.. could try the version from back then. 13:06 < bridge_> I am surprised emscripten is still such a pain. 13:06 < bridge_> Would have thought it gets easier over time xD 13:12 < bridge_> @robyt3 Have you tried simply compiling ddnet 15 or whatever that was to check if that worked? 😄 13:15 < bridge_> That would kind of defeat the purpose of compiling the latest version for WASM, so I didn't try that yet :kek: 13:15 < bridge_> I've only tried with SDL 2.30.x because I wanted the Android/WASM library versions to be synchronized with the client on other platforms, but maybe a different SDL version would work 13:16 < bridge_> > That would kind of defeat the purpose of compiling the latest version for WASM 13:16 < bridge_> Yes, but if that would work one could do a git bisect. 13:17 < bridge_> But honestly the whole idea of emscripten is that we don't need to change our code, so it kinda has to be a bug somewhere else 13:18 < bridge_> The bug is just that Emscripten doesn't support pthreads in a POSIX conform way in which we use them, so either we need to change our pthreads usage or do one of the workarounds from https://emscripten.org/docs/porting/pthreads.html but `PROXY_TO_PTHREAD` only leads to more issues AFAICT 13:20 < bridge_> `PROXY_TO_PTHREAD` fixes the issues with HTTP and the graphics processor hanging, but then we can't use the graphics context because AFAICT it's not implemented anymore to use the canvas with proxy or it's currently broken/missing in SDL 13:57 < bridge_> ``` 13:57 < bridge_> // skip rendering if detail layers if not wanted, or is entity layer and we are a background map 13:57 < bridge_> // or the tilelayercount is 0 because of invalid data 13:57 < bridge_> // or we don't want to render 13:57 < bridge_> // or we don't want to render entities but is entity 13:57 < bridge_> // or we only want to render entities but is not entity 13:57 < bridge_> if((pLayer->m_Flags & LAYERFLAG_DETAIL && (!g_Config.m_GfxHighDetail && !(m_Type == TYPE_FULL_DESIGN)) && LayerType != LAYER_GAME) || // detail but no details 13:58 < bridge_> (m_Type == TYPE_BACKGROUND_FORCE && IsEntityLayer) || // background but is entity 13:58 < bridge_> (m_Type == TYPE_FULL_DESIGN && IsEntityLayer) || // full design but is entity 13:58 < bridge_> (!CurrentTileLayerCount && pLayer->m_Type == LAYERTYPE_TILES) || // invalid data 13:58 < bridge_> (!Render) || // we don't want to render 13:58 < bridge_> (IsEntityLayer && EntityOverlayVal == 0) || // entities, but is turned off 13:58 < bridge_> (!IsEntityLayer && EntityOverlayVal == 100)); // only show entities 13:58 < bridge_> continue; 13:58 < bridge_> 13:58 < bridge_> ``` 13:58 < bridge_> 13:58 < bridge_> :justatest: 13:58 < bridge_> we don't skip the game layer even if it's a detail layer, but we skip front for example 14:01 < bridge_> the map editor (and twmap) disallow marking physics layers as detail 14:01 < bridge_> but the renderer checks for it 14:01 < bridge_> yes this is the modified version, but the code is still there 14:02 < bridge_> then that check should probably be removed 14:02 < bridge_> while you're at that, could you please also ignore any colors from physics layers? 14:03 < bridge_> already done 14:04 < bridge_> nice, thanks :) 14:04 < bridge_> ``` 14:04 < bridge_> if(!IsEntityLayer) 14:04 < bridge_> { 14:04 < bridge_> ... 14:04 < bridge_> Color = ColorRGBA(pTMap->m_Color.r / 255.0f, pTMap->m_Color.g / 255.0f, pTMap->m_Color.b / 255.0f, pTMap->m_Color.a / 255.0f); 14:04 < bridge_> ... 14:04 < bridge_> } 14:04 < bridge_> else 14:04 < bridge_> { 14:04 < bridge_> Color = ColorRGBA(1.0f, 1.0f, 1.0f, EntityOverlayVal / 100.0f); 14:04 < bridge_> } 14:05 < bridge_> ``` 14:05 < bridge_> @patiga 14:05 < bridge_> nice 👍 14:05 < bridge_> But this was already the case in the rendering 14:05 < bridge_> at least AFAIK, the editor renders differently 14:28 < bridge_> ^Draft for now, still need to test it ingame 14:35 < bridge_> @jupeyy_keks for the other PR, what should I rename the variables? The review looks a bit funny: 14:35 < bridge_> - `Please rename this variable to Y0` 14:35 < bridge_> - `But you can't do that because it shadows the other Y0 variable` 14:35 < bridge_> 14:35 < bridge_> :kek: 14:41 < bridge_> Dunno, get creative 14:48 < bridge_> Hi hi, does anyone conveniently happen to know where the code for converting maps into a displayable thing is? Kind of like the website, for context, my goal is to make a discord bot that will display an interactive version of the .map file I give it. I'm going to be working on it either way, but if anyone just happens to know where it is, I'd appreciate being pointed in the right direction. 14:49 < bridge_> Do you mean the mappreview on the website? 14:50 < bridge_> Or the thumbnails? 14:50 < bridge_> This for example is the mappreview: 14:50 < bridge_> https://ddnet.org/mappreview/?map=Deep+Blue 14:50 < bridge_> the mappreview 14:51 < bridge_> Since you want to run it for a discord bot, I assume it runs inside a VPS? 14:52 < bridge_> yeah, that, where you can move around and stuff, I know that there is a website the loads it, so maybe I should connect it to that instead 14:52 < bridge_> `int DunnoGetCreativeY0 = ...` 14:52 < bridge_> idk, i'll look it up real quick 14:52 < bridge_> That would generally be easier, since rendering it by the bot would require your VPS to have a graphics driver loaded 14:53 < bridge_> `int DunnoGetCreativeY0 = ...` /s 14:53 < bridge_> ahhh, VPS is if I want it local or not 14:53 < bridge_> VPS here kinda means whereever the bot runs on 14:53 < bridge_> I'd defs click merge 14:54 < bridge_> yeah, the bot will run ideally on a small discord I have, not private, there is a few people 14:54 < bridge_> Well I'd suggest that your discord bot uplods the map somewhere and then you have a mappreview tool that can load a map from a given URL 14:54 < bridge_> Note that this requires to know about CORS rules 14:55 < bridge_> But other than that it's pretty straight forward 14:55 < bridge_> ahh, so I get a bot to upload a link to another site, and then you can view it from within discord? like gifs do? 14:56 < bridge_> Viewing inside discord probs not. 14:56 < bridge_> 14:56 < bridge_> But you could have a website: 14:56 < bridge_> 14:56 < bridge_> my_webpreview.com/?load=url_to_map 14:56 < bridge_> do you recommend I use something like https://ddnet.github.io/load_map.html 14:56 < bridge_> 14:56 < bridge_> or make my own 14:56 < bridge_> And then your users can click that link 14:57 < bridge_> That would work with some modification. 14:57 < bridge_> Maybe Patigas tool can already load from URLs (@patiga) 14:57 < bridge_> ahh, yeah, thats easy enough, mabye I will look at the github of the that load map.html so that I know what to do 15:05 < bridge_> yes, you can try out my map viewer. you can simply pass it an url like this: https://mapview.patiga.eu/?url=https://heinrich5991.de/teeworlds/maps/maps/Pirates%202.0_5846b3ce78cf74065035decdb128a4ed0f103015c71e5c163ca5681238672640.map 15:06 < bridge_> it should work well on desktop, less so on mobile currently 15:06 < bridge_> I'm confused why there aren't any mipmaps rn (or why they aren't getting used) 15:07 < bridge_> hmmm in twgpu code the mipmap generation is explicitly turned off on wasm, I don't remember why xd 15:08 < bridge_> Doesn't load for me at all 15:08 < bridge_> Chromium 15:08 < bridge_> oh thats really nice! I can link my map to https://mapview.patiga.eu/ in a bot, i'll figure that out, but what type of linking do you recomend? do I generate a link with the map? you used heninrich, do you remomend upload to there? I might cloge it up. 15:08 < bridge_> not a single map of mine on heinrichs server 😦 15:08 < bridge_> wayland issue or smth :p 15:08 < bridge_> Ok after 2min it finally loaded lol 15:08 < bridge_> damn okay, sounds very long o.o 15:09 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359153076698743096/image.png?ex=67f67171&is=67f51ff1&hm=39e07ac1ffe4d5abc42f1be24d9ebbc52fa30bcfb57d571927e501633f09847f& 15:09 < bridge_> Whatever that means 15:09 < bridge_> that is winit doing winit stuff 15:09 < bridge_> Now that it loaded once, it's always instannt 15:09 < bridge_> Now that it loaded once, it's always instant 15:09 < bridge_> lmao 15:09 < bridge_> hmmmm? that doesn't make sense to me 15:09 < bridge_> and sounds quite out of my control? 15:10 < bridge_> also the pirate map looks buggy, if you look at the desert tiles 15:10 < bridge_> its probably from 0.5 or smth 15:10 < bridge_> it was probably mapped with a different tileset is my bet 15:10 < bridge_> ok, so the https://mapview.patiga.eu/ is where I upload to, and I need a active weblink that contants the .map file, I might be able to make a discord file that has a link. Since when you download a file it takes you to a site. Or I could host a server, but it can't be local 15:11 < bridge_> @patiga this doesn't work `https://mapview.patiga.eu/?url=https://uniqueclan.net/static/maps/run_venice.map` (probably it's blocked) 15:11 < bridge_> currently that map preview supports loading maps from ddnet, ddnet-testing, urls and the maps that are on the server where its hosted 15:11 < bridge_> you made the url non-clickable ^^ 15:12 < bridge_> can you show me how I can look at my map in ddnet testing? 15:12 < bridge_> the website has to enable cross-origin for the preview site 15:12 < bridge_> https://mapview.patiga.eu/?ddnet-testing=KingsLeap 15:13 < bridge_> so I won't be able to upload a link that isn't from ddnet.org or ddnet-testing.org ? 15:14 < bridge_> - supports clipping 15:14 < bridge_> - framerate uhh acceptable :justatest: 15:14 < bridge_> - animations 15:14 < bridge_> LGTM 15:14 < bridge_> you would need to host some server yourself, where the maps are uploaded to. or find some file hosting service that can enable cross-origin for the preview site (I honestly have no clue about that stuff) 15:15 < bridge_> I don't think e.g. discord file links could ever work 15:15 < bridge_> ok, good to know 15:16 < bridge_> @essigautomat vsync is always enabled in the browser afaik. does the renderer not manage to satisfy your monitor's refresh rate? 15:17 < bridge_> Let's just say, the map is intensely designed :justatest: looks good, but the laptop it was rendering on was heavily reaching for new air 15:18 < bridge_> if you enable the developer console you can see the fps 15:19 < bridge_> my laptop cranks up the fans, but provides me with my 60 fps :greenthing: 15:19 < bridge_> I should probably host, since i'm broke 15:19 < bridge_> 15:19 < bridge_> So my steps to make the bot would be 15:19 < bridge_> 15:19 < bridge_> set up a server that hosts .map files and contains them in links > 15:19 < bridge_> set up a discord bot that will take the map and upload it too server, while also generation a link that has https://mapview.patiga.eu/ before the given link > 15:19 < bridge_> 15:19 < bridge_> Now whenever I upload a map, it should get uploaded to my server, then when the bot puts the https://mapview.patiga.eu/ before it, it uploads the map to the tools and previews it. 15:19 < bridge_> 15:19 < bridge_> sound good in theory? 15:20 < bridge_> `Using exceptions for control flow, don't mind me. This isn't actually an error!` 15:20 < bridge_> yes, that would work 15:20 < bridge_> though you'd need to prefix the file url with https://mapview.patiga.eu/?url= 15:20 < bridge_> the ?url= tells the map preview that it should expect a map link 15:21 < bridge_> yes it still has 60 fps ^^ 15:21 < bridge_> ahhhhh, ok, thank you Patiga and Jupstar for the help, I'll show you guys when I get it working 15:21 < bridge_> heyo boys 15:21 < bridge_> hello 15:22 < bridge_> heyo 15:22 < bridge_> (I think we need a waving tee emoji) 15:22 < bridge_> @ryozuki do your ast nodes have id? 15:22 < bridge_> 👋 :jaouis: 15:23 < bridge_> thats probably also your refresh rate? it *shouldn't* look like bad fps in that case, weird 15:23 < bridge_> I am used to 165 Hz, don't worry about it 15:23 < bridge_> @patiga how is that thing going btw? 15:23 < bridge_> :owo: 15:23 < bridge_> mobile sux xd 15:24 < bridge_> I didn't touch that project for a year or so, but mobile rendering was just completely broken 15:24 < bridge_> nope, i save stuff from ast into hashmaps 15:24 < bridge_> like function declarations et 15:24 < bridge_> etc 15:24 < bridge_> but to make it cheaper the ast uses Arcs 15:25 < bridge_> are u answering me? my question was about another thing hehe 15:25 < bridge_> or is it same 15:25 < bridge_> hm xD 15:25 < bridge_> ill dm u 15:25 < bridge_> so its limited to 60 fps even though the refresh rate is higher o.o 15:25 < bridge_> maybe if I update winit this resolves itself 15:26 < bridge_> no, there is just a heavy difference in my laptop and my PC hardware, I rarely play the game or look at maps on my laptop 15:26 < bridge_> Renders fine for me, just cannot move the map 15:26 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359157530407731220/image.png?ex=67f67597&is=67f52417&hm=cf1ec385874b1a0585d10dd85ff9024fcda4f01248e7c823e150f9fe6f021dce& 15:27 < bridge_> I can move it by zooming out and in again xD 15:28 < bridge_> The first load always takes ages tho, even in firefox 15:28 < bridge_> I think it's just the binary blob download or whatever that is slow 15:29 < bridge_> But also renders fine in fennec (mobile browser) 15:29 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359158173553922088/image.png?ex=67f67630&is=67f524b0&hm=c14ee2aa367ca1004286ca125610ec25c3d1a410eff243f2afd131486e4e7ce6& 15:30 < bridge_> Driver issues on mobile are worst tho.. probs related to that 15:31 < bridge_> the wasm module is < 3MB according to my firefox 15:32 < bridge_> Wait, what is that, Jump King? 15:32 < bridge_> KingsLeap 15:33 < bridge_> Jump King, but in DDNet 15:33 < bridge_> not a rebuild, but inspired by it :3 15:33 < bridge_> I like pretty maps so I'm very interested 15:34 < bridge_> it's in map review rn, you can play it on the testserver 15:37 < bridge_> it's the snow on top, that is a bit hard on the rendering, due to the many steps in it's animation ... 15:37 < bridge_> it's the snow on top, that is a bit hard on the rendering, due to the many steps in it's animation ... but I am impressed how good that browser-renderer works 15:38 < bridge_> I am pretty sure my phone is faster than most intel laptops anyway 15:38 < bridge_> the iGPUs simply suck ass xD 15:38 < bridge_> @jupeyy_keks yea the touch controls are broken and if you zoom around, at some point everything becomes very pixelated 15:38 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359160591390085243/Screenshot_20250408-153804_Fennec.jpg?ex=67f67870&is=67f526f0&hm=1d83d2ba995644788cb595e421cb1d49c088adec2116784c966d61a9c5f76a9c& 15:39 < bridge_> @patiga I'd activate some low level antialiasing then 15:39 < bridge_> before zooming around, it isn't pixelated 15:39 < bridge_> @patiga I'd activate some low level antialiasing then (like potato level aliasing) 15:40 < bridge_> something breaks somewhere, maybe logical/physical canvas size handling 15:41 < bridge_> wtf why is the top-left most grass tile not pixelated, but all the others 15:42 < bridge_> the black line around the sun is also weird 15:42 < bridge_> looks like it's only rendered properly on the left side, the background above is also fine left 15:42 < bridge_> yes, super weird 15:43 < bridge_> as if the sampler is suddenly switched from bilinear to nearest-neighbor 15:44 < bridge_> but its in the same pipeline 15:44 < bridge_> and half the screen should also be in the same primitive triangle covering the screen 15:45 < bridge_> though "half the screen" could break if there is physical/logical size stuff going on 15:45 < bridge_> also maybe on mobile devices it might sometimes try to zoom the webpage, honestly not sure how to handle that 15:46 < bridge_> but honestly I don't want to touch that code. I don't enjoy fiddling with html/css 15:46 < bridge_> I might just update winit to see what that does 15:46 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359162585127326000/image.png?ex=67f67a4c&is=67f528cc&hm=57247fe3fe4b7ca760c3477e10cd914a310eb5bbc7de6d1f664200e0d1d28cc4& 15:46 < bridge_> ok i checked 15:46 < bridge_> 120 fps with phone 15:47 < bridge_> matches phone's refresh rate 15:48 < bridge_> I loved the usb firefox debugging. is that inside the app? 15:48 < bridge_> You have to enable it in the about:config settings 15:48 < bridge_> https://hacks.mozilla.org/2012/08/remote-debugging-on-firefox-for-android/ 15:48 < bridge_> I followed this guide 15:48 < bridge_> ah its also remote? 15:48 < bridge_> Yes 15:48 < bridge_> scrcpy to mirror the phones screen 15:49 < bridge_> and then a normal firefox instance on the right 15:49 < bridge_> noice 16:07 < bridge_> The map has something in the range of 5K to 10K quads, and you render it on your phone with 120 fps, I am actually impressed but reminded 16:11 < bridge_> twgpu is pretty good in quad rendering 16:11 < bridge_> it calcs everything on the gpu 16:11 < bridge_> You can greatly GREATLY improve performance, if you set clip regions for quad layers 16:12 < bridge_> and maybe I'll look into automatically setting clip regions on map init 16:12 < bridge_> because you can skip a lot of quads with an outside of region check 16:14 < bridge_> @patiga this would maybe be a good enhancement on the ddnet bot map check: if a quad layer has more then, idk, 100 quads, make the mapper set a clip region 16:15 < bridge_> I keep forgetting, that clip regions are for groups and not layers -._ 16:15 < bridge_> I keep forgetting, that clip regions are for groups and not layers -.- 16:37 < bridge_> ```rust 16:37 < bridge_> trait A { 16:37 < bridge_> fn ex(value: T) -> Self; 16:37 < bridge_> } 16:37 < bridge_> 16:37 < bridge_> struct B { 16:37 < bridge_> x: T 16:37 < bridge_> } 16:37 < bridge_> 16:37 < bridge_> impl A for B { 16:37 < bridge_> fn ex(value: T) -> Self { 16:37 < bridge_> Self { 16:37 < bridge_> x: value 16:37 < bridge_> } 16:37 < bridge_> } 16:37 < bridge_> } 16:37 < bridge_> ``` 16:37 < bridge_> @milkeeycat havent done it yet, but i think ill try to do generics with impl trait generics too, where the impl can be generic too 16:37 < bridge_> its a bit complex tho 16:38 < bridge_> lemme know when it will be done so I'll try to find ways to break it :kek: 16:38 < bridge_> xd 16:38 < bridge_> lemme know when it's done so I'll try to find ways to break it :kek: 16:38 < bridge_> the main problem ehre is that type names may have generic types which are valid types or still placeholder generic type names 16:39 < bridge_> the main problem here is that type names may have generic types which are valid types or still placeholder generic type names 16:39 < bridge_> mix 16:39 < bridge_> mixed 18:25 < bridge_> @jupeyy_keks @learath2 can you checkout #10040 I get a segfault in ingame testing and I have trouble debugging this 😦 18:25 < bridge_> https://github.com/ddnet/ddnet/pull/10040 18:28 < bridge_> and the PR where I wrote it's controversial works perfectly fine oO 18:35 < bridge_> where does it segfault 18:36 < bridge_> My debugging in general is not working rn, I am trying to find this out. I load into a map, spec and view a mapborder 18:39 < bridge_> somewhere in `RenderTileBorder` 18:40 < bridge_> somewhere in `RenderTileBorder`, borders section 18:42 < bridge_> did u ran asan? 18:42 < bridge_> assan 18:43 < bridge_> dw ill debug for u 18:43 < bridge_> Assan 18:45 < bridge_> ``` 18:45 < bridge_> attempting double-free on 0x752e667a0800 in thread T0: 18:45 < bridge_> #0 0x5fde93696481 in operator delete[](void*) (/home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet/build_asan/DDNet+0x16d7481) (BuildId: 630c5410e8d020046490224d944475e0fe4a8582) 18:45 < bridge_> #1 0x5fde93ec75bf in CMapLayers::STileLayerVisuals::~STileLayerVisuals() /home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet/src/game/client/components/maplayers.cpp:197:2 18:45 < bridge_> #2 0x5fde93edc568 in CMapLayers::RenderTileBorder(int, ColorRGBA const&, int, int, int, int)::$_0::~$_0() /home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet/src/game/client/components/maplayers.cpp:880:20 18:45 < bridge_> #3 0x5fde93edbb1f in CMapLayers::RenderTileBorder(int, ColorRGBA const&, int, int, int, int) /home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet/src/game/client/components/maplayers.cpp:953:1 18:45 < bridge_> #4 0x5fde93ed9cc8 in CMapLayers::RenderTileLayer(int, ColorRGBA const&) /home/jupeyy/Schreibtisch/Teeworlds/DDNet/ddnet/src/game/client/components/maplayers.cpp:866:3 18:45 < bridge_> ``` 18:45 < bridge_> it crashes in the lambda at 18:45 < bridge_> ``` 18:45 < bridge_> dbg_msg("debug", "maplayer borders render call"); 18:45 < bridge_> Graphics()->RenderBorderTiles(Visuals.m_BufferContainerIndex, Color, pOffset, Offset, vec2(ScaleX, ScaleY), DrawNum); 18:45 < bridge_> ``` 18:45 < bridge_> I don't understand why tso 18:46 < bridge_> oh maybe later, I can't confirm my call 18:46 < bridge_> bcs 18:46 < bridge_> ~STileLayerVisuals 18:46 < bridge_> u dont capture by fef 18:46 < bridge_> crashes on destructor 18:46 < bridge_> ref 18:46 < bridge_> [this, Visuals, Color] 18:46 < bridge_> `[this, Visuals, Color]` 18:46 < bridge_> ooohh 18:48 < bridge_> thank you, idk in my mind I assumed this was always by ref 18:49 < bridge_> C++ lambdas 18:49 < bridge_> wait until ryo reads this and tells you that cpp is hard 18:49 < bridge_> tbf, he would be right, it's hard, even experts fail on it time to time 18:58 < bridge_> thanks @jupeyy_keks ❤️ updated the branch, tested it with vulcan & opengl 1.4 19:00 < bridge_> it's like the german word, Vulkan 19:00 < bridge_> the english word is vulcano anyway 19:00 < bridge_> the english word is volcano anyway 19:01 < bridge_> :brownbear: 19:01 < bridge_> mfw he amends his mistake 19:02 < bridge_> Assa is german, that's why it's important 19:02 < bridge_> He has to join the few german word culture 19:02 < bridge_> few internationalized german word culture* 19:02 < bridge_> xd 19:10 < bridge_> at this point I don't speak german nor english, I speak denglisch & memes 20:18 < bridge_> Seems jupstar already figured it out 20:47 < bridge_> @essigautomat: rossbit said he wants std::sort in the review. I think it is good to have it in contributing.md so pr authors can check contributing.md them self to increase merge times and reducing back and forth with maintainers. It also helps to agree on code standards to pick the best one and make sure different maintainers still represent the same opinions. 20:48 < bridge_> DECReASE MeRGE TiMEs\* 21:34 < bridge_> chiller you can review my commits even now without being mainatiner 😄 21:34 < bridge_> reviews also give green boxes 23:37 < ws-client> i dont review much which is why i also wouldnt be a too useful maintainer 23:37 < ws-client> @kebscs do you want me to look at anything particular? 23:39 < ws-client> @jxsl13 thanks for maintaining the secret closed source ddnet-insta backdoor git patches but they are still annoying they keep failing to apply and causing slower build times and dirty working trees and so on 23:39 < bridge_> 😢 23:40 < ws-client> could you move them to https://github.com/ChillerDragon/antibob ? I think it should be possible technically. I can also give it a try if you dont wanna mess with AB 23:41 < bridge_> im confused 23:41 < bridge_> that's closed source backdoors 23:41 < bridge_> and this is an open source bob 23:42 < ws-client> xd 23:42 < ws-client> yea the idea is to move it away from patches to the antibot module which is closed source anyways 23:43 < ws-client> so move these https://gitlab.com/ddnet-insta/patches into https://github.com/ddnet-insta/antibot-insta which is a fork of antibob 23:43 < ws-client> then you no longer have to maintain the patches and i have less pain too 23:43 < bridge_> not anything in particular 23:44 < bridge_> just prs sit for weeks no review/merge 23:44 < ws-client> @kebscs none of your prs peek my interest sorry 23:44 < ws-client> but yes i know the struggle 23:44 < ws-client> go help me to lobby in a new maintainer 23:44 < bridge_> 😂 23:44 < bridge_> hmmm 23:44 < ws-client> makes sense @jxsl13 ? 23:46 < bridge_> does it require access to the private repo? 23:46 < bridge_> Idk who was talking about approximating sinx but I wanted to experiment a little myself. 23:46 < bridge_> First image is comparing the error function of a 7th order taylor series approximation (red line) with a 7th order chebyshev polynomial approximation. As you can see the chebyshev polynomials not only have a more uniform error within the domain but slightly worse error close to 0. 23:46 < bridge_> The second image is comparing 3rd order approximations, purple is taylor, green is chebyshev. The thing to note here is that green is already pretty decent at 3 terms. 23:46 < bridge_> Finally the third image is comparing 5th order ones, black is taylor, orange is chebyshev. Point is that orange is pretty much exact at this point, but at the edges of the domain black is far off. Chebyshev polynomial approximations converge much quicker. 23:46 < bridge_> 23:47 < bridge_> And this is very naive still, with access to a fast division on your target, you can get much better approximations without adding many terms by dividing two small polynomials 23:47 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359283389408219326/image.png?ex=67f6eace&is=67f5994e&hm=529a41b8eebde13acdf2c559734a0b4b1210434f39c991acef469f3e46078678& 23:47 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359283389722657031/image.png?ex=67f6eace&is=67f5994e&hm=a0741c2bdb6a7050398af9e0a8b54ae962810a518d20b74d6b1132a09aed215e& 23:47 < bridge_> https://cdn.discordapp.com/attachments/293493549758939136/1359283389978640484/image.png?ex=67f6eace&is=67f5994e&hm=a85716c9bf90830c8670b73a6f9544a69799befa3f7cc4737405c62b98466a22& 23:47 < bridge_> kinda doubt, i'm capable if adding that. but might give it a try. 23:47 < ws-client> ideally not i already got some really juicy secret sauce in the antibot, thats why antibob includes as much code as possible and is pretty close to the closed source version minus the interesting parts 23:48 < ws-client> @jxsl13 i mean the whole backdoor thing is your baby so i was hoping you are hyped about it but i understand asking for a pr in a repo you dont have access to is kinda weird 23:48 < ws-client> i can also do it if you say you dont want to 23:50 < bridge_> it's heino's bastard child that I am raising 23:50 < ws-client> i see 23:50 < bridge_> D: 23:50 < ws-client> ill give it a go then 23:52 < bridge_> I mean 23:52 < bridge_> I asked heino to have that illigitimate child 23:52 < bridge_> ._. 23:52 < bridge_> @robyt3 did u try an old sdl version now btw? 23:56 < bridge_> I also did the full period, most libcs seem to only handle `[0, pi/4]` and a small angle approximation, returning just x if x < some value. (2^-27 radians for uclibc) 23:58 < bridge_> is it possible to have multiple anti bob modules running at the same time? 23:58 < bridge_> Nope 23:58 < bridge_> no, I'll try tomorrow 23:58 < bridge_> hm, well, then probably no backup league servers