Development discussion. Logged to https://ddnet.tw/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 2020-04-03 00:00:00Z and 2020-04-04 00:00:00Z
Update: The final solution in this article has been updated based on feedback from nanofortnight on Hacker News. This change, while not solving the complexity of what it means to work with C++ templates, does help significantly with the readability of this solution.
Update 2: ...
This addresses #2389
Replacing the NetBool with NetEnum works because RECORDTYPE_NONE maps to 0 and RECORDTYPE_PLAYER to 1. The modder has to ensure that RECORDTYPE_MAP is only sent to 0.7.5 client...
the accent menu doesnt give any indication that it's started nor does it give an indication that it's ended, so I can't make it into a SDL_TEXTEDITING event without hooking into some internal stuff, which I think they'd hate more
Why does it always end like this? I start out fixing a teeworlds bug, due to some mess macOS created I start fixing an SDL bug which inevitably leads to disassembling AppKit with it's 100 years worth of compatibility hacks
i mean how big does it have to be when the 3rd decimal becomes inaccurate
11:57
and can i reach that with tickspeed
11:57
of teeworlds
11:58
wait are they? floats always confuse me
11:59
The number of places of precision for float is the same no matter what the size of the number. Data type float can represent numbers as big as about 3.4E+38. But the precision of these large numbers will also be about 7 decimal digits.
The number of digits of precision a floating point variable has depends on both the size (floats have less precision than doubles) and the particular value being stored (some values have more precision than others). Float values have between 6 and 9 digits of precision, with most float values having at least 7 significant digits.
that doesn't sound right, I mean you need 10 bits to be after the "binary point" so 23 - 10 = 13, so numbers smaller then 2^-13
12:14
pretty small number
12:15
Sorry, I haven't worked with float internals for like 2-3 years now
12:17
If you use 13 bits before the point, you'll have 10 left for after the point and that's still enough for 0.001 precision, 14 bits and you no longer have enough
@heinrich5991 adding a bool for the race thing might indeed be better
However the client would drop packets which are missing the new bool. The client needs some backward compatibility for the protocol first, e.g. using a default value if a field is missing
@heinrich5991@redix is right, when we just add a bool new clients won't be compatible with old servers. So tell me the secret to get client version :D can't find it in the protocol. my server code is beyond hacky anyways
but in general... it would be better to rely on a stable version. i think there are already incompatibilities with the chat commands because people use the dev version =\
@timakro the pull request you mentioned was not included in 0.7.4. The latest dev version still uses 0x0704 as client version, so right now the client version does not tell you whether a client supports it or not =\
Also add defaults for ints later introduced in the protocol.
This allows introducing new fields in the network protocol without
breaking backward compatibility (new client -- old server scenario).
@heinrich5991 What do i need to send now after your fix?
18:55
Hmm the new clients will accept both msgs with 2 booleans and with 1 bool
18:55
right?
18:57
If I send just the short one I can't get the map record message. If I send just the long one old clients don't get the message. If I send both new clients get two messages.