00:04 < bridge> I don't think so. Images for tile layers should have width and height divisible by 16, so the images need to be at least 16x16 00:04 < bridge> Yeah I just noticed that image data items have a width and height 00:05 < bridge> You can observe this when creating a pixelart with the tool in the editor, that should create very small embedded images for the pixel colors 00:05 < bridge> Trying to figure out how to get the right size for the name tho 00:09 < bridge> A multiple of 64 if I got it right. 00:09 < bridge> https://forum.ddnet.org/viewtopic.php?f=16&t=4940 00:10 < bridge> Are you trying to make a tileset? 00:13 < bridge> For detailed tilesets, yes, but if you only need colored blocks then each tile can be 1x1 pixel. The images always need to contain 16x16 tiles. 00:15 < bridge> So 16 is the minimum, I see. :) 00:23 < bridge> Sorry for the late reply, no I'm trying to render out an image embedded in a map file 00:24 < bridge> So you are trying to get an immage from a map? 00:24 < bridge> Yes, more specifically tilesets 00:34 < bridge> Can you get the name of the tileset and then search it up? 00:36 < bridge> I see what the issue here is. Sorry for the confusion. I'm a programmer, I'm implementing the teeworlds map format in the Godot engine. Hence why I'm talking in the #developer channel. All my questions etc. are programming related 00:46 < bridge> Oh my bad. ^^ If you just needed the size then Robyt answered it already I guess. 00:47 < bridge> Well, technically he did, although I asked my question in such a stupid way that he didn't answer my questio (absolutely my fault!) 00:47 < bridge> But I did it! 00:47 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1167957917610287165/image.png?ex=65500493&is=653d8f93&hm=5964687f8fa49f77692073b0936a2fb20d7146b127675737718a5a108f37c663& 00:48 < bridge> Haha okay, good job! 01:32 < bridge> good morning 01:32 < bridge> somehow i went to bed at the same time and woke up at 4;00 pm instead of 7:00 am 02:14 < ChillerDragon> xd 02:14 < ChillerDragon> u ok ewan? 03:18 < bridge> Lol 03:18 < bridge> 07:56 < bridge> There is a thing called teewebs.net - no matter if it works atm, how is it built? Using WebRTC for an UDP connection? Or WebSockets - but using a proxy or smth? 08:16 < bridge> It uses web sockets 08:16 < bridge> And the server must support it too 08:17 < bridge> Also there is no udp in the web 08:17 < bridge> At least no raw udp 08:17 < bridge> Quic is udp :issou: 08:23 < bridge> yeah i thought maybe it uses webrtc to establish an "udp" connection to not have the tcp drawbacks 08:23 < bridge> just was curious, thanks 10:59 < bridge> Missing image name and broken rendering in Purple Panic 2 is fixed now 11:01 < bridge> what was it in the end? 11:02 < bridge> I didn't check what was wrong with the string itself, but because it was not getting loaded, the ingame image was also not getting loaded 11:02 < bridge> We don't really need the name for embedded images, but I guess it's good that it was caught like this 11:02 < bridge> it's just interesting that this probably broken since years but apparently never caused issues ^^ 11:02 < bridge> 11:02 < bridge> lucky 11:02 < bridge> Yeah, we just ignored missing/broken name for embedded images 11:03 < bridge> If the embedded images failed to load, it might have printed garbage UTF-8 to the console 11:03 < bridge> Nothing more 11:03 < bridge> but what prevented it from load crrectly 11:03 < bridge> in our current version 11:03 < bridge> Harder validation 11:03 < bridge> If name not loaded -> fail to load entire image 11:03 < bridge> i c 11:04 < bridge> and do you know why patigas tool failed to detect it? 11:04 < bridge> i didnt follow ur convo 11:04 < bridge> Maybe it didn't check for broken UTF-8 yet 11:04 < bridge> I can investigate in what way the string was broken 11:05 < bridge> would maybe be useful if some editor version generated these invalid strings 11:05 < bridge> if patiga converts the string to a rust string it must have been checked i guess 11:05 < bridge> I think we are going to discover a bunch of strange maps that are generated by other editors and tools once we add more map validation 11:06 < bridge> yeah 11:06 < bridge> still i'd have thought that's what patigas tool is for xd 11:07 < bridge> Not sure if it checks everything, like map item versions. For example every map version item should have version 1, but there were maps that didn't have this item. 11:08 < bridge> The map info item also should always have version 1, but maybe another client added version 2 11:11 < bridge> its because invalid utf-8 is wayyy too common, so I just used https://doc.rust-lang.org/std/string/struct.String.html#method.from_utf8_lossy 11:12 < bridge> while I do try to be strict with loading, I do also want compatibility to a degree ^^ 11:12 < bridge> wtf, why is it so common tho 11:12 < bridge> aren't most maps simply using english names 11:13 < bridge> I believe there was some broken input in the past, maybe it was utf-16 or something, or local input with other symbol maps 11:14 < bridge> and the thing is, these things get propagated further by mappers basing their maps on other maps (or appending them) to use their envelopes 11:14 < bridge> well but if ddnet will fail in future 11:14 < bridge> we should make a decision 11:15 < bridge> we could decide to forbid saving maps with invalid utf-8 11:15 < bridge> and maybe fix the utf-8 during loading as well as possible 11:15 < bridge> there are a few other bugs which the twmap parser intentionally ignores 11:16 < bridge> but the invalid-utf8 was so big that it doesn't even throw a log warning I think 11:17 < bridge> problem is: in my eyes a failed image means a failed map 11:17 < bridge> if there is invalid parts in maps we should not at all allow to continue 11:17 < bridge> this is always a mess to deal with 11:18 < bridge> currently an image fails with broken utf8 11:18 < bridge> the renderer is simply not built to deal with it 11:18 < bridge> it's not its problem 11:19 < bridge> if we ignore it for stirngs, we should also ignore it in ddnet again 11:19 < bridge> (which afai understand is not the case rn) 11:19 < bridge> wdym here? 11:20 < bridge> well u kinda ignore invalid utf8 11:21 < bridge> but ddnet does not _anymore_ 11:22 < bridge> Silently ignoring errors is usually a big no in code review, so validation is as strict as possible 11:22 < bridge> what about fixing the utf-8? 11:22 < bridge> or throwing away the string 11:22 < bridge> Do unicode replacement characters cause problems elsewhere though? 11:22 < bridge> i also prefer to catch all errors at IO time. then not all other code has to deal with it 11:22 < bridge> i just don't like a semi broken map 11:23 < bridge> either completely not load, or load 11:23 < bridge> as said, i don't like that the renderer has to deal with this (in theory) 11:23 < bridge> btw, the filename in question was `DDmaxFreezeAlpha3 weiß versuch 1` (encoded as correct ANSI, but therefore incorrect utf-8) 11:24 < bridge> slightly, the strings get longer (because its 4 bytes long) and they breach the size limit of the string. twmap slices the string after to keep the max 11:25 < bridge> Always returning the checked string from the datafile directly is nice because no additional malloc/free is necessary 11:25 < bridge> I'll also add `GetDataStringArray` in the future, which would return `std::optional>` 11:26 < bridge> note that I don't think performance considerations are necessary. my benchmarks always showed that the zlib decompression is responsible for ~95% of the cpu time 11:26 < bridge> allocations won't make any difference I think 11:26 < bridge> true 11:27 < bridge> zlib decompression and png decompression is most time for me too 11:27 < bridge> Yeah, there should be a validation phase after loading the map file, where all map items that are known to the game are validated. But checking all the data at this stage would mean we load everything into memory immediately, which heinrich was also against. 11:27 < bridge> but additionally the mapformat sadly saves 0-tiles (air tiles) 11:27 < bridge> 11:27 < bridge> so gotta iterate over all tiles 11:27 < bridge> that sucks too xd 11:28 < bridge> ok but he is against anything lmao 11:28 < bridge> I mostly meant that the frees are annoying from API usability point of view 11:28 < bridge> make a parameter list of stuff that we "want" to load 11:28 < bridge> and only load these things 11:28 < bridge> ofc. we don't need the credits or smth 11:29 < bridge> But you also need to load the image/sound from the data immediately 11:29 < bridge> does that actually affect performance that bad? twmpa always iterates over all tiles on map loads with checks and its still 95% decompression 11:29 < bridge> You wouldn't want image loading to fail later when it finds that the RGBA data was invalid 11:29 < bridge> yep is that a problem? 11:29 < bridge> i mean not like the images aren't used anyway 11:29 < bridge> they are loaded anyway later btw 11:29 < bridge> all at once 11:29 < bridge> Hmmm, basically you want a giant wrapper around the entire map 11:30 < bridge> i do that in dd-pg 11:30 < bridge> it still loads faster than ddnet-cpp 11:30 < bridge> the only thing it does additionally is having a bool list of stuff u want to load 11:30 < bridge> e.g. server doesn't need to load design tiles 11:30 < bridge> saves RAM etc. 11:31 < bridge> That would be checked by the map item validation 11:31 < bridge> don't we have newer c++ versions in ddnet now? couldn't we just use some smart pointer? 11:31 < bridge> Each data index needs to validated as well, at which point you load the respective data 11:31 < bridge> why cant the validator do it on per item base? 11:31 < bridge> Then it's not a pure validator anymore 11:31 < bridge> but it validates anything we use 11:31 < bridge> anything else is task of the editor 11:32 < bridge> If it also allocates another data structure that represents the validated map, but I guess that makes the most sense 11:32 < bridge> we don't need a pure validator. with that argument u'd need to check all maps u'll ever download xd 11:32 < bridge> even if not loaded 11:33 < bridge> Why? 11:33 < bridge> ah yes 11:33 < bridge> As long as it's not loaded it doesn't have to be validated 11:33 < bridge> we should introduce a cleaner data structure anyway 11:33 < bridge> working with the map data directly is kinda unclean imo 11:33 < bridge> yes 11:33 < bridge> that's my argument too 11:33 < bridge> it sounded like u want a validator that checks the whole map 11:33 < bridge> yeah, it's like we have to add validation everywhere separately where the items are used. much better to have a validated wrapper class 11:34 < bridge> i just wanted to say: 11:34 < bridge> - load everything that is requested(by a bool list) 11:34 < bridge> - check all these things 11:34 < bridge> 11:34 < bridge> => we can use it safely 11:34 < bridge> yep i agree 11:34 < bridge> I could offer twmap bindings :happy: 11:34 < bridge> tho there are multiple reasons why it could be a bad fit 11:38 < bridge> my dd-pg is still unclean and doesn't support sound but: 11:38 < bridge> it basically writes everything(that is possible) into a struct 11:38 < bridge> 11:38 < bridge> https://github.com/Jupeyy/dd-pg/blob/test5/game/shared-base/src/datafile.rs#L214-L237 11:38 < bridge> 11:38 < bridge> then another wrapper loads all stuff it needs from above strruct: 11:38 < bridge> https://github.com/Jupeyy/dd-pg/blob/test5/game/client-map/src/client_map.rs#L42-L45 11:38 < bridge> 11:38 < bridge> `render` & `upload_data` = all buffered stuff, images etc. 11:38 < bridge> `collision` = game layers 11:38 < bridge> `raw` should be private at some point probably 11:38 < bridge> 11:38 < bridge> so it should in theory never have to deal with the original raw file 11:39 < bridge> i think envelops are still handled from the raw data rn ^^ 11:40 < bridge> Are you checking `Header.m_Size` and `Header.m_Swaplen` already? 11:40 < bridge> yea, but with compatibility with that weird error in the past 11:40 < bridge> ah so you already know about https://github.com/teeworlds/teeworlds/commit/3dd1ea0d8f6cb442ac41bd223279f41d1ed1b2bb ? 11:41 < bridge> yes 11:41 < bridge> https://gitlab.com/Patiga/twmap/-/blob/bbee11a442b891270513c3f71cb3e79fb9d41778/twmap/src/datafile/parse.rs#L164 11:41 < bridge> good good, that also confused me when I first added some validation for teeworlds maps 11:42 < bridge> https://github.com/teeworlds/teeworlds/pull/2931/files#diff-84e820ca19b13c6f72bc344f3f5018944ff97293cf394806e7781d1ddeddb0c5R187-R194 11:42 < bridge> Never finished testing all of this, and the chance of merging were already less than 1% before oy went perma-afk 11:42 < bridge> what surprised me a lot was that in heinrich's map collection, many many maps fail in my parser because the zlib compression fails :thonk: 11:42 < bridge> not sure whats going on with those maps 11:43 < bridge> can u name a map? 11:43 < bridge> lemme check 11:44 < bridge> and maybe also send it xd 11:44 < bridge> i'd really wish we could break the map format. it's so wrong xd 11:45 < bridge> well i'll do it anyway xd 11:46 < bridge> I still want to revert that parallax-zoom-values-per-group change 11:46 < bridge> why do we even need an addon for that at all? 11:46 < bridge> you mean why we need custom values? 11:46 < bridge> yes 11:46 < bridge> I don't know actually 11:46 < bridge> Ravie says it breaks maps 11:47 < bridge> I have yet to see a proper example 11:47 < bridge> in the background? 11:47 < bridge> I was shown a map where it would've broken visuals **if** a certain element would've had transparency 11:47 < bridge> but the fix would've been easy 11:47 < bridge> yes 11:47 < bridge> mh ok 11:48 < bridge> Ravie's other argument was that it makes it harder to map, because you have to verify that the map looks good with and without parallax-zoom 11:48 < bridge> i'd argue that zoom is generally the hard part here 11:48 < bridge> my argument there was, that we retroactively activated it on **all** maps, and it only caused a non-issue on a single map 11:49 < bridge> https://github.com/ddnet/ddnet/issues/6196 11:53 < bridge> mhhhhhhhhhh 11:55 < bridge> i have to say i am rather confused what the current behavior of ddnet is then. it seems to only scale the first layer of the background? 11:55 < bridge> to me this sounds like an issue with our background zoom feature 11:55 < bridge> in general 11:55 < bridge> but i haven't thought about this enough yet 11:57 < bridge> maybe background is already a bad word: 11:57 < bridge> 11:57 < bridge> we have FAR away background 11:57 < bridge> 11:57 < bridge> and we have a "near" background 11:57 < bridge> here are three: 11:57 < bridge> https://heinrich5991.de/teeworlds/maps/maps/HeyYa_c17a348632a881f415ff126525cc219bd1d47d630e4b842610ce3af30cb2615c.map 11:57 < bridge> https://heinrich5991.de/teeworlds/maps/maps/Hope_4d354ebb30623192441c370558afb99163c5ac415b6be0bc23e5f6937a571bf5.map 11:57 < bridge> https://heinrich5991.de/teeworlds/maps/maps/Icy%20Morning_4c1030fc3b04d38fd967caedb00d7de734cae47c7f606c7019720366919d0991.map 11:57 < bridge> the FAR background must scale all elements 11:57 < bridge> ty 11:58 < bridge> no, Fireball made a nice video to show the difference https://www.youtube.com/watch?v=W7eXQN0gRFI 11:59 < bridge> All of them lead to the same crash dump because the image data seems to be truncated 12:00 < bridge> my point is maybe a different one 12:00 < bridge> parallex kinda emulates depth 12:00 < bridge> its about scaling all groups differently depending on their parallax value, to create a 'logical' zoom 12:00 < bridge> before, only parallax x == 0 + parallax y == 0 was a special case so that it doesn't get resized on zoom, but with the new parallax-zoom, its no longer a special case but simply integrated into the general case 12:00 < bridge> in the background parallex 0 would basically mean scale the background to fit 12:01 < bridge> a completely static background would not scale at all 12:01 < bridge> interesting. my checker only throws: `Io: corrupt deflate stream` 12:01 < bridge> exatly, it is infinitely far away, so moving the camera back and fourth doesn't change its size 12:02 < bridge> and you cannot calculate that mathematically? 12:02 < bridge> without an extra item? 12:02 < bridge> yes, thats also how its done 12:02 < bridge> if the value is not changed, its simply `max(parallax.x, parallax.y)` 12:03 < bridge> and those are also the values the editor writes on new maps 12:03 < bridge> but the values are editable for some reason 12:03 < bridge> The client also prints `datafile: uncompress error. result=-3 wanted=4194304 got=4173556` because zlib fails, but we don't check in other places if the image data was loaded and has the correct size 12:03 < bridge> yeah that's weird. 12:03 < bridge> 12:03 < bridge> But generally, we isn't this simply default behavior for all maps? 12:03 < bridge> it is the default behavior 12:03 < bridge> why a new map item 12:04 < bridge> ah, yes 12:04 < bridge> thats also my question 12:04 < bridge> I want that reverted currently 12:04 < bridge> (since like a year or so) 12:04 < bridge> yes 12:04 < bridge> what happens if the map item misses? 12:04 < bridge> does it not do any logical scale? 12:04 < bridge> ah its actually `clamp(max(parallax.x, parallax.y), 0, 100)` 12:05 < bridge> it simply calculates the value normally 12:05 < bridge> mh ok 12:05 < bridge> which I think is the correct behavior 12:05 < bridge> i get the same err xd 12:05 < bridge> just calculate the value 12:06 < bridge> wait ok, but if it's not missing and u didn't explicitly change it in the editor, it's the same value basically? 12:06 < bridge> are you also using the system zlib? 12:06 < bridge> yes 12:06 < bridge> i use deflate crate 12:07 < bridge> yeah then i guess it makes sense to not have it, except that guy that implemented it shows clear evidence that the math is wrong 12:07 < bridge> where? please show an example where its wrong. was the timeshop map actually changed? 12:07 < bridge> well that is my question too 12:08 < bridge> your issue is rather long 12:08 < bridge> did he reply with anything?= 12:08 < bridge> yes 12:08 < bridge> anything useful i mean xd 12:08 < bridge> https://github.com/ddnet/ddnet/issues/6196#issuecomment-1407683058 12:08 < bridge> not sure what you consider useful ^^ 12:09 < bridge> I'd say at this point that I'll quickly check with python which map has parallax zoom on non-default values 12:09 < bridge> but twmap doesn't parse that :d 12:10 < bridge> (see `Why the value is complicated to handle right now` in my discussion issue) 12:10 < bridge> he claims timeshop uses non default? 12:12 < bridge> the timeshop map up on ddnet servers does not use custom values, no 12:12 < bridge> interesting xd 12:12 < bridge> (cool map btw) 12:12 < bridge> maybe Fireball confused some stuff from early testing 12:13 < bridge> well anyway, i don't even remember why we got to this feature, but yeah, best is good default behavior xd 12:14 < bridge> if you want you could give a +1 on that issue or smth, I don't think I can really push it harder with just my own opinion 12:20 < bridge> @robyt3 do you have an opinion on parallax zoom? 12:21 < bridge> Haven't looked at it in detail. I suppose you could push harder by opening a PR with your proposed changes 12:21 < bridge> @patiga did u already try out egui xd 12:21 < bridge> no ^^ 12:21 < bridge> fair point 12:28 < bridge> @patiga what would be the biggest thing for you to change in the map format? 12:30 < bridge> hmm, I always liked your idea of adding shaders 12:30 < bridge> otherwise: switch the compression method with a much quicker one? 12:30 < bridge> I haven't given it much thought tbh 12:30 < bridge> add quad scaling to envelopes 12:30 < bridge> that was voxels idea xd 12:30 < bridge> @_voxeldoesart gud idea 12:31 < bridge> shaders would be cool, but uncontrolled code execution 12:31 < bridge> uncontrolled by us at least 12:31 < bridge> hm yea 12:32 < bridge> lets invent a new shading language :brownbear: 12:32 < bridge> yeah compression 100% agree 12:32 < bridge> and don't compress image data directly into the map format 12:32 < bridge> xd 12:32 < bridge> at least save it as png or smth, not weird zlib 12:32 < bridge> yep 12:32 < bridge> and i'd love to have the ability to set the clamp mode for quads 12:33 < bridge> i really dislike that mappers have to use an offset for the texture coordinates 12:33 < bridge> ```rust 12:33 < bridge> fn R (t:f32, mut x: 12:33 < bridge> f32,mut y:f32)->(f32,f32,){ 12:33 < bridge> let mut f=x;x-=t*y;y+=t*f;f=(3.-x 12:33 < bridge> *x-y*y)/2.;(x*f,y*f)}fn main() {let( 12:33 < bridge> mut x,mut y,mut o,mut N); let mut z:[f32; 12:33 < bridge> 1760];let mut a:f32=0.;let mut e:f32=1.;let 12:33 < bridge> mut c:f32=1.;let mut d:f32=0.;let (mut g,mut h, 12:33 < bridge> mut G,mut H,mut A,mut t,mut D);let(mut b):[char 12:33 < bridge> ;1760];loop{(z)=[0.; 1760];(g,h)=(0.,1.); 12:33 < bridge> b=[' ';1760];for TJ in 0..90{(G,H)=(0., 12:33 < bridge> 1.0);for M in 0.. 314{A=h+2.0;D=1./ 12:33 < bridge> (G*A*a+g*e+5.);t= (G*A*e)-(g*a);x=( 12:33 < bridge> 40.0+(30.0*D*(H*A *d-t*c)))as i32;y 12:33 < bridge> =(12.0+(15.*D*(H* A*c+t*d)))as i32; 12:33 < bridge> o=x+(80*y);N=(8.* (((g*a-G*h*e)*d)- 12:33 < bridge> G*h*a-g*e-H*h*c))as i32;if 0 z[o as usize]{z[o as usize] 12:33 < bridge> =D;b[o as usize]=b".,-~:;=!*#$@"[if N >0{N as// 12:33 < bridge> usize}else{0}]as char}(H,G)=R(0.02,H,G);}(h,g)= 12:34 < bridge> R(0.07,h,g);}for k in 0..=1760{print!("{}", 12:34 < bridge> if k%80!=0{b[k]}else{'\n' as char})}(e,a) 12:34 < bridge> =R(0.04,e,a);(d,c)=R(0.020,d,c);std:: 12:34 < bridge> thread::sleep(std::time::Duration 12:34 < bridge> ::from_millis(015));print!( 12:34 < bridge> "\x1b[23A");}}//TJ! 12:34 < bridge> ``` 12:34 < bridge> valid rust 12:34 < bridge> hm, couldn't the editor be improved to somewhat fix that? noone would notice a 1-pixel offset 12:34 < bridge> the problem is, that this is still not really fixable, considering that different mipmaps have different texture sizes 12:34 < bridge> a 10x10 texture would require a 1/10 offset 12:34 < bridge> we could also save the tilemap layers as png :feelsamazingman: 12:34 < bridge> (except for speedup) 12:34 < bridge> xd 12:34 < bridge> well who needs a differently sampled 10x10 texture, honestly :p 12:34 < bridge> what does it calculate @ryozuki 12:35 < bridge> https://www.reddit.com/r/rust/comments/17io61g/donutc_now_in_rust/ 12:35 < bridge> https://github.com/EvanZhouDev/TheDonutProject 12:35 < bridge> > This all started with donut.c, the classic C code that looks like, and generates a 3D spinning donut when run. Out of sheer curiosity, I searched up this code in different languages, and noticed that many people have created 3D spinning donuts in those languages... but their code mostly didn't look like a donut. 12:35 < bridge> my point is rather that the mipmap would leak other texels 12:36 < bridge> e.g. u have a 1000x1000 image in the editor 12:36 < bridge> 12:36 < bridge> so the editor adds 1/1000 as offset 12:36 < bridge> 12:36 < bridge> when zooming out tho, it would not work bcs the mipmap might be 10x10 12:36 < bridge> 1/1000 on a 10x10 would bleed 12:36 < bridge> if you haven't yet you could try out if https://crates.io/crates/cloudflare-zlib improves your map loading :D 12:36 < bridge> is it rust only? 12:37 < bridge> doesn't look like it, C 12:37 < bridge> does adding shaders bind us to a certain standard like opengl or vulkan, unable to change away from that? or is it even worse? 12:37 < bridge> but SIMD-accelerated, must be good :p 12:37 < bridge> yeah ^^ 12:37 < bridge> but i guess my map loading is ok now 12:37 < bridge> <1s for biggest ddnet map 12:37 < bridge> yup, you'd need to select a shading language 12:38 < bridge> there are transpilers 12:38 < bridge> but yea, that makes it difficult 12:39 < bridge> https://crates.io/crates/naga appears to be a good tool for shader translation 12:39 < bridge> mhh 12:39 < bridge> i used it xd 12:39 < bridge> it's very unfinished still sadly 12:39 < bridge> ow :c 12:39 < bridge> how so? 12:39 < bridge> i tried GLSL to spir-v 12:39 < bridge> is there some subset shader language that is supported by all graphic APIs? 12:40 < bridge> ah, naga and not that cloudflare thingy 12:40 < bridge> (and would thus likely be supported in the future as well) 12:40 < bridge> it has missing features like push-constants 12:40 < bridge> and generally seems to use a syntax that is closer to HLSL than GLSL xd 12:40 < bridge> that is what wgsl tries to be 12:40 < bridge> vulkan only supports spir-v 12:40 < bridge> which is made for webgpu 12:40 < bridge> nothing else 12:40 < bridge> (but can be translated to from wgsl for example) 12:40 < bridge> maybe you can compile wgsl to spir-v? 12:40 < bridge> ah 12:41 < bridge> wgsl seems quite new though, 2021 12:41 < bridge> will it still be around in ten years? 12:41 < bridge> I don't know 12:41 < bridge> i guess it's the opposite 12:41 < bridge> it will be around in 10years XD 12:42 < bridge> when browsers finally support it to 100% 12:42 < bridge> https://en.wikipedia.org/wiki/WebGPU @heinrich5991 the big players seem to be onboard 12:43 < bridge> > WebGPU is the working name for a potential web standard and JavaScript API for accelerated graphics and compute, aiming to provide "modern 3D graphics and computation capabilities". 12:43 < bridge> sounds good indeed. it might be better to wait until it's a standard so it doesn't change anymore 12:44 < bridge> the biggest problem is that it still relies on safe drivers to a certain extend 12:45 < bridge> ah, it's a security vulnerability? ^^ 12:45 < bridge> probably a lot more than loading a png 12:45 < bridge> well i wouldn't say it is 12:45 < bridge> if we're executing code 12:45 < bridge> yes 12:45 < bridge> https://www.khronos.org/webgl/security/ 12:45 < bridge> 12:45 < bridge> e.g. they specify what webgl has to check 12:45 < bridge> Jupstar when you don't have 20,000 fps: :cammostripes: 12:45 < bridge> so the browser might do all this 12:45 < bridge> but still doesn't mean the driver itself isn't exploitable 12:46 < bridge> that's not even my point here ^^ 12:46 < bridge> ah xd 12:46 < bridge> i managed to crash my PC with webgl2 12:46 < bridge> that doesn't directly mean it's unsafe 12:46 < bridge> but at least concerning xD 12:46 < bridge> well, DoS by making the machine crash is also a security vulnerability ^^ 12:47 < bridge> but yea, wgsl seems like the thing we'd need in order to enable shaders for maps 12:48 < bridge> https://security.stackexchange.com/a/13840 12:48 < bridge> random stackoverflow answer 12:48 < bridge> spir is an abbreviation just like llvm 😄 12:49 < bridge> note also webgpu is MUCH more powerful than webgl 12:49 < bridge> i only quote webgl here xd 12:49 < bridge> "Browsers have responded to this with a variety of defenses: they have blacklisted video cards with known security problems; they have tried to fix the known memory safety problems; and they have restricted use of WebGL per the same-origin policy, to prevent a malicious web site from using WebGL to spy on users' use of other web sites." 12:50 < bridge> this alone sounds like a hard to manage thing 12:50 < bridge> yea 12:50 < bridge> sounds like the code would need to be approved before being run in the client 12:51 < bridge> 2013 microsoft: https://web.archive.org/web/20130602040650/https://blogs.technet.com/b/srd/archive/2011/06/16/webgl-considered-harmful.aspx?Redirected=true 12:51 < bridge> (from the so answer) 12:58 < bridge> i guess wgsl with a limited subset of features could work out 12:58 < bridge> 12:58 < bridge> but in the end there is always a risk, even if u just write a endless loop or stuff like that, which is not in our control anymore (or the wgls converter) 13:00 < bridge> what happens if a shader runs into an endless loop btw? 13:01 < bridge> i dunno 13:01 < bridge> 13:01 < bridge> i can just say that i managed to crash my PC, by spamming many draw instances XD 13:02 < bridge> do shaders allow for loops? 13:02 < bridge> yeah 13:02 < bridge> shaders are kinda just mini programs 13:02 < bridge> without direct memory allocation access etc. 13:03 < bridge> i mean always depends on the graphics library, but spir-v is also used for the compute shaders 13:18 < bridge> Interesting that they aren’t limited to provably finite loops like eBPF 13:19 < bridge> i mean if u do a 13:19 < bridge> for i in 0..u64::MAX 13:19 < bridge> would u say this is a finite loop? 13:19 < bridge> strictly speaking yes 13:20 < bridge> matricks wanted to create a scripting language that provably terminates (in reasonable time) 13:21 < bridge> loops would have been forbidden, you'd be allowed to iterate only over certain arrays 13:21 < bridge> IIRC 13:21 < bridge> but can u iterate over arrays of arrays xd 13:21 < bridge> or the same array twice 13:21 < bridge> nested 13:22 < bridge> Yeah, but iirc eBPF also limits the amount of times you can loop, it’s a very rough time limit 13:22 < bridge> anyway shaders are not really limited at all and that's not really their idea. the limits they have are simply to fit the idea of a graphics pipeline and high parallelism 13:22 < bridge> probably not, or only twice deep 13:22 < bridge> or something like that 13:27 < bridge> anyway, before it sounds like i want to prevent that feature. i just want to make clear there are certain things i'd find concerning. 13:27 < bridge> 13:28 < bridge> If we disable loops etc. at some point u can also not use shaders but parameters to alter the rendering xd 13:28 < bridge> or human proof the shaders, before maps are released or smth 13:30 < bridge> <_voxeldoesart> :brownbear: 13:31 < bridge> yea a growing set of 'official' shaders with configurable parameters also sounds nice 13:31 < bridge> <_voxeldoesart> what type of shaders r u thinking 13:32 < bridge> well any, I guess ^^ 13:32 < bridge> textures, materials, post-processing 13:32 < bridge> get particles into it somehow 13:32 < bridge> dunno which ones ares the most important 13:33 < bridge> <_voxeldoesart> ooh yea ive always wanted a particles system 13:34 < bridge> <_voxeldoesart> https://cdn.discordapp.com/attachments/1009728757512278116/1039792177456353321/image.png?ex=654b2ded&is=6538b8ed&hm=932010431f257f4b22e47e6f6042e44d735ef9a887b032836f8a0144d693dde2& 13:34 < bridge> <_voxeldoesart> old partocle generator idea 13:34 < bridge> <_voxeldoesart> old particle generator idea 13:35 < bridge> <_voxeldoesart> what u could see and place in a map 13:35 < bridge> <_voxeldoesart> link it to an image n stuff 13:36 < bridge> <_voxeldoesart> smoke type goes up and is interactive 13:36 < bridge> <_voxeldoesart> spew type acts like a lil cannon 13:37 < bridge> is that even a shader xd 13:37 < bridge> sounds like u want custom physics 13:39 < bridge> <_voxeldoesart> oh 13:39 < bridge> <_voxeldoesart> tbh anything works at this point 13:39 < bridge> <_voxeldoesart> ddnet maps Need something new like this 13:40 < bridge> Particle system already exists, it's just disabled. Would be cool to enabled it again and add particle emitters as map tiles 13:40 < bridge> Particle flow system already exists, it's just disabled. Would be cool to enabled it again and add particle emitters as map tiles 13:42 < bridge> i wish i could show some stuff, but i am not far enough yet 13:42 < bridge> 13:42 < bridge> but generally i'd allow with the WASM runtime to even change client side graphics on a per server basis. so there wouldn't be any limiations on what you can change. 13:42 < bridge> 13:42 < bridge> but similar to shaders i'd only allow this if human prooved 13:44 < bridge> it also wouldn't be required to be added to the code base, so no bloating xd 13:45 < bridge> <_voxeldoesart> u know what would also be cool? envelope logic 13:46 < bridge> <_voxeldoesart> like, have envelopes that loop or just play once 13:46 < bridge> <_voxeldoesart> add tunes that start, stop and play certain envelopes 13:46 < bridge> the only sad thing about such envelopes is that spectating multiple teams wouldn't really work with them, or solo parts 13:46 < bridge> good morning 13:46 < bridge> just like switches also don't interact well with solo parts 13:49 < bridge> loop/play once is interesting, I guess you can do play once already, by placing an env point at like 1 day or smth 13:49 < bridge> (and loop is the default) 13:50 < bridge> <_voxeldoesart> yeah 13:52 < bridge> <_voxeldoesart> another spitball idea: different sounds for different textures 13:52 < bridge> materials 13:52 < bridge> <_voxeldoesart> grass hook noises, alongside stone, metal, stuff like that 13:52 < bridge> <_voxeldoesart> yea 13:52 < bridge> good 13:53 < bridge> learn rust and join robyte & me team or patiga & zwelf's team 13:56 < bridge> <_voxeldoesart> whats rust gotta do with that 13:58 < bridge> sounds like they are using rust 😃 13:58 < bridge> smone gotta code these features 13:58 < bridge> jupstar carry me in gores 13:58 < bridge> diep.io 13:58 < bridge> k 13:58 < bridge> <_voxeldoesart> well i dont know how to code low level 13:59 < bridge> <_voxeldoesart> i can provide concept art n stuff tho 13:59 < bridge> <_voxeldoesart> yea 13:59 < bridge> k 14:00 < bridge> i like this map very aesthetic 14:00 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1168172410051248229/image.png?ex=6550cc56&is=653e5756&hm=ca6b226166fd7cf5445e5b8a8a2647c929f6519b5c778d4881b3348e1698d507& 14:00 < bridge> @patiga what r u workn on rn 14:00 < bridge> how can i find u ingame 14:00 < bridge> Ewan 14:00 < bridge> 😃 14:00 < bridge> i dont have account 14:00 < bridge> xd 14:00 < bridge> o u wanna play ddrace 14:01 < bridge> no 14:01 < bridge> just have no kog acc yet 14:01 < bridge> @jupeyy_keks this 14:01 < bridge> :nouis: 14:01 < bridge> work on ddnet-next instead xds 14:01 < bridge> work on ddnet-next instead xd 14:01 < bridge> :p 14:01 < bridge> all ger servers are account servers :justatest: 14:02 < bridge> 74.91.114.169:8303 14:02 < bridge> 74.91.114.169:8303 appears to be a KoG server. DDNet and KoG aren't affiliated. 14:02 < bridge> Join their discord and ask for help there instead. 14:02 < bridge> ok sec 14:07 < bridge> <_voxeldoesart> cant wait for mirror materials in ddnet 14:07 < bridge> <_voxeldoesart> so u can walk past one n stuff 14:09 < bridge> <_voxeldoesart> i imagine they'd be like, tiles so that its easier to manage 14:10 < bridge> <_voxeldoesart> if u want custom shapes u can overlay graphics over them 14:53 < bridge> <_ilovesuicide_> i tried suicide 3 times and nothing 15:42 < ChillerDragon> i can open demos in my downloads folder via file manager gui "open with" is there a cli alternative for that? 15:42 < bridge> ./DDNet name.demo 15:43 < ChillerDragon> i tried 15:43 < bridge> but 15:43 < ChillerDragon> it just open ddnet 15:43 < bridge> mhh 15:43 < bridge> surprising 15:43 < ChillerDragon> yea i thought stuff like that works in modern 2023 ddnet 15:43 < ChillerDragon> maybe im doing something wrong 15:43 < bridge> It does, your computer broken 15:43 < ChillerDragon> ok 15:43 < ChillerDragon> i go buy new 15:43 < bridge> Install windings, is much better 15:43 < ChillerDragon> wat windings 15:44 < bridge> windoof 15:44 < bridge> hööhhö 15:44 < ChillerDragon> a 15:44 < ChillerDragon> wait does it work for you guys? 15:44 < bridge> I can even drag demos onto my ddnet shortcut, superior os 15:44 < ChillerDragon> i can probably too? maybe 15:44 < bridge> i think i've opened demos like that 15:44 < bridge> in fact our benchmark does that 15:45 < ChillerDragon> axaxax works in chilerbot 15:45 < bridge> if you drag the demo onto the file it passes the absolute path, which should work 15:46 < bridge> if you drag the demo onto ddnet it passes the absolute path, which should work 15:46 < ChillerDragon> idk wat cracklord version my DDNet in path is 15:46 < ChillerDragon> a nvm 15:46 < ChillerDragon> it was the demo name 15:46 < ChillerDragon> seems like it cant do spaces 15:46 < bridge> if you use a relative path then it has to be in your storage, also it has to include the `demos` folder 15:46 < bridge> you need "" to escape paths with spaces 15:46 < ChillerDragon> always these windows users and their spaces in filenames 15:46 < ChillerDragon> i know how to use bash -.- 15:46 < ChillerDragon> it didnt eat it 15:47 < ChillerDragon> does it work for u? 15:47 < ChillerDragon> wait now it does 15:47 < ChillerDragon> im confused af 15:47 < bridge> which command line are you using? 15:48 < ChillerDragon> bash 15:48 < ChillerDragon> wait i can reproduce again i restored old filename 15:48 < bridge> and the command you are running including the argument? 15:49 < ChillerDragon> ``DDNet team\ bug.demo`` 15:49 < bridge> Does it work with escaping the space? 15:49 < ChillerDragon> yes 15:49 < ChillerDragon> its same as ``DDNet 'team bug.demo'`` if it makes you nervouse 15:50 < ChillerDragon> neither work 15:50 < ChillerDragon> idk im stupid rn 15:50 < ChillerDragon> i managed to play "a a.demo" 15:50 < ChillerDragon> lemme try and error for a sec 15:50 < ChillerDragon> ah maybe because it starts with "team 15:50 < ChillerDragon> and thats a ddnet command 15:51 < ChillerDragon> yea pretty sure thats it 15:51 < ChillerDragon> i still blame the windows user that sent me a demo containing a space for that :p 15:51 < ChillerDragon> but the ddnet client could also not troll in that case 15:52 < bridge> In git bash it works with `./ddnet "C:\absolute\path\test 123.demo"` 15:52 < ChillerDragon> not test 123.demo 15:52 < ChillerDragon> do "team 123.demo" 15:53 < bridge> Also works, why would that make a difference? 15:53 < ChillerDragon> the file exists check should probably be before the is a command check 15:53 < ChillerDragon> i assume it runs the command ``team`` with "123.demo" as arg and calls it a day 15:53 < bridge> You are not passing an absolute path, are you? 15:53 < ChillerDragon> no 15:53 < ChillerDragon> relative 15:53 < bridge> Well 15:53 < bridge> How should the game find your file then? 15:54 < ChillerDragon> it works well for me 15:54 < bridge> Relative path works if the file is in a storage location 15:54 < ChillerDragon> idk how ddnet does it i assume it also checks relative 15:54 < ChillerDragon> yea $currentdir 15:54 < ChillerDragon> should be there in a vanilla storage.cfg 15:54 < ChillerDragon> works wonderfully for me 15:55 < ChillerDragon> unless it starts with a valid ddnet command 15:55 < ChillerDragon> u get what im saying right? 15:55 < bridge> Interesting, I can reproduce it 15:56 < ChillerDragon> this quits my client ``DDNet "quit game.demo"`` and this plays a demo ``DDNet "game quit.demo"`` 15:56 < bridge> Workaround: use play command instead 15:56 < bridge> I'm not sure it's solveable easily 15:57 < ChillerDragon> play command is pain to quote its almost slower than opening ui 15:57 < bridge> The way it works is that we register an "unknown command handler" for the console temporarily, but because `team 123.demo` is not an unknown command it doesn't reach it 15:57 < ChillerDragon> yea if its pain to fix it dont its an edge case 15:57 < ChillerDragon> i just insult the user who sent me the demo and call it a day 15:58 < bridge> We previously tried to check if the command line argument and in `.demo` but that breaks on other edge cases 15:58 < bridge> We previously tried to check if the command line argument end in `.demo` but that breaks on other edge cases 15:58 < ChillerDragon> yea thats not better 15:59 < ChillerDragon> it should check if the file exist if it does then check the ending if its map use it as map if its demo use it as demo. And otherwise fallback to interpreting it as commands. 15:59 < ChillerDragon> seems doable 16:00 < ChillerDragon> just run that check in the very beginning before any command handler. Only if argc is 1 16:00 < bridge> Could get a bit weird. If you open the client with `./DDNet "play my.demo"` should it execute `play my.demo` or open the demo `play my.demo` 16:01 < bridge> Assuming both demos exist 16:01 < ChillerDragon> also TIL that the commands are case insenstive. I assumed ``Team`` to not match the ``team`` command 16:01 < ChillerDragon> oh yea you are right 16:02 < ChillerDragon> i guess my gui open with expands the path and thats why it worked on the demo 16:03 < bridge> yeah, GUIs should pass the absolute path, so it should only be an issue for edge cases in the CLI 16:04 < ChillerDragon> yea cli users will manage (he said after asking for help in #developer and being confused for 10minutes xd) 16:04 < ChillerDragon> but in general i can see demos matching that pattern quite often since there are so many one word commands and all the windows users love spaces and it even matches case insensitive 16:05 < bridge> `DDNet.exe ./team\ 123.demo` with `./` also works 16:06 < ChillerDragon> well neither my bash nor my zsh tab completion expands the ./ so i would have to manually type ./ :c 16:06 < ChillerDragon> but yea much better workaround than using the play command :) 16:06 < bridge> That's where remappable keyboard key come into play :justatest: 16:07 < ChillerDragon> lmao 16:07 < ChillerDragon> i rather fork bash before i remap my keyboard 16:07 < ChillerDragon> or fork readline i guess its not even bash who handles that is it? 16:08 < ChillerDragon> there is probably hooks for it 16:08 < ChillerDragon> windows does that if i remember correctly 16:08 < ChillerDragon> you do foo and it gives your the .\foo.ps1 16:09 < bridge> yeah, seems like it works that way in PowerShell but not in Bash 16:09 < ChillerDragon> omg my windows knowledge is top tier 16:10 < bridge> Q 16:13 < ChillerDragon> uhm can you turn off teams in the autoexec.cfg? 16:13 < ChillerDragon> i never bothered to figure out and always edited the default in the code or added it to map settings 16:13 < bridge> Ye 16:13 < ChillerDragon> how? 16:13 < bridge> sv_team 16:13 < bridge> or sv_teams 16:13 < bridge> sv_team 0 16:13 < bridge> BUT 16:14 < ChillerDragon> in the autoexec.cfg without config reload? 16:14 < bridge> It forces it to 0 in the src code somewhere 16:14 < ChillerDragon> 0 is what i want xd 16:14 < ChillerDragon> i cant get it off 16:14 < bridge> Ah, 1* 16:15 < ChillerDragon> yea so adding ``sv_team 0`` does not work that much i know 16:15 < ChillerDragon> but what is the clean way to set it then? 16:15 < ChillerDragon> editing the map is not an option 16:15 < bridge> you need to do smth in gamecontext.cpp afaik 16:16 < bridge> It's called ddrace options or sum 16:16 < ChillerDragon> in the code? fr 16:16 < bridge> Y 16:16 < ChillerDragon> cant i set it in my config somehow -.- 16:17 < bridge> you can set it in the reset file or in the map config 16:17 < bridge> if I read the source code correctly 16:18 < bridge> Can you send the part where it does that? 16:19 < ChillerDragon> ok lemme try putting it in reset.cfg 16:19 < bridge> https://github.com/ddnet/ddnet/blob/110247f08f87392c883cc2c266125f11cab96de0/src/game/server/gamecontext.cpp#L3573-L3582 16:25 < bridge> https://udoprog.github.io/rust/2023-10-28/stop-worrying.html 16:26 < ChillerDragon> works thanks for reading the code when im too lazy to do it @heinrich5991 i hoped someone would know already 18:14 < bridge> Since when does DDRace have moving freeze tiles? 18:14 < bridge> how do i convert uint to hsla :pepeW: 18:15 < bridge> uint *what*? 18:15 < bridge> it doesnt. its kog specific 18:15 < bridge> Ah! Gotcha 18:15 < bridge> unsigned int 32 to HSLA color format 18:15 < bridge> im sure there is some function for that in ddnet code but i cant find it 18:15 < bridge> 1 byte per value 18:16 < bridge> Either the color constructors or `UnpackAlphaLast` 18:16 < bridge> Didn't dive directly into the code in a long while so unsure if there already is 18:16 < bridge> Roby here to save the day! 18:16 < bridge> `UnpackAlphaLast` is for HSLA/RGBA, the constructors use AHSL, ARGB 18:18 < bridge> I assume this is used for the skin colors? Since images are RGB/RGBA 18:19 < bridge> Skins colors are saved in AHSL format, editor saves colors in RGBA 18:19 < bridge> Weird inconsistency 18:20 < bridge> I mean it does kind of make sense given that skin colors are modulated and not set 18:20 < bridge> Skins are also weird because they don't use the full L-value for HSL 18:21 < bridge> Is that only a limit set by the game's slider or is that actually limited in the code? 18:21 < bridge> Should be limited in code when the colors are received by clients, otherwise we would have more players with completely black skins running around 18:22 < bridge> I do remember that being a think way back in the day 18:22 < bridge> Like, 0.5 time 18:22 < bridge> Rainbow skins too, although I assume these are still around 18:24 < bridge> sadly not bcs of info change delay on servers 18:24 < bridge> Oh, oh well, it is what it is 19:15 < bridge> im so confused. 19:15 < bridge> ```cpp 19:15 < bridge> RenderInfo.m_ColorBody = color_cast(ColorHSLA(g_Config.m_ClPlayerColorBody)); 19:15 < bridge> dbg_msg("Players.cpp", "%d == %f,%f,%f,%f", g_Config.m_ClPlayerColorBody, RenderInfo.m_ColorBody.r, RenderInfo.m_ColorBody.g, RenderInfo.m_ColorBody.b, RenderInfo.m_ColorBody.a); 19:15 < bridge> ``` 19:15 < bridge> why would the rgb values always be 0 no matter that the body color is? 19:35 < bridge> When I try to compile DDNet I get this error (main/master branch): 19:35 < bridge> ``` 19:35 < bridge> -- Building vulkan shaders 19:35 < bridge> /home/USER/Development/ddnet/data/shader/vulkan/quad.vert 19:35 < bridge> error: line 1: Capability cannot appear before the memory model instruction 19:35 < bridge> OpCapability Shader 19:35 < bridge> ``` 19:36 < bridge> i just had to do .UnclampLighting() 20:31 < bridge> to me rainbow visuals are still the coolest. 20:31 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1168270885015277578/Whispering_2023-10-29_20-29-34_replay.mp4?ex=6551280c&is=653eb30c&hm=a12f96d38fdf68f7f3ad5e8eeb0dd29bf12d6437c4deb97db67adbf68b513f7f& 20:33 < bridge> Yeah, why not 20:55 < bridge> <_voxeldoesart> now program in bloom :monkalaugh: 21:00 < bridge> does anyone know how to put a points system on the ddrace server? 21:16 < bridge> There is a point system? 21:23 < bridge> You mean in the scoreboard? 21:23 < bridge> You can choose between time format and points 21:23 < bridge> Or smth else 21:24 < bridge> Create in database table with points, table with points for finishing map and code system for it xd 21:52 < bridge> For what ? 22:05 < bridge> https://twitter.com/cmzw_/status/1718634235664445866 22:05 < bridge> https://vxtwitter.com/cmzw_/status/1718634235664445866 22:59 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1168308182137970879/60s4oc1jy5xb1.webp?ex=65514ac8&is=653ed5c8&hm=e545e0f73987b6ea22db090ac1f3d67ace945b43800d66bee4a78435eee18d83& 23:00 < bridge> uuuhmmm 23:01 < bridge> dis supposed to be a joke or something to demonstrate something? 23:04 < bridge> its a joke 23:04 < bridge> i guess u dont know js and c# 23:04 < bridge> i mean java 23:04 < bridge> Well I do but I'm kinda xonfused 23:04 < bridge> xd 23:04 < bridge> its just imitating js and java in c++ 23:05 < bridge> you can do python in C xd 23:05 < bridge> u made the joke boring now 23:05 < bridge> :c 23:05 < bridge> sry :< 23:06 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1168309804754813029/RDT_20231016_2224002171473661244753011.jpg?ex=65514c4b&is=653ed74b&hm=a29fcf8cb07623bd4eb98fe508147cca6c1413699b88bf09b02f9a0994e28fd2& 23:06 < bridge> hope this fixes it :> 23:11 < bridge> I also have a duck 🦆 if that helps :c 23:11 < bridge> :ferrisBorrowCheck: