02:32 < bridge> hello. what is the format for map files and is there a way to load a map on startup? 03:33 < bridge> @syrinok 🫃 03:57 < bridge> Stake gives a 1500$! When you register using the promo code "em4fh4bj65" - [Stake.com/auth/register?promo=em4fh4bj65](http://stakes.money/auth/register?promo=em4fh4bj65) 03:58 < bridge> @Discord Mod 04:39 < bridge> why did he step down 09:26 < bridge> Load map where on startup of what? 10:30 < bridge> wait does this bug not happen without max-speed? This would indeed be very helpful, can anybody confirm this? 10:40 < bridge> [this code](https://github.com/ddnet/ddnet/blob/85a30b6c6dcda31e791f8f3953d72adab6a813d6/src/game/server/entities/character.cpp#L1436) is a mess and I see at least 2 divisions by zero. 11:03 < bridge> Looks messy indeed. Looks they actually wanted to compare against < -0.00001 11:03 < bridge> 11:03 < bridge> So it can't be null 11:04 < bridge> agreed, because the else case asin(-1) would be the same as atan(Infitiy) here (in terms of angle) 11:04 < bridge> same below for TempVel btw 11:07 < bridge> going to make a PR 12:22 < bridge> Nothing interesting, wanted some time off 13:51 < bridge> just leave it on by default 15:26 < bridge> it's used in some maps, no? 15:27 < bridge> nigga 15:27 < bridge> nigger 15:27 < bridge> nigga 15:27 < bridge> niggamen 15:27 < bridge> nigger 15:27 < bridge> i hate nigger 15:27 < bridge> fuck nigga mans 15:27 < bridge> @Discord Mod 15:27 < bridge> fuck people of color black 15:27 < bridge> shut up 15:27 < bridge> i hate nigger 15:28 < bridge> goddamn bro its not even night 15:28 < bridge> keep yourself safe (kys) 15:29 < bridge> mentioned maps: Pharaoh, Broken brain, Cosyris, Binary 15:30 < bridge> if anyone knows any other map that relies on speedtile max speed bug please mention it in this pr! 15:30 < bridge> Fly to the moon xdd 15:31 < bridge> it doesnt rely on it, but if u want r1 15:36 < bridge> Binary is a different mapbug, has nothing to do with this 15:36 < bridge> @gerdoe `Jelly` is another map, but this uses yet another speedtile bug 💀 15:38 < bridge> what happened 15:40 < bridge> just typical discord spam 15:42 < bridge> can you show me where? I can't find a single speedtile with max-speed set in that map 15:43 < bridge> in the rocket 15:43 < bridge> bottom of map i think 15:45 < bridge> @robyt3 can we talk about your suggestion? 15:48 < bridge> yes 15:54 < bridge> how is this not the same (logically) 15:54 < bridge> `else if(Direction.x < -0.0000001f || (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) && Direction.x < 0.0000001f))` 15:54 < bridge> vs 15:54 < bridge> `else if(Direction.x < (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) ? 0.0000001f : -0.0000001f))` 15:55 < bridge> can you send a screenshot, I may be blind ;_; 16:03 < bridge> @robyt3 16:06 < bridge> If `GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED)` is true then the first is equivalent to `else if(Direction.x < -0.0000001f || Direction.x < 0.0000001f)` which is not the same as the original buggy version 16:07 < bridge> it is 16:08 < bridge> `else if(Direction.x < -0.0000001f || Direction.x < 0.0000001f)` is the same as `else if(Direction.x < 0.0000001f)` which is the original buggy version 16:09 < bridge> ah, true, but I think my variant makes this a lot clearer 16:10 < bridge> just make a new speedyile bug that actually works 16:10 < bridge> speed tile* 16:10 < bridge> just woke up :justatest: 16:11 < bridge> if `GameServer()->EmulateBug` is expensive, my variant is cheaper, that's why I wrote it like this, I am going to take a look at EmulteBug 16:14 < bridge> @robyt3 it's a bit more expensive with multiple function calls, but might be very well optimized out by branch prediction, what is your final verdict? I guess switching to yours 16:20 < bridge> I prefer readability unless there's a measurable performance improvement. Not sure about the PR in general though, maybe other maintainers prefer not changing physics 16:21 < bridge> Only problem is that it probably affects many maps 16:21 < bridge> from a speedrun pov 16:21 < bridge> i say make a new tile 16:21 < bridge> speedup layer is effectively empty anyways 16:22 < bridge> having multiple behaviors for a single feels like bad practice, unfortunately ddnet already has a lot of these cases 16:22 < bridge> I should probably run a script checking all maps for speedtiles with max_speed set 16:23 < bridge> this already has an edge case with speed 255, which is also bugged. I also like the idea of adding a new speed tile instead 16:25 < bridge> yes, would be good, if we want to merge this, if we can be relatively sure that all maps that use this bug are marked properly 16:27 < bridge> existing affected maps also have to be changed to add the `mapbug` server setting, otherwise the hardcoded mapbug hashes are brittle and will break if any of the maps are changed later 17:10 < bridge> @learath2 hi, can you help me xd. I was trying to make an interference using this vid (https://www.youtube.com/watch?v=eeXk_ec1n6g), at ~11:30 there's an algorithm how to calculate it, I implemented it and wrote a test program 17:10 < bridge> ``` 17:10 < bridge> +--------------+ defs {%1, %2} 17:10 < bridge> |%0: | uses {%1} 17:10 < bridge> |%1 = 1 + 1 | in {%1, %4} 17:10 < bridge> |%2 = 0 + %1 | out {%1, %2, %4} 17:10 < bridge> |goto %3 | 17:10 < bridge> +--------------+ 17:11 < bridge> +--------------+ defs {%4} 17:11 < bridge> |%3: | uses {%1, %2, %4} 17:11 < bridge> |%4 = %1 + %2 | in {%1, %2, %4} 17:11 < bridge> |ret %4 | out {∅} 17:11 < bridge> +--------------+ 17:11 < bridge> ``` 17:11 < bridge> but it gives a weird in variables for block `%0` block, is it my skill issues or it's the correct answer? 17:12 < bridge> @learath2 hi, can you help me xd. I was trying to make an interference graph using this vid (https://www.youtube.com/watch?v=eeXk_ec1n6g), at ~11:30 there's an algorithm how to calculate it, I implemented it and wrote a test program 17:12 < bridge> ``` 17:12 < bridge> +--------------+ defs {%1, %2} 17:12 < bridge> |%0: | uses {%1} 17:12 < bridge> |%1 = 1 + 1 | in {%1, %4} 17:12 < bridge> |%2 = 0 + %1 | out {%1, %2, %4} 17:12 < bridge> |goto %3 | 17:12 < bridge> +--------------+ 17:12 < bridge> +--------------+ defs {%4} 17:12 < bridge> |%3: | uses {%1, %2, %4} 17:12 < bridge> |%4 = %1 + %2 | in {%1, %2, %4} 17:12 < bridge> |ret %4 | out {∅} 17:12 < bridge> +--------------+ 17:12 < bridge> ``` 17:12 < bridge> but it gives a weird in variables for block `%0` block, is it my skill issues or it's the correct answer? 17:15 < bridge> @learath2 hi, can you help me xd. I was trying to make an interference graph using this vid (https://www.youtube.com/watch?v=eeXk_ec1n6g), at ~11:30 there's an algorithm how to calculate it, I implemented it and wrote a test program 17:15 < bridge> ``` 17:15 < bridge> +--------------+ defs {%1, %2} 17:15 < bridge> |%0: | uses {%1} 17:15 < bridge> |%1 = 1 + 1 | in {%1, %4} 17:15 < bridge> |%2 = 0 + %1 | out {%1, %2, %4} 17:15 < bridge> |goto %3 | 17:15 < bridge> +--------------+ 17:15 < bridge> +--------------+ defs {%4} 17:15 < bridge> |%3: | uses {%1, %2, %4} 17:15 < bridge> |%4 = %1 + %2 | in {%1, %2, %4} 17:16 < bridge> |ret %4 | out ∅ 17:16 < bridge> +--------------+ 17:16 < bridge> ``` 17:16 < bridge> but it gives a weird in variables for block `%0` block, is it my skill issues or it's the correct answer? 17:51 < bridge> id much rather have a new speed tile 17:51 < bridge> maybe a tile that can forcefully set a tees speed to something specific 17:52 < bridge> as well 17:52 < bridge> instead of needing some stinky speeder setup 17:55 < bridge> what was i on last night 😭 17:55 < bridge> https://cdn.discordapp.com/attachments/293493549758939136/1337829064366489600/Screenshot_20250208_115444_Chrome.jpg?ex=67a8dde8&is=67a78c68&hm=6849953e1233d5c2082aaa1ea4b082c6a8b179fc500cd81898f92f5dea6af4c5& 18:24 < bridge> I am going to explore this idea 👍 18:31 < bridge> would be funny to have nade speedup tiles 18:31 < bridge> but i dont think it would lead to good maps 😹 19:20 < bridge> I wonder, would it be possible to have tiles applying tunes to a player instead of having the tunes as we know them (applied to the server or area)? 19:27 < bridge> a pr was merged with this behavior recently 19:27 < bridge> @learath2 hi, can you help me xd. I was trying to make an interference graph using this vid (https://www.youtube.com/watch?v=eeXk_ec1n6g), at ~11:30 there's an algorithm how to calculate it, I implemented it and wrote a test program 19:27 < bridge> ``` 19:27 < bridge> +--------------+ defs {%1, %2} 19:27 < bridge> |%0: | uses {%1} 19:27 < bridge> |%1 = 1 + 1 | in {%1, %4} 19:27 < bridge> |%2 = 0 + %1 | out {%1, %2, %4} 19:28 < bridge> |goto %3 | 19:28 < bridge> +--------------+ 19:28 < bridge> +--------------+ defs {%4} 19:28 < bridge> |%3: | uses {%1, %2, %4} 19:28 < bridge> |%4 = %1 + %2 | in {%1, %2, %4} 19:28 < bridge> |ret %4 | out ∅ 19:28 < bridge> +--------------+ 19:28 < bridge> ``` 19:28 < bridge> but it gives a weird in variables for block `%0` block, is it my skill issues or it's the correct answer? 19:28 < bridge> 19:28 < bridge> UPD. uses were calculated wrongly 19:28 < bridge> @learath2 hi, can you help me xd. I was trying to make an interference graph using this vid (https://www.youtube.com/watch?v=eeXk_ec1n6g), at ~11:30 there's an algorithm how to calculate it, I implemented it and wrote a test program 19:28 < bridge> ``` 19:28 < bridge> +--------------+ defs {%1, %2} 19:28 < bridge> |%0: | uses {%1} 19:28 < bridge> |%1 = 1 + 1 | in {%1, %4} 19:28 < bridge> |%2 = 0 + %1 | out {%1, %2, %4} 19:28 < bridge> |goto %3 | 19:28 < bridge> +--------------+ 19:28 < bridge> +--------------+ defs {%4} 19:28 < bridge> |%3: | uses {%1, %2, %4} 19:28 < bridge> |%4 = %1 + %2 | in {%1, %2, %4} 19:28 < bridge> |ret %4 | out ∅ 19:28 < bridge> +--------------+ 19:28 < bridge> ``` 19:28 < bridge> but it gives a weird in variables for block `%0` block, is it my skill issues or it's the correct answer? 19:28 < bridge> 19:28 < bridge> it's mainly for mod support but it can be extended to support tune lock (which is a pending pr) 19:29 < bridge> Oh I wasn't aware 19:29 < bridge> It could be fun to have different settings for different players 19:29 < bridge> Like one has a short hook, or a stronger grenade 19:31 < bridge> @pipou_tw we could make arctic festivity v2 with that much power 19:31 < bridge> pending since 2022 :/\ 19:31 < bridge> pending since 2022 :/ 19:31 < bridge> but im MAD because tune lock is at the back burner! 19:31 < bridge> Everything is 19:33 < bridge> when tune lock gets merged im gonna start mapping 19:45 < bridge> its incomplete iirc 19:50 < bridge> someone should take over the pr i guess 19:51 < bridge> same for 128p support 19:54 < bridge> ^^^^^ 20:42 < bridge> https://x.com/melqtx/status/1888140533215662231 20:42 < bridge> 😂 20:57 < bridge> looks at robyt3 21:27 < bridge> were you affected by the clean code propaganda? 21:28 < bridge> this doesnt look clean 21:28 < bridge> at least the whole std::any part 21:29 < bridge> It doesn't even work correctly AFAICT because `std::find` compares the addresses of the strings and not the strings' contents 21:29 < bridge> ohhh 21:30 < bridge> so how would i fix it, in tangent of the new CheckIndexFlags function? 21:30 < bridge> maybe return -1 if none match and an input bool is true? 21:34 < bridge> I'm not really familiar with the automapper code. Either use a plain old loop instead of `std::find`, or use `std::find_if` and pass a predicate lambda that uses `str_comp` to find the matching entry. By default `std::find` will compare objects with `==`, so it will compare the strings' addresses. 21:35 < bridge> Prefer using `std::optional` if you want to represent the absence of a value instead using a magic value like -1 21:37 < bridge> hell yeah options mentioned 21:39 < bridge> if u use string but not const char*, i think u can use std::find 21:39 < bridge> I did have a silly idea that I want to try, but I'd need to be home in order to try it. 21:40 < bridge> We only use `std::string` sparingly though 21:42 < bridge> Somthing like: 21:42 < bridge> ```cpp 21:42 < bridge> NewIndexInfo.m_Flag = CheckIndexFlag(NewIndexInfo.m_Flag, aOrientation1, true); 21:42 < bridge> if(NewIndexInfo.m_Flag == 0 && str_comp(aOrientation1, "NONE")) 21:42 < bridge> NewIndexInfo.m_TestFlag = false;``` 21:45 < bridge> we could change that :greenthing: 21:49 < bridge> dunno what use itd have that we cant already do 21:50 < bridge> We already use it were it makes sense, e.g. when we want to handle any length and the alternative is just doing `malloc` manually, but we don't want to use `std::string`s where performance matters 21:52 < bridge> I admit having written java before 22:34 < bridge> yes please, don't change physics... 23:09 < bridge> <0xdeen> @coke1465 Thanks! 23:09 < bridge> np 23:15 < bridge> yes and the difference would be minimal, but there would need to be a reset tile added as well 23:15 < bridge> also something something implications about skipping tunes