Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.org/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories β€” IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2025-02-08 00:00 and 2025-02-09 00:00
Avatar
david loves Jellycar Worlds 2025-02-08 01:32
hello. what is the format for map files and is there a way to load a map on startup?
Avatar
Avatar
GitHub
Click to see attachment πŸ–ΌοΈ
@Skeith πŸ«ƒ
Avatar
why did he step down
Avatar
chillerdragon BOT 2025-02-08 08:26
Load map where on startup of what?
Replying to @david loves Jellycar Worlds hello. what is the format for map files and is there a way to load a map…
Avatar
Avatar
cyberfighter 2
just dont use speeders with a speed limit
wait does this bug not happen without max-speed? This would indeed be very helpful, can anybody confirm this?
Avatar
this code is a mess and I see at least 2 divisions by zero.
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
Avatar
Assa
this code is a mess and I see at least 2 divisions by zero.
Jupstar βœͺ 2025-02-08 10:03
Looks messy indeed. Looks they actually wanted to compare against < -0.00001 So it can't be null
Avatar
agreed, because the else case asin(-1) would be the same as atan(Infitiy) here (in terms of angle)
10:04
same below for TempVel btw
10:07
going to make a PR
Avatar
GitHub BOT 2025-02-08 10:10

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-ad...
Avatar
Avatar
Ewan
why did he step down
Nothing interesting, wanted some time off
Avatar
cyberfighter 2 2025-02-08 12:51
just leave it on by default
Avatar
Avatar
GitHub
Click to see attachment πŸ–ΌοΈ
it's used in some maps, no?
Avatar
MilkeeyCat 2025-02-08 14:27
@Discord Mod
Avatar
goddamn bro its not even night
14:28
keep yourself safe (kys)
Avatar
Avatar
zhn
it's used in some maps, no?
mentioned maps: Pharaoh, Broken brain, Cosyris, Binary
Avatar
Avatar
GitHub
Click to see attachment πŸ–ΌοΈ
if anyone knows any other map that relies on speedtile max speed bug please mention it in this pr!
Avatar
Jupstar βœͺ 2025-02-08 14:30
Fly to the moon xdd
14:31
it doesnt rely on it, but if u want r1
Avatar
Avatar
zhn
mentioned maps: Pharaoh, Broken brain, Cosyris, Binary
Binary is a different mapbug, has nothing to do with this
14:36
@zhn Jelly is another map, but this uses yet another speedtile bug πŸ’€
Avatar
Avatar
zhn
keep yourself safe (kys)
what happened
Avatar
Avatar
Hecta
what happened
Jupstar βœͺ 2025-02-08 14:40
just typical discord spam
Avatar
Avatar
Jupstar βœͺ
it doesnt rely on it, but if u want r1
can you show me where? I can't find a single speedtile with max-speed set in that map
Avatar
Avatar
Assa
can you show me where? I can't find a single speedtile with max-speed set in that map
Jupstar βœͺ 2025-02-08 14:43
in the rocket
14:43
bottom of map i think
Avatar
@Robyt3 can we talk about your suggestion?
Avatar
how is this not the same (logically) else if(Direction.x < -0.0000001f || (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) && Direction.x < 0.0000001f)) vs else if(Direction.x < (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) ? 0.0000001f : -0.0000001f))
Avatar
Avatar
Jupstar βœͺ
in the rocket
can you send a screenshot, I may be blind ;_;
Avatar
@Robyt3
Avatar
Avatar
Assa
how is this not the same (logically) else if(Direction.x < -0.0000001f || (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) && Direction.x < 0.0000001f)) vs else if(Direction.x < (GameServer()->EmulateBug(BUG_SPEEDTILE_MAXSPEED) ? 0.0000001f : -0.0000001f))
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
15:08
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
Avatar
ah, true, but I think my variant makes this a lot clearer
Avatar
just make a new speedyile bug that actually works
15:10
speed tile*
15:10
just woke up justatest
Avatar
Avatar
Robyt3
ah, true, but I think my variant makes this a lot clearer
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
15:14
@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
Avatar
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
Avatar
Jupstar βœͺ 2025-02-08 15:21
Only problem is that it probably affects many maps
15:21
from a speedrun pov
Avatar
i say make a new tile
15:21
speedup layer is effectively empty anyways
15:22
having multiple behaviors for a single feels like bad practice, unfortunately ddnet already has a lot of these cases
Avatar
Avatar
Jupstar βœͺ
Only problem is that it probably affects many maps
I should probably run a script checking all maps for speedtiles with max_speed set
Avatar
Avatar
louis
having multiple behaviors for a single feels like bad practice, unfortunately ddnet already has a lot of these cases
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
Avatar
Avatar
Assa
I should probably run a script checking all maps for speedtiles with max_speed set
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
15:27
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
Avatar
MilkeeyCat 2025-02-08 16:10
@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 +--------------+ defs {%1, %2} |%0: | uses {%1} |%1 = 1 + 1 | in {%1, %4} |%2 = 0 + %1 | out {%1, %2, %4} |goto %3 | +--------------+ +--------------+ defs {%4} |%3: | uses {%1, %2, %4} |%4 = %1 + %2 | in {%1, %2, %4} |ret %4 | out βˆ… +--------------+ but it gives a weird in variables for block %0 block, is it my skill issues or it's the correct answer? UPD. uses were calculated wrongly (edited)
Avatar
Avatar
Assa
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
cyberfighter 2 2025-02-08 16:51
id much rather have a new speed tile
16:51
maybe a tile that can forcefully set a tees speed to something specific
16:52
as well
16:52
instead of needing some stinky speeder setup
Avatar
what was i on last night 😭
Avatar
Avatar
cyberfighter 2
id much rather have a new speed tile
I am going to explore this idea πŸ‘
Avatar
would be funny to have nade speedup tiles
17:31
but i dont think it would lead to good maps 😹
Avatar
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)?
Avatar
Avatar
Pipou
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)?
a pr was merged with this behavior recently
18:27
it's mainly for mod support but it can be extended to support tune lock (which is a pending pr)
Avatar
Oh I wasn't aware
18:29
It could be fun to have different settings for different players
18:29
Like one has a short hook, or a stronger grenade
Avatar
@Pipou we could make arctic festivity v2 with that much power
πŸ˜‚ 1
Avatar
Avatar
louis
it's mainly for mod support but it can be extended to support tune lock (which is a pending pr)
pending since 2022 :/ (edited)
Avatar
but im MAD because tune lock is at the back burner!
Avatar
chillerdragon BOT 2025-02-08 18:31
Everything is
Avatar
when tune lock gets merged im gonna start mapping
Avatar
Avatar
kebs
pending since 2022 :/ (edited)
its incomplete iirc
Avatar
Avatar
louis
its incomplete iirc
someone should take over the pr i guess
18:51
same for 128p support
Avatar
^^^^^
Avatar
just realized open source is just one person who actually does the whole thing and the rest of the 1000+ contributor is there to just edit the readme
19:42
πŸ˜‚
Avatar
Avatar
Hecta
what was i on last night 😭
Koll Potato 2025-02-08 20:27
were you affected by the clean code propaganda?
Avatar
this doesnt look clean
20:28
at least the whole std::any part
Avatar
It doesn't even work correctly AFAICT because std::find compares the addresses of the strings and not the strings' contents
20:30
so how would i fix it, in tangent of the new CheckIndexFlags function?
20:30
maybe return -1 if none match and an input bool is true?
Avatar
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.
Avatar
Avatar
Hecta
maybe return -1 if none match and an input bool is true?
Prefer using std::optional if you want to represent the absence of a value instead using a magic value like -1
Avatar
Koll Potato 2025-02-08 20:37
hell yeah options mentioned
Avatar
if u use string but not const char*, i think u can use std::find
Avatar
I did have a silly idea that I want to try, but I'd need to be home in order to try it.
Avatar
Avatar
Pioooooo
if u use string but not const char*, i think u can use std::find
We only use std::string sparingly though
Avatar
Somthing like: NewIndexInfo.m_Flag = CheckIndexFlag(NewIndexInfo.m_Flag, aOrientation1, true); if(NewIndexInfo.m_Flag == 0 && str_comp(aOrientation1, "NONE")) NewIndexInfo.m_TestFlag = false;
Avatar
Avatar
Robyt3
We only use std::string sparingly though
we could change that greenthing
Avatar
dunno what use itd have that we cant already do
Avatar
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::strings where performance matters
Avatar
I admit having written java before
Avatar
Avatar
Robyt3
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
yes please, don't change physics...
Avatar
GitHub BOT 2025-02-08 21:58
Enable pylint for the scripts/gen_keys.py script and fix various issues. Avoid duplicate code and make script more extensible by using loops and functions. Avoid clang-tidy NOLINT(misc-definitions-in-headers) by moving the definition of the key names from the keynames.h header to the keynames.cpp source file. Reorder the joystick hat keys so the order is consistent with the mouse wheel directions. Improve various related comments. Also check style of keys.h, keynames.h...
Avatar
GitHub BOT 2025-02-08 22:09
7c6047b Add 45 € funding for GER3 by Cøke - def-
Avatar
@Cøke Thanks!
Avatar
np
❄️ 1
Avatar
Avatar
Pipou
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)?
yes and the difference would be minimal, but there would need to be a reset tile added as well
22:15
also something something implications about skipping tunes
Avatar
GitHub BOT 2025-02-08 22:36
2f7a403 Refactor keys enum, key names and scripts/gen_keys.py - Robyt3 2c99fef Merge pull request #9659 from Robyt3/Client-Keys-Cleanup - def-
Exported 106 message(s)
Timezone: UTC+0