04:10 < bridge> i have dummy connect added to my swap keybind so i can just swap and it connects 04:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314428835353198663/image.png?ex=6753bcbf&is=67526b3f&hm=795243a44239cd3e9361e275bf92391648165c36fbeccbf588a99c7c28ad74e0& 04:11 < bridge> it does however spam console which is a bit annoying 04:40 < bridge> demos are not teeworlds datafiles right? 06:24 < bridge> I did? 06:24 < bridge> oh didnt... commit anything 06:40 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314466567857242142/image.png?ex=6753dfe3&is=67528e63&hm=a4f378ff4c33d4e19a5203c4926fe8e0b2a8929ce7afbf366d844ce95037cab9& 06:41 < bridge> probably... should be a timeout on that 06:45 < bridge> wait no fucking way Localize is preprocessed by a python script 06:45 < bridge> 😢 06:49 < bridge> it's been like that since teeworlds i think 06:51 < bridge> surely it can just be a plain function 06:51 < bridge> wdym 06:51 < bridge> maybe inline stuff to make it figure out a hash 06:51 < bridge> Localize is a function 06:51 < bridge> it gets replaced by python? 06:51 < bridge> no? 06:51 < bridge> the script just pulls the string from the source code and put them in txt files 06:52 < bridge> ah okay thats fine 06:52 < bridge> :blobfacepalm: 06:52 < bridge> xd 06:52 < bridge> ~~at least question our code gen for network.py first~~ 06:53 < bridge> i already did that 06:53 < bridge> :kekw: 06:53 < bridge> but tbf code gen is pretty common tho 07:11 < bridge> how tf does `std:vector::embrace_back` crash 07:11 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314474210118340669/image.png?ex=6753e701&is=67529581&hm=1f8b821e1a78796cbcbf9c663774d78e4d8ce2d74519a8966a52285b2e3f2de6& 07:14 < bridge> you can make any memory access crash with enough effort. 07:18 < bridge> ah 07:19 < bridge> some LoadPng is threaded and if the texture produces warnings the string vector can crash 07:19 < bridge> probably race condition? 07:30 < bridge> I couldn't comment on security implications of this because I'm not qualified, but I have a hunch that this is not good for security? 07:30 < bridge> the threaded load for community icons are remote after all 07:31 < bridge> :greenthing: 07:39 < bridge> nah, i'm not adding mutex myself, i'll probably mess it up somehow. 07:39 < bridge> i should make lunch and do my own project probably 09:49 < bridge> @sollybunny 09:50 < bridge> afternoon 09:50 < bridge> You can write a script that just sends a broadcast every 3600 seconds that I specify 09:50 < bridge> ? 09:50 < bridge> edit it urself :D 09:51 < bridge> I won't be able to:( 09:51 < bridge> skill issue 09:51 < bridge> ask chatgpt 09:51 < bridge> My script no work 09:51 < bridge> It does not give out correctly 09:57 < bridge> <♂S1mple♂> Then learn the programming language and do it 09:57 < bridge> <♂S1mple♂> Or at least pay someone to do this silly stuff 09:58 < bridge> <♂S1mple♂> Weird how long chiller was doing this for free 10:00 < bridge> <♂S1mple♂> I would understand if you'd try to do something, ran into issue and specified it here, but asking debugging ai code or asking doing from scratch for free is just not polite 10:20 < bridge> this makes me so mad 10:20 < bridge> welcome to c++ 10:21 < bridge> :nouis: 10:30 < bridge> any bug like that is potentially a problem. an attacker just has to find a way to abuse it 10:30 < bridge> i wanted to fix it, but i'm bored 10:31 < bridge> i just wait for ryo to pop up telling me it wouldn't have happened with rust 10:31 < bridge> 10:31 < bridge> back when ryo had no gf, it took -15 seconds for him to say it 10:32 < bridge> he basically spammed that the whole day and once someone opened an issue, he could say: SEE 10:32 < bridge> i'm still strugging with shader depth 10:32 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314524866048823347/image.png?ex=6754162e&is=6752c4ae&hm=4e0611887338c389e60ec46ba401cf7cc98b50b8d4213bc80d37574bdb8c767b& 10:32 < bridge> what is your problem 10:34 < bridge> isn't blender one of these mfckers that use z as up coordinate 10:34 < bridge> im sorry to inform you its not just "One of" 10:34 < bridge> not that z 10:34 < bridge> it was actually minecraft who lied 10:34 < bridge> that should be illegal 10:35 < bridge> i agree 10:35 < bridge> if you tell me what your problem is, i might be able to give you a gpt like answer that sounds good but does not help at all 10:35 < bridge> not if you use cryengine 10:35 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314525672311623782/1_IWv0KVHPnf_xxL05Vh7oVQ.webp?ex=675416ee&is=6752c56e&hm=bf6f6163bb7e006e3e278fac383a0decd7cebb34342a0807fc04b05ea47d3e15& 10:35 < bridge> the real illegal one is unreal 10:36 < bridge> hm, I'm left handed :kek: 10:36 < bridge> i was tought in school z up and it screwed with me 10:36 < bridge> (im right handed btw) 10:36 < bridge> gotta use Unity, then 10:36 < bridge> no way 10:36 < bridge> u american? 10:36 < bridge> or where do they teach you that 10:36 < bridge> bri'ish 10:37 < bridge> a level further maths 10:37 < bridge> i'm trying to get a screenspace depth value manually by transforming a vertex position from view space to clip space. but the result doesn't match godot's result of depth value 10:37 < bridge> impressive 10:37 < bridge> ~~i dropped it i just wanted to feel cool~~ 10:38 < bridge> the application problem is that i want to try to make a inverted hull outline to separate between objects somehow, i haven't math'ed that part out tho 10:39 < bridge> otherwise it does this 10:39 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314526545280503848/image.png?ex=675417bf&is=6752c63f&hm=9fcc80a5651affd28505d3dfc557e7366e24af965153db2dca996be6a947b094& 10:39 < bridge> woaw 10:39 < bridge> tw tee has a leg 10:39 < bridge> its not just disembodied feet confirmed 10:39 < bridge> its not just disem~~bodied~~leggied feet confirmed 10:39 < bridge> still is, it's just the hull clipping into the body 10:40 < bridge> do you have an output of the value itself to compare it against what godot's output or smth. 10:40 < bridge> 10:40 < bridge> sometimes they flip the coordinate systems 10:40 < bridge> it's hard to check values for shader, i haven't dig through godot's code yet, so i should just do that 10:41 < bridge> what are you doing with the depth value 10:42 < bridge> good days 10:42 < bridge> can't you do that with a stencil just as fine? 10:42 < bridge> godot doesn't have stencil yet 10:42 < bridge> WAAT 10:42 < bridge> godot doesn't have Z offset either, which is pretty easy to do in unity lol 10:43 < bridge> wat 10:43 < bridge> well they do have stencils but only internally 10:44 < bridge> https://github.com/godotengine/godot/pull/60650 10:44 < bridge> sometimes there's some operation you need to do to linerize the depth 10:44 < bridge> cant u do it with this 10:44 < bridge> render priority 10:44 < bridge> idk if that's relevent for you 10:45 < bridge> https://github.com/eldskald/godot4-cel-shader 10:45 < bridge> hehehe 10:45 < bridge> https://github.com/eldskald/godot4-cel-shader/blob/main/src/outline.gdshader 10:45 < bridge> if i want to put the outline behind everything probably. currently i'm using depth so rendering order does not matter. 10:48 < bridge> that's just the hull with the grow width pre calculated in view space 10:48 < bridge> same thing 10:48 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314528918505525310/image.png?ex=675419f4&is=6752c874&hm=9bc1dac67f52be0067eacf00bf592a5ddad3b24be7e510973c75f67acb9cf086& 10:49 < bridge> the thing you want doesn't really sound possible? 10:49 < bridge> it is in unity, i've done it 10:49 < bridge> how are you supposed to know if the outline is behind or in front of something in an order-indepedant way? 10:49 < bridge> depth comparison, i just need to shift depth a bit 10:50 < bridge> depth comparing what to what 10:50 < bridge> but godot doesn't let you do that, so i'm hard writing into depth manually 10:50 < bridge> using a shifted depth value compared to the value in the depth buffer... 10:51 < bridge> but isn't there always going to be some depth where the clipping happens? 10:51 < bridge> yes, but i just need to shift it a little bit so it is not this blatant. :justatest: 10:53 < bridge> but if you offset it forward the ones that are behind stuff will be in front 10:53 < bridge> look, i've already done it in unity in a commercial product. i'll just try a bit more and if it doesn't work out i'll use post process or some other way. 10:53 < bridge> it will look like this? 10:53 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314530159524839464/image.png?ex=67541b1c&is=6752c99c&hm=6be78774bc30588f49d3c8a2f76450ea54df7bc5cc8493666d68610d6890e344& 10:53 < bridge> no 10:53 < bridge> no? 10:53 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314530261689438230/image.png?ex=67541b35&is=6752c9b5&hm=1b1aa68d6d9ba1b7628532f55015abed37210ef798035d01074a21848f0f0044& 10:53 < bridge> it will look like this 10:54 < bridge> ignore the color 10:54 < bridge> ddnet 3d update? 10:54 < bridge> doesn't it require sorting to do it that way tho? 10:54 < bridge> Ddnet 3d before GTA 6 gg 10:55 < bridge> TEEWORLDS VR 10:55 < bridge> i'd be so down bad for 3D ddnet 10:55 < bridge> guys, 3d rendering stopped sorting opaque objects since like forever. 10:55 < bridge> :justatest: 10:55 < bridge> Twinbop 3D 💥 10:55 < bridge> :twinbop: 10:56 < bridge> twinbop with boobs:poggers2: 10:56 < bridge> smh 10:57 < bridge> :greenthing: 10:58 < bridge> so does it work already or what is this screenshot? 10:58 < bridge> i moved the feet forward to show what i want 10:59 < bridge> :kek: 10:59 < bridge> idk how you can use just the depth buffer and the depth of the outline hull to figure out the render order without sorting, it sounds impossible 11:00 < bridge> i think he simply wants to create a second mesh moved a bit further into the back 11:00 < bridge> or not? 11:00 < bridge> xd 11:00 < bridge> he's doing that already, the issue the second mesh clips into the other ones 11:00 < bridge> I am going to LOSE MY MIND 11:00 < bridge> kinda but in screen space 11:01 < bridge> I have been at this for FIVE HOURS 11:01 < bridge> hence shader 11:01 < bridge> he's doing that already, the issue is the second mesh clips into the other ones 11:02 < bridge> I'm passing around a `([String], ((Int, Int), (Int, Int)))` because I'm not allowed to have proper state 11:03 < bridge> what is the intended behavior when the foot is intersecting the tee body, will the outline render above or below the tee? 11:03 < bridge> You know it's bad when your data types look like lisp 11:04 < bridge> yes, then i'd expect an output like 11:04 < bridge> https://discord.com/channels/252358080522747904/293493549758939136/1314528918514171949 11:04 < bridge> 11:04 < bridge> but if you don't get that, i assume you should compare if the screenspace coordinates are flipped again or smth. 11:04 < bridge> can't you like print the projection matrix and look if z is negative scaled or not 11:04 < bridge> Thanks functional programming, very cool 11:04 < bridge> i can't print in godot shader 11:05 < bridge> is there no renderdoc like debugger? 11:05 < bridge> I mean, destructuring that mess would be really easy if I was allowed to use pattern matching, but then I'd be binding variables, and that's a no no around here 11:05 < bridge> the renderdoc-like debugger is renderdoc 11:05 < bridge> i actually never knew how to print shader stuff. i only used renderdoc as a profiler before 11:05 < bridge> godot doesn't have built-in graphic debugger 11:05 < bridge> do any engines? 11:06 < bridge> how can they have 3 quadrillion contributors but not have smth like this xd 11:06 < bridge> unity has a frame analyzer that shows you buffers in each draw call and the uniform values 11:06 < bridge> that's pretty basic 11:06 < bridge> but godot has none 11:07 < bridge> I don't know of any engines that do anything close to what renderdoc does, I think you just use renderdoc 11:07 < bridge> yes 11:08 < bridge> you can still do visual debugging by outputting colors 11:08 < bridge> i am doing that 11:08 < bridge> This is a weird artifact, how did this happen 😄 11:08 < bridge> what artifact 11:09 < bridge> there is no artifacts, inverted hull just looks like that :brownbear: 11:10 < bridge> Ooooh, I see what's going on there 11:11 < bridge> just emulate a stencil yourself 11:11 < bridge> just rewrite godot at that point 11:12 < bridge> i think using stencil usually looks like this tho. 11:12 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314534913692667904/image.png?ex=67541f8a&is=6752ce0a&hm=353da7a3e9659f73dfb316717d4fda57fd9e89ec9b4fd945736de6b622ad87e7& 11:12 < bridge> So you are trying to fix this by messing with the depth buffer by hand? 11:12 < bridge> yep 11:13 < bridge> I guess that does sound doable, you should be able to just pull out the outline and render it in front of the tee closer to the camera 11:14 < bridge> Though idk how you'd hide the pieces that are supposed to be behind the solid parts like that though 11:14 < bridge> A curious problem, I wish you many luck 11:17 < bridge> i'm trying to shift depth towards object's local origin but without going over the hull growth length. 11:17 < bridge> just fireup renderdoc already 11:17 < bridge> so origin in front = outline more likely in front 11:17 < bridge> :pepeW: \ 11:17 < bridge> :pepeW: 11:18 < bridge> i've done nothing in the past 10 minutes, i'm just here chatting 11:18 < bridge> i will 11:18 < bridge> 11:19 < bridge> But the output here matches the exact shader? 11:19 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314524866048823347/image.png?ex=6754162e&is=6752c4ae&hm=4e0611887338c389e60ec46ba401cf7cc98b50b8d4213bc80d37574bdb8c767b& 11:19 < bridge> it is the shader yes 11:20 < bridge> Help 11:20 < bridge> i already don't understand how e.g. ungrow works. is it used somewhere magically? 11:21 < bridge> no 11:21 < bridge> it's just me trying stuff without deleting old stuff 11:21 < bridge> the actual shader in that screenshot is like 4 lines 11:21 < bridge> probably don't read into it too much 11:22 < bridge> i honestly don't understand your shader at all xD 11:22 < bridge> if you are wondering, this is literally inverted hull 11:22 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314537387254349835/image.png?ex=675421d8&is=6752d058&hm=04d449642837eabfebd05ea71f20cb48c5bc3963164f76b99bbe56f64acce8ca& 11:22 < bridge> so this is the shader in that screenshot 11:22 < bridge> wait, not that one 11:22 < bridge> oops 11:22 < bridge> but why is the projection matrix not fired in the vertex shader 11:23 < bridge> it was already done by godot, you just need to shift it 11:23 < bridge> oh ok 11:25 < bridge> i am surprised about the shader output tho 11:25 < bridge> maybe your problem lies somewhere else xd 11:25 < bridge> And it's normal that my server doesn't show the path of the grenade projectile , there's just a shot and then a second later the arrival 11:25 < bridge> it's not really a problem 11:25 < bridge> i'm just trying things 11:25 < bridge> the clipping is expected for inverted hull method 11:25 < bridge> pretty common 11:27 < bridge> burh, i could just shift fragcoord.z, what am i doing 11:27 < bridge> so 0.001 is still too big or what 11:27 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314538815523917884/image.png?ex=6754232c&is=6752d1ac&hm=41b5b6948773dca4103b5d318f83fed52443aa41b903d24c49524b3a7bba3831& 11:28 < bridge> hot 11:36 < bridge> @tsfreddie are the normals multiplied with the inv projection matrix btw? 11:36 < bridge> 11:36 < bridge> or how does that work 11:36 < bridge> NORMAL is in model space 11:37 < bridge> would that need to be in screenspace too xd 11:37 < bridge> wouldnt 11:37 < bridge> VERTEX is also in model space i think. it get's converted into view space later by godot 11:37 < bridge> 😮 11:38 < bridge> > inout vec3 VERTEX Vertex in local coordinates. 11:38 < bridge> https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/spatial_shader.html 11:38 < bridge> it is in view space in frag 11:38 < bridge> > in vec3 VERTEX 11:38 < bridge> > 11:39 < bridge> > Vertex that comes from vertex function (default, in view space). 11:40 < bridge> if you really don't want engine to do that, there's a flag for it `skip_vertex_transform` 11:40 < bridge> It's really sad how the brain forgets about lots of stuff xd 11:40 < bridge> i did all the 3d math once 11:41 < bridge> i don't actually do 3d math i think.... 11:41 < bridge> turn this to true.. 11:41 < bridge> 11:41 < bridge> Then you can do all the math 11:41 < bridge> ok u get all the matrices as globals 11:41 < bridge> boring xd 11:42 < bridge> at this point is just what space it is in, what do i want to do to it. i don't calculate anything mentally anymore. 11:45 < bridge> mat4 is for converting spaces, dot for checking direction differences, cross for getting an axis from two vectors, how they do it? no idea. what's the result? doesn't matter, i'll just plug them in and see. something doesn't look right? probably cuz i forgot a normalize somewhere.:kek: 12:13 < bridge> WOOO :Celebrate: 12:15 < bridge> I CAN DO BETTER 12:16 < bridge> I have the same problem! 12:16 < bridge> im setting a uniform per model to tell them the body's center. so i can shift depth just in front of or behind the body's sphere 12:16 < bridge> 12:18 < bridge> The dummy debug print update is quite nice and useful. But having no way to turn off the intense spam of a shared connect/swap bind is horrible. @sollybunny I was thinking of adding a connect\_dummy\_if\_not\_connected 12:18 < bridge> custom command to my client to solve it, 12:18 < bridge> aRe YoU ScArEd Of PRing CoFiG? 12:18 < bridge> I have the same issue for binding the exec command that also prints to the console. So I can not use it for some common binds 12:27 < bridge> How to speed up the level completion timer? 13:00 < bridge> can anyone answer me where located enums like "PLAYERFLAG_PLAYING" i found it only in build folder in generated folder. 13:00 < bridge> some python scripts 13:01 < bridge> search for PLAYING maybe 13:01 < bridge> hm, okay 13:04 < bridge> Should be in network.py 13:05 < bridge> yep, `datasrc/network.py:L7 PlayerFlags = ["PLAYING", "IN_MENU", "CHATTING", "SCOREBOARD", "AIM"]` 13:06 < bridge> dont we have 6 flags now 13:06 < bridge> :nouis: 13:07 < bridge> **insert fitting insult for my boss here** - brb 3hours, i actually need to do shit 13:07 < bridge> probably is getting reverted 13:07 < bridge> yes please. :kek: - dont want to hate on your work but playerflags are so damn precious 13:08 < bridge> tatar was thinking on some other ways to fix that coordinate switch 13:08 < bridge> We have 6 now? 13:08 < bridge> i used one 13:08 < bridge> What for? 13:09 < bridge> thanks 13:10 < bridge> #9318 13:10 < bridge> https://github.com/ddnet/ddnet/pull/9318 13:15 < bridge> it's crazy that i didn't think of that 13:15 < bridge> tbf if they are so valuable we'd have invented a way to add more of them 13:16 < bridge> there is a server to client only EXPLAYERFLAGS 13:16 < bridge> they are pretty much useless given we didn't use one in almost a decade 😄 13:17 < bridge> i only used it cuz it is just tied to the input which is kinda needed for that fix 13:18 < bridge> I remember investigating this one in the past and just deciding it was too much hassle to fix properly 13:18 < bridge> But IMO the proper way is to use an input flag, the entire issue is because spec state is not properly tied to input state 13:19 < bridge> i thought playerflag is a inputflag 13:19 < bridge> yes 13:19 < bridge> I just didn't use the correct terminology 13:20 < bridge> i think the point is that we don't want to use it 13:21 < bridge> Do we really not want to use it? We control both the client and the server nowadays, we can just bump up the size of the playerflags somehow, I'm pretty certain 13:22 < bridge> In the olden days it was a huge issue because we didn't control the client 13:22 < bridge> How to speed up the level completion timer? 13:22 < bridge> i think people are trying to find a better use for it before we commit to using up another bit 13:22 < bridge> also it messes up bot detection for now 13:22 < bridge> eh, bots who used playerflags for secret communication are a veeery 0.5 thing 13:22 < bridge> Hey 13:23 < bridge> Play faster? I don't understand what you want 13:23 < bridge> I wanna to make timer go faster 13:24 < bridge> funny thing is that with that pr noby servers straight up bans you. although i'm sure they can just fix it on their end. 13:24 < bridge> You can't without some very complex modification of the client and the server 13:24 < bridge> I saw map which make timer go from 5 seconds to 20 mins 13:25 < bridge> Did Tater have any ideas on how he'd fix it without using up a flag? 13:25 < bridge> We have an "add time" tile you can use 13:25 < bridge> It won't go faster but it will add some time to the timer 13:25 < bridge> we discussed a bit, i think there was a idea of sending a tick info along with the camera state using a netmessage 13:25 < bridge> Aaaa 13:25 < bridge> Ok 13:26 < bridge> my thought is that might be network dependent, i believe netmessages are different packets? 13:26 < bridge> Mhhhhhhhh, you hit the age old issue of snaps/inputs not being synchronized to netmessages at all 13:26 < bridge> there also might be a client side method hidden some where 13:27 < bridge> (The entire issue is this btw, the netmsg that puts the client into spec is not properly synchronized to the input/snaps) 13:27 < bridge> Then u need to configure both server and client? To make timer go faster 13:27 < bridge> Recompile 13:28 < bridge> Not just configure. You need to write a lot of code to modify that kind of stuff 13:28 < bridge> Server and client? 13:29 < bridge> oh also i think i had an idea of always using a single target space somehow 13:29 < bridge> I think so, but I'm not sure, I didn't ever try it before 13:29 < bridge> Server definitely 13:29 < bridge> like if your tee exists you always send the target relative to your tee. 13:30 < bridge> oh nvm, there still will be a jump after unpause nvm. 13:30 < bridge> oh nvm, there still will be a jump after unpause. 13:30 < bridge> then ye, that's about what we've discussed 13:31 < bridge> Well I don't mind the playerflag, but if you do find a way to avoid it I guess that's fine too 13:31 < bridge> Enjoy 13:31 < bridge> it won't be me finding it probably 13:31 < bridge> :kek: 13:31 < bridge> probably someone else finds it or just revert it and won't fix 13:35 < bridge> I would like to know how I can get the flag as in the gamemode ctf or as in the [video](https://youtu.be/-A9NTJ1P688), without changing the source code of the server and without installing other modifications for the server 13:37 < bridge> you can modify clients to render it 13:37 < bridge> otherwise it is a server mod 13:37 < bridge> no other way around it 13:39 < bridge> Thanks. I'll do it 15:05 < bridge> and still noby fng bans any non standard flags client xd 15:05 < bridge> k client used flags afair 15:09 < bridge> but imagine yourself making all in one c based game engine, i don't really see any other way to write such a huge thibg without using oo 15:10 < bridge> you will mimic them anyway, even if didn't want to do it 15:10 < bridge> I mean OOP mimics real life in a way, so you can say almost anything you do "mimics OOP" in a way 15:11 < bridge> My issue is with polymorphism and inheritence, not stuff like methods 15:11 < bridge> as data structure you mean? 15:12 < bridge> Wym? 15:12 < bridge> I'm back to torturing myself and now I'm failing to write a `foldr` such that it terminates given an infinite list... 15:13 < bridge> can you expand this a bit? i can't get it right 15:15 < bridge> I don't like inheritence and polymorphism. I don't want to see you inherit methods/fields from a child class. I don't want to see you calling virtual methods 15:16 < bridge> Today I unlocked a new crash error, bus error 15:18 < bridge> You can however have methods in your "class", you can have classes in classes. Those I don't mind 15:18 < bridge> how would you replace usage of polymorphism and inheritance? 15:18 < bridge> And for this you could just as well use structs and functions :) 15:18 < bridge> Design your program such that neither is relevant 15:19 < bridge> Well just don't use them? Idk how to explain something so natural to me 15:19 < bridge> so we can rewrite teeworlds in c without it being spaghetti right :justatest: 15:19 < bridge> Entity component systems avoid inheritence e.g. If you want to look at an example 15:20 < bridge> Another option is generics, I don't mind those 15:20 < bridge> Well, I'm not sure if we specifically could pull that off :justatest: 15:20 < bridge> yeah, i have seen generics impl in rust, cpp ecs are mostly inheritance or polymorphism based 15:21 < bridge> and flecs c ecs just reimplements inheritance and polymorphism afair :justatest: 15:21 < bridge> this can be false tho 15:23 < bridge> It boils down to avoiding dynamic dispatch, you know every component attached to an entity at compile time (not always but imagine if you did for a second). This means you no longer need virtuals 15:23 < bridge> And entities do not inherit fields from components, a character is not a physics object, it just contains a physics component. So no inheritence 15:32 < bridge> in my mind i have an example of teeworlda client components, i don't know how to em in a sane way without OO 15:32 < bridge> compose em* 15:32 < bridge> checked flecs, looks like full powered runtime db written in c to use as ecs 15:38 < bridge> That's the easiest example to replace since we don't add components at runtime. Just don't have virtual calls and instead of looping through an array of components just call the methods of each 15:38 < bridge> everyone just says ecs for gamedevs nowadays, but generally don't understand the motivation of that for games. maybe in bevy i can see it or a few genres. but for general purpose i honestly like objects / scripts, i do agree inheritance is terrible tho, you can still do components just by doing objects in objects. 15:40 < bridge> I don't do enough gamedev to have an opinion here. But if I were designing an engine today I'd probably have something like an ECS based on generics 15:41 < bridge> ecs can be hella fast tho 15:41 < bridge> Another interesting way of doing it is the data oriented approach of a pipeline of transformers. This has the benefit of being very cpu friendly 15:41 < bridge> if you do memory layout correctly 15:42 < bridge> never heard of transformers tbh 15:42 < bridge> ~~other than GPT~~ 15:44 < bridge> It might be terminology I invented. The idea is that you have pure functions without side effects that you chain together 15:44 < bridge> I guess you would usually still have something like an ECS with that approach too though 15:45 < bridge> i still don't understand lol 15:46 < bridge> maybe you are just describing ECS being set up in a OOP language? 15:47 < bridge> unity and some lua based framework does to call chains to setup the world. 15:47 < bridge> unity and some lua based framework does do call chains to setup the world. 15:47 < bridge> unity ecs and some lua based framework does do call chains to setup the world. 15:48 < bridge> No I was more talking about what you hinted at with ecs being fast. One way to achieve that is to have components that you transform (tick) using a chain of pure functions 15:49 < bridge> ye, still not sure 15:49 < bridge> i'm too game editor coded maybe 15:49 < bridge> Perhaps we just ended up talking about different things 15:50 < bridge> also as i said before, game devs are kinda dumb 15:50 < bridge> i do feel too far gone from actual programming concepts 15:51 < bridge> Doesn't Unity have an ECS nowadays btw? 15:51 < bridge> they do 15:51 < bridge> maybe it is finished in unity 6 15:51 < bridge> i doubt it tho 15:52 < bridge> there are way too many stuff to move to the new system, and the default gameobject system does not talk to the ECS at all without a bridge 15:52 < bridge> and the bridge is too complicated to setup 15:52 < bridge> I think I was intermixing two different things there that created a confusion. I was talking about one way to implement an ECS that is good for performance 15:53 < bridge> so you end up with ECS objects, ECS logics, ECS graphics but you transfer the data back to the GameObject world to do animation, 3D sounds and stuff 15:53 < bridge> if you only use the ECS part in unity it is indeed blazingly fast 15:53 < bridge> That's interesting 15:53 < bridge> but it doesn't actually do much 15:53 < bridge> you can make a flock simulation probably 15:54 < bridge> but even importing mocap data or blending animation is a PITA to do 15:55 < bridge> also you can forget all those plugins, not many of them are updated with ECS 15:55 < bridge> ECS is fast if determinism isn't mandatory 15:55 < bridge> then you can go multi threaded 15:55 < bridge> I wanna give up 😭 15:56 < bridge> it is still fast even if you don't do multithread 15:56 < bridge> the cache alone can make it worth it for some type of game probably 15:56 < bridge> I have 3k of uber-spaghetti with extremely bad performance 15:56 < bridge> It's also fast single threaded. Chains of pure functions optimize very well. If you adopt a SOA layout it's extremely cache friendly and it even vectorizes well in some cases 15:56 < bridge> I'd bet against it, but would be interesting 15:57 < bridge> :justatest: i mean unity ecs have demos comparing the two systems single-threaded 15:57 < bridge> and what do they show in that demo? 15:57 < bridge> idk 15:57 < bridge> @learath2 Why is the tracer of projectiles of weapons not showing on my server 15:57 < bridge> I'd be very surprised if it performs any worse than a regular inheritence based approach. They are both the equal amount of virtualization 15:57 < bridge> i don't care about ecs but they do have them 15:58 < bridge> also probably not very much 15:58 < bridge> yes, i'd bet they are around equal 15:58 < bridge> I do not know 15:58 < bridge> Like I'm shooting a grenade , the animation of the shot goes through , but the projectile didn 't fly out , and when it reached the blocks , the animation of the explosion hits is played 15:59 < bridge> wait are you betting against single-threaded ecs in general or just the learath2 way of doing it. 15:59 < bridge> generally 15:59 < bridge> then ye, i think the whole point they are trying to sell with unity is cache friendlyness 15:59 < bridge> single threaded for a deterministic game, e.g. no reorder of operations 15:59 < bridge> If you adopt an SOA layout there is no comparison. An ECS system usually dusts naive inheritence 16:00 < bridge> The massive structs we are looping through are awful for the cache. Everything is a miss 16:01 < bridge> for multithreading unity already have burst and jobsystem which are also data driven and you can call them in regular GameObjects. 16:01 < bridge> so at least for Unity ECS, the main selling point is cache friendlyness not multithreading 16:01 < bridge> :justatest: 16:01 < bridge> If you adopt an SOA layout there is no comparison. An ECS usually dusts naive inheritence 16:01 < bridge> i mean you can do multithreading with UnityECS super easily tho 16:02 < bridge> This is for almost all ECS. With the traditional approach it's rather hard to be cache friendly 16:02 < bridge> so we can't keep same locs without oo? 16:03 < bridge> HOLY HELL I did NOT know how bad this was 16:03 < bridge> so my first solution I guessed the compiler might optimize to something that works reasonably fast, it didn't 16:03 < bridge> so I wrote another solution that I guessed would be faster, it was, but still way slow 16:03 < bridge> 16:03 < bridge> so I checked how long the second solution takes to check a *single* case (of about 10k cases), it took 3 seconds (oh god) 16:03 < bridge> for fun I wanted to check how slow my first solution would take... It still hasn't completed and has been running for 6 minutes 16:03 < bridge> over 6 minutes so far on a single case 16:03 < bridge> ye, so i thought the whole point of ECS is cache friendlyness and parallelism is just a side effect that it can do pretty easily. 16:03 < bridge> You can but you need generics in that case 16:03 < bridge> I love writing code that will take thousands of years to finish... 16:03 < bridge> i thought you have an example of full replacement without adding code complexity or so 16:03 < bridge> HOLY HELL I did NOT know how bad this was 16:03 < bridge> so my first solution I guessed the compiler might optimize to something that works reasonably fast, it didn't 16:03 < bridge> so I wrote another solution that I guessed would be faster, it was, but still way slow 16:03 < bridge> 16:03 < bridge> so I checked how long the second solution takes to check a *single* case (of about 10k cases), it took 3 seconds (oh god) 16:03 < bridge> for fun I wanted to check how long my first solution would take... It still hasn't completed and has been running for 6 minutes 16:04 < bridge> over 6 minutes so far on a single case 16:04 < bridge> bruh, i should stop chatting, i've been on this line for two hours now. 16:04 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314608451531444287/image.png?ex=67546407&is=67531287&hm=268c365498b18182d87aba3f71a4826b18caf1f842d75a375fa3337b5b9ff12b& 16:04 < bridge> I could probably replace the components vector as an example but it won't be merged, it'd be a bit of a waste of time 16:05 < bridge> We also don't use boost so I need my own implementation of a generic container 16:05 < bridge> Huh, if I ran the second solution for about 15 hours it would actually complete 16:06 < bridge> xddd, any major change ends up with this thought 16:06 < bridge> The first solution is still running, 9 minutes in, checking a single case 16:07 < bridge> I mean if there was any advantage to it it would be worth. My issues with dynamic dispatch is pretty much just a distaste in this case 16:07 < bridge> any good code (with a few exceptions) has ability to be parallely executed as a side effect ig 16:07 < bridge> It will have 0 observable performance or code improvement 16:07 < bridge> why good? 16:07 < bridge> It has a clear disadvantage 16:07 < bridge> xdddd 16:07 < bridge> determinism 16:07 < bridge> loss of 16:08 < bridge> i'd limit multi threading to stuff that really doesnt matter.. e.g. particles or similar 16:08 < bridge> Well not always, there are cases where order really doesn't matter 16:08 < bridge> you asked this like, bad code can be paralleled too as a side effect 16:09 < bridge> i'd just claim this has nothing to do with ECS 16:09 < bridge> i thing it would make code look more direct after rework 16:09 < bridge> E.g. particles that don't interact with anything. You can simulate their animation component in parallel without any loss of determinism 16:09 < bridge> yeah, i didn't mention ecs in this statement 16:09 < bridge> at least* 16:09 < bridge> ok then i further claim, writing in a ECS does not mean good code 16:09 < bridge> It would look pretty meh, C++ just looks prettier with inheritence and polymorphism 16:10 < bridge> Definitely not. You can write horseshit code in any paradigm 16:12 < bridge> https://bevy-cheatbook.github.io/fundamentals/hierarchy.html 16:12 < bridge> one good example of what is hard in ECS 16:14 < bridge> raii is best 😬 16:14 < bridge> strict hierarchies are best 😬 16:14 < bridge> huge enjoyer 16:14 < bridge> they play together greatly 16:15 < bridge> When would you want an entity to own another entity? 16:15 < bridge> well i'd say ui is defs a good example 16:16 < bridge> I'm an enjoyer of mixing and matching stuff. I probably wouldn't implenent a UI with an entity component system 16:16 < bridge> ig it also depends on what your goal is. 16:16 < bridge> 16:16 < bridge> e.g. if a character owns it's projectiles, then the projectile can be certain that the character exists too 16:16 < bridge> yes 16:16 < bridge> as said, when a system like particles can be cleanly split 16:17 < bridge> then you should use what gives most performance 16:17 < bridge> if that is directly a ECS or smth smaller/similar is ofc fine 16:17 < bridge> So probably I would have all my entities in the gameworld have an ecs. I don't think it's a great fit outside of that 16:18 < bridge> Maybe a very classic tree based approach for my UI 16:18 < bridge> ill correct myself: any good code has more chances to be paralleled in comparison (with a few exceptions) 16:19 < bridge> you want to say teeworlds physics are not perfect? 😄 16:19 < bridge> One great part of a functional approach is that you have many opportunities to parallelize without thinking too much 16:19 < bridge> yeah 16:19 < bridge> keep components small 16:19 < bridge> let them do what they are designed for 16:20 < bridge> Unix philosophy for gamedev wow 16:20 < bridge> yes 16:20 < bridge> edict solved this by adding relations (afair xd) 16:20 < bridge> + the monolithic design of rust 16:20 < bridge> yeah 16:20 < bridge> shots fired 16:21 < bridge> Ok, I have to go ship a feature or they will fire me from the job I want to quit 16:21 < bridge> oh noo 16:21 < bridge> nice chat as always 16:21 < bridge> no u 16:21 < bridge> do you like to write ecs? 16:21 < bridge> 16:21 < bridge> i can just recommend you to try to write a teeworlds physics as ECS 16:22 < bridge> i'm really interested in that 16:22 < bridge> ofc it can break physics if you require to 16:22 < bridge> i'm so sleepy 16:22 < bridge> bye 16:22 < bridge> but my adhd is holding me hostage 16:23 < bridge> does adhd mean you have hyper focus or no focus? or how does that work 16:23 < bridge> thats literally what i was intended to do after messing with unifying 0.5 0.6 and 0.7 protocols 16:23 < bridge> not after 16:23 < bridge> not after 16:23 < bridge> no 16:23 < bridge> but my approach ended up being a shit so im rewriting it in a thousand time 16:23 < bridge> no, literally after xd 16:23 < bridge> both 16:24 < bridge> now 16:24 < bridge> wow that works 16:24 < bridge> it just switches 16:25 < bridge> nah xd, i have to finish this semester 16:26 < bridge> just make your own game and sell them already 16:26 < bridge> ill have to get an akademischer Urlaub 16:26 < bridge> otherwise 16:26 < bridge> :justatest: 16:27 < bridge> eh, if I'll quit uni, I'll end up being in army for one year 16:27 < bridge> i mean after you got time. don't do ecs teeworlds 16:27 < bridge> :pepeW: 16:27 < bridge> this is my gestalt 16:27 < bridge> i need to finish any project i started as a teeworlds based 16:28 < bridge> :justatest: 16:29 < bridge> let's count xd 16:29 < bridge> xpanic, 2xp, teeworlds-base, teemars, ddnet-vanilla, rustee, multitee and teeworlds.ru 16:29 < bridge> and all of them are unfinished xd 16:30 < bridge> d...damn 16:41 < bridge> imagine finishing something 16:51 < bridge> 😩 3k of code from hell 16:52 < bridge> sleeping 16:53 < bridge> If you want a taste of my suffering 16:53 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314620702774661233/6.hs?ex=67546f70&is=67531df0&hm=fbfbc42ce766d114b4baec0d8060dee446dc539af64348582aad2fdf40de70da& 16:53 < bridge> won't even bother spoilering this one 16:54 < bridge> though this time it might be warranted on the rounds of it being practically NSFW 16:56 < bridge> I am so sick and tired of thinking of functions that return functions and take in functions returning tuples of tuples 16:58 < bridge> still doing aoc? 16:58 < bridge> Yeah... 16:58 < bridge> Took some breaks in between to be fair but yeah still far from finished 16:58 < bridge> you've been going at it the whole day i think? 16:59 < bridge> at least my whole day i guess 16:59 < bridge> which is not that long 17:02 < bridge> Like if you look at `stepForwards` above, the `liftM2 (,)` at the start of it coerces to the type `(([String], ((Int, Int), (Int, Int))) -> [String]) -> (([String], ((Int, Int), (Int, Int))) -> ((Int, Int), (Int, Int))) -> (([String], ((Int, Int), (Int, Int))) -> ([String], ((Int, Int), (Int, Int))))` 17:03 < bridge> You can imagine how much time I'm spending on making all the types line up correctly 17:05 < bridge> I checked that I typed that out right, and yeah, pasting it into the interpreter, `liftM2 (,)` is at least cabable of coercing to that monster of a type 17:07 < bridge> And the problem with my current program is that it's copying massive amounts of state around, and to fix that I'd have to change what my functions pass around, and to fix *that* I'd have to make all the types line up all over again 17:07 < bridge> I'm frankly not sure if I have the patience for that 17:10 < bridge> atp I might have an easier time writing this in brainfuck 17:10 < bridge> then at least I could have mutable state without a million extra steps 17:14 < bridge> Okay to be fair that monstrosity of a type can be simplified to `(State -> [String]) -> (State -> ((Int, Int), (Int, Int))) -> (State -> State)`, but the internal structure of `State` is still there for me to keep in mind 17:23 < bridge> > `compose2 = (.) . (.)` 17:23 < bridge> yeah that's a little nsfw 17:24 < bridge> I haven't read your full code but it looks like you may want to check out the state monad if you haven't already 17:31 < bridge> Do I get a little sympathy or just told off for disgracing FP? 17:32 < bridge> no you get lots of sympathy 17:54 < bridge> ok I read it and it wouldn't help that much 18:53 < bridge> @chillerdragon there could be a general way to turn off all logs which would work for any command which may give unwanted output 19:12 < bridge> I found a surprising gap in free software. There is no free per-application bandwidth limiter on windows. NetLimiter is payware and that's the only option 19:15 < bridge> The API is certainly there since NetLimiter can do it, curious why no one emulated it yet 19:21 < bridge> nvm, I figured out why no one else is doing it, it's a kernel driver you need to code for it 19:21 < bridge> so the api is not there 19:37 < bridge> God bless your soul 19:37 < bridge> I don't even want to read it myself! 19:44 < bridge> vanilla pros, can you see the problem of this screenshot? 19:44 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314663764884197426/image.png?ex=6754978a&is=6753460a&hm=b430a367568a079498084f426fc93744ff75ffe51e2c496610a068102ebde6e3& 19:45 < bridge> ||suddendeath even applies to the player with score 0, but is that really fair? after all he could win even tho he was not in a winning position.|| 19:45 < bridge> alive turned into ae? 19:45 < bridge> no xd i removed it for fun 19:45 < bridge> lmao 19:47 < bridge> so the question arises whether to change that behavior or not. 19:47 < bridge> e.g. in melee only the affected characters respawn for a sudden death 20:02 < bridge> When spectating, why not have the mouse wheel control zoom by default? Just like the map editor. Anyone tried that? I enjoy the new click to spectate individual tees, too. 20:03 < bridge> conditional binds are hard 20:03 < bridge> your client doesn't differentiate between being in spectator mode when you press the button, it's all unrelated 20:04 < bridge> you can re-bind the keys every time you switch in and out of spectator mode but then the scroll wheel values would be overridden the first time you switch 20:04 < bridge> not sane default behavior but i know lots of ppl with elaborate binds which do that kind of shit 20:05 < bridge> i personally have scroll on zoom all the time and don't use it for weapons bcs it's kinda not reliable 20:05 < bridge> /spec can also fail 20:05 < bridge> leaving you with wrong binds 20:05 < bridge> yea u can also press the button not ingame and then ur binds are fucked 20:05 < bridge> lots of ways for it to go wrong 20:07 < bridge> i have a hard reset bind for all of my state dependent binds for that reason 20:07 < bridge> ditto 20:07 < bridge> and have it run on join (<- illigel beyhaviour!!!) 20:07 < bridge> omg 20:09 < bridge> vscode cant figure out how to handle this diff 20:10 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314670207213633567/image.png?ex=67549d8a&is=67534c0a&hm=5382fd2e81de1af05ff2b887965cb8e8c1cb76e2692856b027135afb11b49796& 20:10 < bridge> nor does git 20:10 < bridge> the power is in your hands 20:10 < bridge> i might try 20:10 < bridge> git rm -d --cached ./ddnet-lib 20:10 < bridge> git submodule update 20:10 < bridge> i might try 20:10 < bridge> git rm -d --cached ./ddnet-libs 20:10 < bridge> git submodule update 20:10 < bridge> i dont want to get submodules tho 20:10 < bridge> then that folder shouldnt exist 20:10 < bridge> it's just a submodule 20:11 < bridge> it does exist rrn but its just empty 20:11 < bridge> guys 20:11 < bridge> who ask 20:11 < bridge> who ask what 20:11 < bridge> stop cri 20:11 < bridge> what 20:11 < bridge> one of ddnet community moment of all time 20:11 < bridge> no cry it's ok 20:15 < bridge> Same, highly recommend. Can also bind mouse wheel click to zoom reset 20:15 < bridge> i have scrollwheel on +fire 20:15 < bridge> its weird how often i just wana shoot people 20:16 < bridge> Our servers invalidate your input if the player flag is the wrong size, noby fng already kicks you if you use the nightly build 20:18 < bridge> Ddnet has code to kick players who send the 7th flag, so future clients will need to check the server version 20:18 < bridge> Its easier to just not use them for something unimportant 20:19 < bridge> deepfly 😈 20:19 < bridge> i have my horizontal scroll wheel on weapon switch and it pisses people off so much 20:19 < bridge> bcs they all have game sound on so it's major earrape 20:19 < bridge> ive like always played the game muted 20:25 < bridge> We could stop doing these things though. These were ancient antibot measures that targeted a very specific client and it's weird advertising thing that showed other players of that client 20:25 < bridge> w = dummy hammer for me, but I guess I get the idea of being able to have both tees hammer with one button at any time 20:25 < bridge> There is an open PR, Heinrich denied it 20:25 < bridge> Hm, maybe I'm misremembering something, I'll check in with heinrich in the PR then 20:26 < bridge> I could never, I rely on sound effects for timing 20:26 < bridge> Could you let me know the PR number? 20:27 < bridge> https://github.com/ddnet/ddnet/pull/8972 20:27 < bridge> Oh this is a different one 20:28 < bridge> We can move this to the antibot and get rid of it, the playerflag thing I think we can just stop doing 20:28 < bridge> qwerf = pistol hammer shotgun nade laser 20:28 < bridge> We should check in with @_noby still but I'm not even sure these bots made it into 0.6 to begin with 20:28 < bridge> theres a reason im bad at the game 20:29 < bridge> Or if they did they immediately stopped sending any playerflag above the valid ones 20:40 < bridge> is there some reason we can't use the PLAYERFLAG_PLAYING flag for the spectate flag? 20:40 < bridge> it's completely unused by the server atm 20:40 < bridge> it also seems logical 20:42 < bridge> If it is actually not used yet that might be an avenue 20:43 < bridge> literally the only thing it does is act as a boolean for the client for a single check 😂 20:43 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314678574292402196/image.png?ex=6754a555&is=675353d5&hm=1c53e7f8da3d09c86a4cb615222bd7872468c6650cbbab8f3dda0840cedec373& 20:43 < bridge> there's 3 references in the entire codebase 20:43 < bridge> the other 1 defines its existance 20:44 < bridge> Hm, we can move that functionality to an internal bool, then re-use the flag 20:44 < bridge> yeah 20:45 < bridge> I was going to suggest making the spec flag not exclusive to spectate because this issue seems like it could apply to other things 20:45 < bridge> but this flag seems like it's supposed to be the generic version already 20:47 < bridge> I think it should be fine without a server_cap as well right? because this already gets turned off when you're chatting or in the menus 21:27 < bridge> @robyt3 `I agree, dangerous commands should be registered with a new CFGFLAG_DANGEROUS.` 21:27 < bridge> what about cmdflag_dangerous? 21:28 < bridge> as `CMDFLAG_PRACTICE` and `CMDFLAG_TEST` exist 21:30 < bridge> well CFGFLAG_CLIENT is used as a flag for commands aswell 21:30 < bridge> /: 21:30 < bridge> Hmm, not sure why we use two different names. The others are already mixed I guess, e.g. `CFGFLAG_SERVER` is also used for commands and config variables are considered commands 21:30 < bridge> so... which one 21:30 < bridge> Hmm, not sure why we use two different names. The others are already mixed I guess, e.g. `CFGFLAG_SERVER` is also used for commands. And config variables are considered commands internally. 21:32 < bridge> Maybe look at git blame if there was a particular reason for adding a separate `CMDFLAG_` prefix, otherwise I would prefer the simplicity of having only one prefix `CFGFLAG_`. 21:32 < bridge> oke 21:32 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314691057392422912/image.png?ex=6754b0f5&is=67535f75&hm=dd2d0967f24aafc34cfbd0edf51a33b571dddca9aa7b42f5bc34b29875b90a4a& 21:32 < bridge> ): 21:35 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314691619861303327/image.png?ex=6754b17b&is=67535ffb&hm=ce0ad313956b9fc3e4efd01d7b97a39304fad91b43c9410de964811e854951bc& 21:35 < bridge> ghasp it was you!! 21:35 < bridge> (who moved the line down 1 so you got blamed) 21:38 < bridge> https://github.com/ddnet/ddnet/commit/209df982f89f3056ac2bb23fdf116ed547a22f6b 21:39 < bridge> https://github.com/ddnet/ddnet/pull/8072 21:39 < bridge> https://github.com/ddnet/ddnet/pull/8072 21:39 < bridge> ¯\_(ツ)_/¯ 21:45 < bridge> Seems fine to use `CFGFLAG`. I guess it would be cleaner to separate the command and config flags but then you'd have to avoid using the same bits in the flags, but that probably requires a discussion first 21:46 < bridge> x2 ¯\_(ツ)_/¯ 21:46 < bridge> well ive changed it 21:46 < bridge> well ive changed my pr 21:48 < bridge> Hmm, I think checking in `CGameConsole::CInstance::ExecuteLine` is brittle though. For example doesn't check for `; quit` 21:48 < bridge> Should probably be a property of the engine console that dangerous commands are enabled/disabled 21:49 < bridge> So it can be checked for every command execution 21:49 < bridge> could have to add a flag to 21:49 < bridge> `m_pGameConsole->m_pConsole->ExecuteLine(pLine);` 21:49 < bridge> which says if dangerous commands are enabled/disabled 21:49 < bridge> off by default 21:49 < bridge> on by default 21:50 < bridge> You can register the `console_allow_dangerous` command in `src/engine/shared/console.cpp` instead 21:50 < bridge> oke 21:50 < bridge> oh wait no 21:50 < bridge> because i dont want to check for binds and scripts 21:52 < bridge> Hmm, then it doesn't really help for the intended use case 21:52 < bridge> its meant to stop you typing dangerous commands in console 21:53 < bridge> It doesn't really accomplish that. now the trolls will tell players "type echo;quit in F1" instead of "type quit in F1" 21:53 < bridge> that will be blocked by this 21:56 < bridge> Doesn't really looks like it does, `CGameConsole::CInstance::ExecuteLine` doesn't parse commands yet, you can separate multiple commands with semicolon. `echo;quit` quits the client without confirmation 21:56 < bridge> Doesn't really looks like it does, `CGameConsole::CInstance::ExecuteLine` doesn't parse commands yet, you can separate multiple commands with semicolon. `echo;quit` quits the client without confirmation (with your PR) 21:57 < bridge> Doesn't really look like it does, `CGameConsole::CInstance::ExecuteLine` doesn't parse commands yet, you can separate multiple commands with semicolon. `echo;quit` quits the client without confirmation (with your PR) 21:59 < bridge> ` Print(OUTPUT_LEVEL_STANDARD, "console", "Test commands aren't allowed, enable them with 'sv_test_cmds 1' in your initial config.");` 21:59 < bridge> in executelinestroked 22:03 < bridge> yeah, it would have to be checked there 22:03 < bridge> thats what im currently doing 22:03 < bridge> well ive done and am fighting with rust bridge 22:03 < bridge> ```cpp 22:03 < bridge> void cxxbridge1$IConsole$ExecuteLine(::IConsole &self, ::StrRef *pStr, ::std::int32_t ClientId, bool InterpretSemicolons, bool AllowDangerous) noexcept { 22:03 < bridge> void (::IConsole::*ExecuteLine$)(::StrRef, ::std::int32_t, bool, bool) = &::IConsole::ExecuteLine; 22:03 < bridge> (self.*ExecuteLine$)(::std::move(*pStr), ClientId, InterpretSemicolons, AllowDangerous); 22:03 < bridge> } 22:03 < bridge> ``` 22:03 < bridge> scary 22:03 < bridge> also uses different formatting rules? 22:04 < bridge> That's generated code, see `console.rs` 22:04 < bridge> o 22:04 < bridge> Also, adding more arguments to this function isn't a good solution 22:05 < bridge> whats.... the alternative? 22:06 < bridge> Move all the dangerous command handling to the engine console, also force binds and config files to have the same handling 22:06 < bridge> Or go back to the drawing board and think about alternative solutions to the issue altogether 22:06 < bridge> i like the allow_dangerous_commands 22:06 < bridge> tis simple 22:07 < bridge> i dont want binds and config files to have same handling, otherwise it breaks existing config 22:07 < bridge> yeah, it would still work with binds, but it would break existing binds 22:07 < bridge> you would have to toggle it on and off 22:07 < bridge> which is a big menial so people would just turn it on in autoexec or something 22:07 < bridge> which defeats the purpose 22:10 < bridge> #9056 is only about `unbindall` though. Alternatives that would make it less dangerous would already be enough, including removing it and changing how default binds work. Not really an easily solvable issue. The other dangerous commands aren't really problematic, they make you lose a run and then you know not to trust that person again. `unbindall;quit` immediately deletes all binds. 22:10 < bridge> https://github.com/ddnet/ddnet/issues/9056 22:11 < bridge> its also for downstream to prevent tater from naming things delete_all_bindwheel_binds to prevent people from running it by accident 22:12 < bridge> also i dont want unbindall to change, since i use it in my init script after testing random stuff 22:16 < bridge> brbi need to do friend duties 22:28 < bridge> ok. Did it fullfill my request or is my ai depressed? 22:28 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1314705029755568278/image.png?ex=6754bdf9&is=67536c79&hm=3b4c3d47f5da6542bf9409f973941239a89e60be29ee8699784cdf5fe6446c47& 22:28 < bridge> wtf 22:47 < bridge> sounds like totally normal language to me 22:47 < bridge> average offtopic conversation ig 23:40 < bridge> Poor ai D: 23:43 < bridge> Hmm, even if I rewrite my thing to copy around less state to produce states faster and make them faster to compare, my loop checker is still super slow 23:44 < bridge> takes 800ms to check if there's a repeat in a sequence of integers that repeats every 1'000'000 values 23:47 < bridge> watcha doin 23:47 < bridge> today's AoC... *S T I L L* 23:48 < bridge> I mean, I don't need to check for repeats longer than a couple hundred, but even then, holy hell that's slow 23:48 < bridge> what is the value range of the integers? 23:51 < bridge> Well the actual data I'll be checking is a bunch of tuples of small integers 23:51 < bridge> I'm using a hashset 23:52 < bridge> how small xd 23:52 < bridge> < 200 23:52 < bridge> then use an array 23:52 < bridge> and the integer value as index 23:53 < bridge> then you can quickly count which integer was how often in your list 23:53 < bridge> < 200 still means an array of 40k-ish values since these are 2-tuples 23:54 < bridge> and this is cursed territory so I don't have mutable arrays 23:54 < bridge> so the tupple is 200 or what 23:54 < bridge> i dont get it xd 23:55 < bridge> I mean I don't have mutable hash sets either but those are smaller to make copies of 23:56 < bridge> The type I'm working with is probably going to be `(Int, Int, Direction)`, where Direction is an enum of four possible values 23:57 < bridge> Or more like `((Int, Int), Direction)` because :pepeW: