Guild icon
DDraceNetwork
Development / developer
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 2022-05-28 00:00:00Z and 2022-05-29 00:00:00Z
Avatar
I'll give it a try
Avatar
WorkerThread is hard because REQUIRES(!(CJobPool *)pUser->m_Lock) is not possible

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 if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that affect existing maps
  • [ ] Tested the change with [ASan+UBSa...
00:21
Found with -Wcomma using clang.

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 if it works standalone, system.c especially
  • [ ] 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/d...
Avatar
4cba284 Fix possible misuse of comma - Chairn 39e3f52 clang-format - Chairn 73a0998 Merge #5261 - bors[bot]
Avatar
Since it was removed from dilate's copy values, and also makes more sense anyway. Images should always be identifiable by all visible pixels

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 if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no physics that aff...
Avatar
chillerdragon BOT 2022-05-28 08:12:30Z
Such a hard read to wake up hangover to.So it seems like I gotta refactor my nice goto code to please the CI ._. (@deen)
ChillerDragon: it allows gotos that jump strictly forward. In case your questino is serious: https://homepages.cwi.nl/~storm/teaching/reader/Dijkstra68.pdf
Avatar
Jupstar ✪ BOT 2022-05-28 08:13:53Z
you should maybe use a function instead if you have a case where you use goto
Such a hard read to wake up hangover to.So it seems like I gotta refactor my nice goto code to please the CI ._. (@deen)
08:15
show me your example code
Avatar
chillerdragon BOT 2022-05-28 08:15:28Z
I think I use it to cleanup stuff idk
08:15
Lemme search
Avatar
Jupstar ✪ BOT 2022-05-28 08:15:40Z
use RAII
Avatar
chillerdragon BOT 2022-05-28 08:16:34Z
DDraceNetwork + city + block! Based on ddnet (www.ddnet.tw) which is based on teeworlds (www.teeworlds.com). - DDNetPP/system_ddpp.cpp at master · DDNetPP/DDNetPP
Avatar
Jupstar ✪ BOT 2022-05-28 08:17:05Z
put above in a function and use return
08:17
same effect, no goto
Avatar
chillerdragon BOT 2022-05-28 08:17:21Z
Oke -./
Avatar
Jupstar ✪ BOT 2022-05-28 08:17:58Z
if u use inline it compiles to pretty similar code, if you care about the assembly output ^^
Avatar
chillerdragon BOT 2022-05-28 08:18:44Z
xd
08:23
btw RAII still the "easy" c++ way, then u dont have to care about cleanup
08:23
the structure that wraps the regex has to garantuee it :D
Avatar
chillerdragon BOT 2022-05-28 08:28:55Z
What is even RAII
Avatar
Jupstar ✪ BOT 2022-05-28 08:32:08Z
if u have a stack objectstruct a { some_regex m_b; a () { b = some_regex_init(...); } ~a() { clean_some_regex(b); } }; int function () { a MyVar; ... if(...) return; [..] if(...) return; else return; }all returns garantuee that destructor of MyVar is called
08:32
so basically u have automated cleanup by the compiler
08:33
thats also what std::unique_lock etc. does under the hood
08:33
that's also why its considered more useful than manually locking, unlocking bcs u cannot forget to unlock
08:33
considered more safe too
Avatar
23683a7 Remove alpha threshold from map_optmize - Jupeyy fe8275b Merge #5262 - bors[bot]
Avatar
@c0d3d3v does freeze not always reset the freeze time?
11:08
or better, whats the reason for this^^
Avatar
8010388 Use std::vector<char *> instead of array in config_store - Robyt3 0f097a0 Use std::vector<char *> instead of array in gamecontext - Robyt3 d3eb9d6 Use std::vector<std::string> instead of array - Robyt3 24ad383 Use std::vector<CSourceQueueEntry> instead of array - Robyt3 ce54a0d Use std::vector<CMenuImage> instead of array - Robyt3 4a02334 Use std::vector<CName> instead of array, adjust variable name - Robyt3 c6e195a Use std::vector<CNameBan> instead of array - Robyt3 3f8fb73 Use std::vector<CKey> instead of array - Robyt3 0c69495 Use std::vector instead of array in editor - Robyt3 ca309d6 Remove base/tl/array.h - Robyt3 47098da Remove base/tl/algorithm.h - Robyt3 f9d49bd Remove base/tl/allocator.h - Robyt3 a246560 Remove base/tl/range.h - Robyt3 6a72c5c Fix clang-analyzer-cplusplus.NewDelete (Use of memory after it is freed) - Robyt3 c609314 Use std::any_of instead of for-each loops - Robyt3 ccf0622 Merge #5252 - bors[bot]
Avatar
Reported by bencie on Fall into the Future. Bisect revealed: https://github.com/ddnet/ddnet/pull/5245 ``` 62c99515d564181e295a1528dc3dc23fbe3e2887 is the first bad commit commit 62c99515d564181e295a1528dc3dc23fbe3e2887 Author: c0d3d3v Date: Thu May 26 19:33:01 2022 +0200 disable dragger beams soon, not only every 150ms src/game/server/entities/dragger.cpp | 2 +- src/game/server/entities/dragger_beam.cpp | 15 +++++++++++++-- src/game/server/entities/dragger_beam.h...
Avatar
Following user report that they set cl_port 1 and it didn't work

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] 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...
Avatar
chillerdragon BOT 2022-05-28 11:45:14Z
That’s cool
if u have a stack objectstruct a { some_regex m_b; a () { b = some_regex_init(...); } ~a() { clean_some_regex(b); } }; int function () { a MyVar; ... if(...) return; [..] if(...) return; else return; }all returns garantuee that destructor of MyVar is called
Avatar
Ideally some_regex also uses RAII; so you don't even have to worry about cleaning it up, your destructor will automatically call its destructor and clean it up
Avatar
must asan be compiled while being in the root git directory?
Avatar
why do u want to compile asan
Avatar
I mean compile ddnet with asan
11:50
can be done from any build dir
Avatar
should I copy ubsan.supp then, or is it not needed?
Avatar
mkdir san && cd san && CC=clang CXX=clang++ CXXFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" CFLAGS="-fsanitize=address,undefined -fsanitize-recover=address,undefined -fno-omit-frame-pointer" cmake -DCMAKE_BUILD_TYPE=Debug ..
11:51
You can also just set UBSAN_OPTIONS=suppressions=../ubsan.supp
Avatar
oh, I see, thanks
Avatar
Avatar
Jupstar ✪
@c0d3d3v does freeze not always reset the freeze time?
for what? freeze only sets freeze time every second
12:19
@deen do release tags match the last commit of a version? So If I checkout to tag 15.9.1 I get all commits in that version?
12:21
Mh even if not, should be close enough, for my investigation
Avatar
yes, they should match (modulo mistakes by me)
Avatar
Avatar
c0d3d3v
for what? freeze only sets freeze time every second
i just saw weird flickering of the freezebar when dummy falls through 1 bar of freeze
Avatar
Avatar
Jupstar ✪
i just saw weird flickering of the freezebar when dummy falls through 1 bar of freeze
on latest master?
12:28
I thought I have patched it
Avatar
yeah relativly latest master
12:28
master from like today morning xd
Avatar
can you reproduce it? (edited)
Avatar
Thats expected behaviour
Avatar
the 2nd to be precise
Avatar
I looked over the remaining code for creating/removing entities in the prediction, and only ended up making some smaller changes:
  • More consistent use of InsertEntity/RemoveEntity/Destroy
  • Fixed one instance in gameclient.cpp where an entity was removed but not deleted (could potentially have been a memory leak)
  • Removed some old code for retaining information about the characters after they left the snapshot (the client should only rely on the snapshot for prediction of players)
## ...
Avatar
mh ok looks really weird imo
12:32
bcs the bar continues where it stopped pretty much
12:32
but flickers
Avatar
Avatar
Jupstar ✪
the 2nd to be precise
The freeze bar is turend off if you are in a freeze block. We could vote to let it stay on or we add a option. The freeze bar resets to full if you get contact with freeze after 1 second (edited)
Avatar
yeah thats weird ddrace logic, not ur fault ^^
12:33
but stars are also always visible arent they
12:33
not even sure rn xd
12:33
you can also see the stars in the video, as soon as the bar refilled 3 new stars poped up
Avatar
yeah
Avatar
actually it does not even refill in the video xD I did not see the tee unfreeze at the floor... It just refreeze again
Avatar
well if we replace stars anyway probs should always show this bar
Avatar
you probably only mean the freeze bar disapear in the block
Avatar
yes
Avatar
I would like a option for it, because I do not like it if a lot of tees sit next to each other in freeze and nothing happens except a lot of freeze bars refilling every second
Avatar
well idc, can u turn that thing off?
12:39
then u can also just add a third option there
Avatar
currently nothing happens except a lot of stars getting animated
12:39
yes
Avatar
Avatar
Jupstar ✪
well idc, can u turn that thing off?
there is already a option to turn it off, because some asked for it
12:40
Also have to think if we somehow can get the server inform, that freezebar is off, so he sends stars instead (edited)
Avatar
maybe hackish, but maybe you could generate the stars in the client in that case?
Avatar
Avatar
trml
maybe hackish, but maybe you could generate the stars in the client in that case?
yes I also thought about that, but probably requiers prediction?
Avatar
it would be a bit like airjump I think (which is also not sent), so it could be done without it. the code for it wouldnt be as clean as for just showing the freezebar though
Avatar
No idea why clang-tidy's modernize-... didn't work

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 if it works standalone, system.c especially
  • [ ] 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](htt...
Avatar
85e8677 Don't keep track of characters in the predicted gameworld that are not in the snapshot and require pred characters to be alive - trml c559520 Fix and slightly cleanup creation/destruction/insertion of predicted entities - trml ab28267 Merge #5265 - bors[bot]
Avatar
what was the reason again that we overwrite system defaults linker? I dont think this is good style, also it probs wont help for packaging, bcs their CI always downloads packages they need, doubt they download smth like lld for no reason
Avatar
People complaining that their local build is slow with IPO
14:10
since we enabled IPO by default
14:11
but now IPO is off by default, so probably doesn't matter much
Avatar
i already said it in the pr, CMAKE has a parameter for that too 😄
14:11
we can just enable it for our full release builds
Avatar
15.9.1: ``` ❯ ./DDNet-Server "sv_port 8305" [2022-05-28 16:24:07][engine]: running on unix-linux-amd64 [2022-05-28 16:24:07][engine]: arch is little endian [2022-05-28 16:24:07][storage]: couldn't open storage.cfg [2022-05-28 16:24:07][storage]: using standard paths [2022-05-28 16:24:07][storage]: added path '$USERDIR' ('/home/daniel/.teeworlds') [2022-05-28 16:24:07][storage]: added path '$DATADIR' ('data') [2022-05-28 16:24:07][storage]: added path '$CURRENTDIR' ('/home/daniel/Des...
Avatar
Avatar
deen
but now IPO is off by default, so probably doesn't matter much
The issue is that the option is a cache variable. You've turned it off, but for those who updated to "prev version with it being ON by default", it is still ON after update to the current master. (edited)
Avatar
fixes #5263 @bencie could you please confirm it fixes the problem?

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [x] Considered possible null pointers and out of bounds array indexing
  • [x] Changed no physics that affect existing maps
  • [x] Tested the change with [ASan+UBSan or valgrind...
Avatar
@bencie could you test this PR if you have time https://github.com/ddnet/ddnet/actions/runs/2401463925 (as soon as it has compiled)
Avatar
yeah ^^
Avatar
with a local server and the map Fall into the Future
Avatar
Mh, how did an dragger rework even get merged without a side by side comparison to check the draggers behaviour?
Avatar
I did do a side by side comparison
15:41
Its was one tick off... that was hard to see
15:42
one tick to slow activated
15:42
one tick to slow deactivated
15:43
and https://github.com/ddnet/ddnet/pull/5245 made it worse xD ... but that was not my initial rework (edited)
Avatar
Avatar
Learath2
Mh, how did an dragger rework even get merged without a side by side comparison to check the draggers behaviour?
we should do unit tests xD to prevent physics changes
15:46
but I do not know if tick related stuff is testable using unit tests :/ probably yes
Avatar
Teehistorian based ones are possible if we ever get replay capabilities in the server
Avatar
that would also be an option, but I mean just normal unit tests, without running a complete server, only a dummy, that executes a view ticks with specific inital data
Avatar
Even without replay we could probably hand parse th files, it’s easy to check stuff like position at a certain tick
Avatar
The spaghetti we have isn’t really good for traditional mock tests
Avatar
Avatar
bencie
yeah ^^
build is ready
Avatar
Avatar
Learath2
The spaghetti we have isn’t really good for traditional mock tests
Not easy but with some work, probably doable (edited)
Avatar
Avatar
c0d3d3v
@bencie could you test this PR if you have time https://github.com/ddnet/ddnet/actions/runs/2401463925 (as soon as it has compiled)
am i supposted to try this on a local server? on official servers its still the same
Avatar
with a local server and the map Fall into the Future
Avatar
ah yeah
👍 1
15:57
works
Avatar
bencie evolved from cat to anime girl
kek 1
Avatar
a3c1a4c Prevent users from setting port 1-1023 - def- 19dcd44 Use std::make_unique (fixes #5166) - def- 719e3e4 Merge #5264 #5266 - bors[bot]
Avatar
where is the demo render code?
Avatar
video.cpp in client
Avatar
Add Collision() getter to server CEntity to make it easier to sync the server and prediction implementations (e.g. IsGrounded() imps are now identical).

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no p...
Avatar
I would find useful to save whole client configuration on ddnet.tw New client usually asks for player name, but it could also ask to retrieve everything (name, skin, bind, video config, etc...) from ddnet.tw, given login credential of course. This feature does not need much disk space (let's limit to 1KB per user or less) and it would be available only to registered user. It should be easy to implement as long as client settings are exportable/importable serialized. Bind export could...
21:35
556b322 Execute the dragger_beam tick one tick earlier. And stop it one tick - C0D3D3V 5fdb94e Merge #5268 - bors[bot]
Avatar
I wonder why GitHub doesn't ping me, if a PR from me in vanilla teeworlds gets mentioned in ddnet 🤔 (edited)
Avatar
hey is there a way to send commands to a running server from a script? I would like to send /reload when the map file changes on disk
22:14

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 if it works standalone, system.c especially
  • [ ] 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-addresssanitizer--u...
Avatar
Avatar
k2d222
hey is there a way to send commands to a running server from a script? I would like to send /reload when the map file changes on disk
you can use fifo file
Avatar
Avatar
k2d222
hey is there a way to send commands to a running server from a script? I would like to send /reload when the map file changes on disk
sv_input_fifo server.fifo in your server config, then you can write rcon commands into it: echo broadcast hello > server.fifo
Avatar
Avatar
k2d222
hey is there a way to send commands to a running server from a script? I would like to send /reload when the map file changes on disk
It should exist an headless client, ready to use
22:17
Unix fifo is nice! Didn't know it exist
Avatar
oho really nice way of doing it! thanks
Avatar
(doesn't work on windows)
Avatar
who cares 😂
Avatar
mkfifo server.fifo nohup ./DDNet-Server "sv_input_fifo server.fifo" & echo "command" > server.fifo
Avatar
ddnet server creates the fifo itself too, no need to manually create
Avatar
actually, does DDNet-Server accepts commands in command line?
Avatar
Avatar
deen
ddnet server creates the fifo itself too, no need to manually create
ah nice
Avatar
and deletes after shutdown, so you don't end up writing into an unconnected fifo
22:22
the fifos were probably the second thing I added after fixing the obvious cheats, so that we can run DDNet official servers at all
Avatar
Avatar
Chairn
actually, does DDNet-Server accepts commands in command line?
what you mean I can write commands in the running server terminal?
22:23
oh no ok
Avatar
nah, you can give command when starting the server
Avatar
Avatar
k2d222
what you mean I can write commands in the running server terminal?
could be nice tough, I know e.g. minecraft servers can
Avatar
not sure we want to reinvent the wheel
👍 1
Avatar
a5f4c66 vmath: Make vector2_base() constructors constexpr - Kaffeine a023671 prediction/entity: Sync constructor signature, add GetProximityRadius() - Kaffeine f934882 server/entity: Add CCollision() getter - Kaffeine f057dd3 server/character: Use CEntity::Collision() instead of GameServer() one - Kaffeine deb2e87 Sync prediction impl with server CCharacter::IsGrounded() - Kaffeine a39bbc7 Introduce and use constexpr CCharacterCore::PhysicalSize - Kaffeine 9e6ee21 Merge #5269 - bors[bot]
22:42
by returning nullpointer, as the calling functions expect Broken in https://github.com/ddnet/ddnet/commit/471bb441a14af9502558cfc7203de96f72547e87

Checklist

  • [x] Tested the change ingame
  • [ ] Provided screenshots if it is a visual change
  • [ ] Tested in combination with possibly related configuration options
  • [ ] Written a unit test if it works standalone, system.c especially
  • [ ] Considered possible null pointers and out of bounds array indexing
  • [ ] Changed no phys...
Avatar
yay super cool !
Avatar
can anyone answer me collision questions?
  • default hook length is 380.0 i read in the wiki. from where to where is that? middle of the hooking tee? or on the outline?
  • what is a unit? how does it translate to pixel?
  • what is the hook hitbox of tee diameter in units?
  • is the hook hitbox of tees a round circle? (ddfat skins are not round)?
(edited)
Avatar
Avatar
k2d222
yay super cool !
cool, a new map editor?
22:54
ddfat is just a fun way to make the tees look, it does not illustrate anything 😄
22:54
(no idea about the other questions)
Avatar
Avatar
k2d222
Setup the repo for the web map editor at https://github.com/k2d222/twwe and a demo server is (sometimes) running at http://tw.thissma.fr (without tls, not setup yet) (...and it even works on mobile 😆)
.
Avatar
really?, because i read that on the wiki
To see how big the actual hit box of tees are, you can turn on "fat skins" in Settings -> Tee -> Fat skins (DDFat).
Avatar
I chose the size for fat tees based on what looks funny, so if it's close to the hit box, that's coincidence
💡 1
Avatar
Avatar
k2d222
hey is there a way to send commands to a running server from a script? I would like to send /reload when the map file changes on disk
Another option is ECON. Long story short: COMMAND=$@ printf "$EC_PASSWORD\n$COMMAND\n" | nc $EC_CONNADDR $EC_PORT -q 1
Avatar
Very cool project @k2d222 . Collaborative mapping 🙂
😊 1
Avatar
so the hookcollline, does it start from middel of tee, or from the outline? in other words, is the hookrange radius of some tee box.. + hook length, well i'll just assume from middle
Avatar
center
Avatar
couldn't we use steam cloud to store client settings to fix this issue? you don't need ingame accounts for that https://github.com/ddnet/ddnet/issues/5270
I would find useful to save whole client configuration on ddnet.tw New client usually asks for player name, but it could also ask to retrieve everything (name, skin, bind, video config, etc...) fro...
Exported 185 message(s)