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-06-20 00:00:00Z and 2022-06-21 00:00:00Z
Avatar
i just got this window after i closed ddnet, what is this?
Avatar
Avatar
Iza
i just got this window after i closed ddnet, what is this?
Nightly? RC? Current release? Sounds to me like it wants to create a crash dump and searches the missing symbols ^^
Avatar
i have nightly
07:13
i just closed that window lol
Avatar
@Iza happens each time you quit ddnet?
08:22
@Jupstar ✪ if it only fails on crashdump then I guess I broke drmingw by building it myself
Avatar
Avatar
deen
@Iza happens each time you quit ddnet?
no, just this one time
Avatar
and you closed it normally or it crashed?
Avatar
do we have a known crash to test if it still works @?
08:26
@Jupstar ✪
Avatar
bors got stuck on #5453
Avatar
Instead of closing the joysticks manually, use SDL_QuitSubSystem(SDL_INIT_JOYSTICK) to quit the entire subsystem, which will also close all joysticks correctly. The engine input destructor is repla...
Avatar
@deen open this map in the editor for a crash ^^
Avatar
I'm wondering if there are nowadays better ways to compress our snapshots, than based on zeros in ints. https://github.com/ddnet/ddnet/blob/master/src/engine/shared/compression.cpp#L9-L39
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/compression.cpp at master · ddnet/ddnet
Avatar
Mh, they compress pretty well. Why mess with it?
11:58
This + huffman coding + delta gives us pretty small snapshots
Avatar
Do we use huffman coding? I did not find it in the code path
12:00
I only found it for demos
Avatar
Avatar
Learath2
Mh, they compress pretty well. Why mess with it?
I do not want to mess with it... simply philosophize about it (edited)
Avatar
Avatar
c0d3d3v
Do we use huffman coding? I did not find it in the code path
every packet gets huffman coded if it results in a smaller packet
Avatar
Avatar
Learath2
every packet gets huffman coded if it results in a smaller packet
mh, I have not seen it somehow... now I have found it in the data path... https://github.com/ddnet/ddnet/blob/master/src/engine/shared/network.cpp#L145-L146 yes should be pretty good compression
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/network.cpp at master · ddnet/ddnet
Avatar
It's apparently only added to the actual tees swapping, but that gets reset on finish. It should be added to the whole team.
🥰 1
Avatar
this should fix it #5460

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 memcheck](https://github.com/ddnet/ddnet/#u...
Avatar
For example: try /sw + tab Next steps 1. Try tab for name (false); 2. Write space or word; 3. try tab (false); 4. backspace; 5. try tab name (true); 6. Enter (send); 7. Open the chat and press UP arrow (whitespaces).
Avatar
Avatar
GitHub
Click to see attachment 🖼️
need to replace for(int i = 0; i < MAX_CLIENTS; i++) to (auto & m_apPlayer : GameServer()->m_apPlayers)?
Avatar
@σℓí♡ to for(const auto &pPlayer : GameServer()->m_apPlayers)
👍 1
Avatar
Is this a new code style or why is it necessary?
Avatar
its C++14
Avatar
code style, basically
15:57
the other thing works just as well, but someone activated a check that we always use the foreach loop where possible
Avatar
Personally, I think the loops are easier to understand this way, quicker to keep track of.
Avatar
the only downside of this check that I can see is that it requires more round trips with the PR author in some cases
Avatar
^^ PR authors want to learn new stuff too
16:00
I guess, or what do you say @σℓí♡ (edited)
Avatar
I rarely program in C++ and first of all I look at how people designed it so that everything was in the same style, so at first I was confused
16:02
is pListedPlayer fine name?
Avatar
We have a lot of old code, that could use for each loops if we would refactor it. But it is not always possible to use for each loops (edited)
Avatar
pListedPlayer is fine, but I don't understand what Listed is supposed to mean
16:03
@c0d3d3v so it's not a simple replacement in this case ^^
Avatar
The variable is iterated through in a loop. I can't use pPlayer
Avatar
Avatar
c0d3d3v
We have a lot of old code, that could use for each loops if we would refactor it. But it is not always possible to use for each loops (edited)
I don't think so, the clang-tidy check forbids use of for loops that can be translated into a foreach loop
16:04
@σℓí♡ yea, whatever, pListedPlayer is fine. I can't come up with a better name
Avatar
Avatar
heinrich5991
I don't think so, the clang-tidy check forbids use of for loops that can be translated into a foreach loop
for example this loop for time bonus if we would use GameServer()->m_apPlayers[i]->GetCharacter()->Team() instead of Teams()->m_Core.Team(i) it could be replaced with a for each... that is possible in many places (edited)
Avatar
Avatar
heinrich5991
@σℓí♡ yea, whatever, pListedPlayer is fine. I can't come up with a better name
xD I think your probosed pPlayer is better 😄 but ...
Avatar
pPlayer is already used in the function
16:07
(and we forbid name shadowing, also the outer pPlayer is also used inside the loop)
Avatar
Could refactor pPlayer to pOriginPlayer but I'm also ok with pListedPlayer
Avatar
my rebase accidentally caused 5 extra commits
16:14
lmao
16:17
how can i fix it?
Avatar
somehow you added https://github.com/ddnet/ddnet/pull/5445 to your PR. maybe reset to only your commits and then rebase to latest master. (edited)
Avatar
@σℓí♡ did you mark the first commit as fixup or squash in the interactive git-rebase?
16:51
try git rebase -i upstream/master
16:51
and then mark all committs that are not yours as drop
Avatar
rebase head~5 p p p p s
16:52
ok i try
Avatar
idk how but i fix it, fetch to master and rebase fetch_head (edited)
Avatar
you could squash the latest commit
17:04
(only annotate the commits you don't want to see with squash or fixup) (edited)
17:04
the very first commit should never be squash or fixup
Avatar
I think the problem was that I used rebase HEAD~2 -> rebase HEAD~5 instead and it turned out like this pick not my commit pick not my commit pick not my commit pick my commit squash my commit
Avatar
ah, I don't know what happens when you do that with merge commits
Avatar
da5ec5a Include <iterator> instead of <array> for std::size - Robyt3 0a4b1b9 Organize generated protocol includes - Robyt3 4048bbb Organize engine-shared includes - Robyt3 557ee84 Organize base includes - Robyt3 0813fbb Move android log include to correct file - Robyt3 4949645 Organize game-shared includes - Robyt3 2c9696c Use existing typedef instead of duplicating arguments - Robyt3 32707f6 Remove unused CVideo constructor argument, organize includes - Robyt3 23cce54 Organize engine-client includes - Robyt3 a1851ed Organize engine-server includes - Robyt3 2add5d5 Organize game-client and editor includes - Robyt3 352734d Organize game-server includes - Robyt3 1bb9641 Merge #5450 - bors[bot]
Avatar
Avatar
deen
@Jupstar ✪ if it only fails on crashdump then I guess I broke drmingw by building it myself
tbh i've never seen this ever, maybe he simply has visual studio installed, and that catches such things globally?
Avatar
soon ill have 4 days off maybe i can code some pr
18:03
monkalaugh
Avatar
web or server/client?
Avatar
whats new on the web?
Avatar
the skin database needs pages
Avatar
honestly the way the web is built makes me wanna stay away
Avatar
or some kind of lazy loading (edited)
18:04
yeah xD
Avatar
A rework of the ddnet.tw website with the objective to make it more maintainable by others and modernize it. - GitHub - edg-l/ddnet-web-modern: A rework of the ddnet.tw website with the objective t...
18:05
i started this 2 months ago
18:05
xd
Avatar
when do we get some epic site like kog or skins.tw
Avatar
i want to do that but first i need a good organized project
18:05
not some python prints spread over 2 repos
18:05
its hell
Avatar
xD
18:07
if u wanna remove the php dependency on the index.php page
18:07
u can use this
18:07
// This script detects the host os and shows the correct download. window.addEventListener('DOMContentLoaded', (event) => { const downloadButton = document.querySelector("#download-link"); function getDownloadLinkEnd() { const userAgent = navigator.userAgent; var osPlatform = "unk"; if (userAgent.match(/android/i)) osPlatform = 'and'; else if (userAgent.match(/wow64/i)) osPlatform = 'win64'; else if (userAgent.match(/win64/i)) osPlatform = 'win64'; else if (userAgent.match(/windows/i)) osPlatform = 'win32'; else if (userAgent.match(/linux.*x86_64/i)) osPlatform = 'lin64'; else if (userAgent.match(/linux.*i686/i)) osPlatform = 'lin32'; else if (userAgent.match(/macintosh|mac os/i)) osPlatform = 'mac'; const linkEnds = { "win64": ["win64.zip", "Windows (64bit)"], "win32": ["win32.zip", "Windows (32bit)"], "lin64": ["linux_x86_64.tar.xz", "Linux x86"], "lin32": ["linux_x86.tar.xz", "Linux x86_64"], "mac": ["macos.dmg", "macOs"], "unk": false, }; return linkEnds[osPlatform]; } const linkEnd = getDownloadLinkEnd(); if(linkEnd) { downloadButton.href = `/downloads/DDNet-{{DDNET_VERSION}}-${linkEnd[0]}`; downloadButton.textContent = `Download DDraceNetwork Client & Server {{DDNET_VERSION}} for ${linkEnd[1]}` } });
Avatar
it doesnt require php anymore
18:07
ok
Avatar
i just didnt rename it, bcs i dont want to fix the links xD
Avatar
but the script behind the database still uses php
18:08
imagine u could use rust or other compiled languages
Avatar
you can
18:08
with webasm
Avatar
but it runs on the server
18:08
not client 😄
18:09
i mean sure there is some webserver in rust
18:09
but i doubt deen would use it xD
18:09
there is
18:09
and they are fast
Avatar
apache2 module?
18:09
or ngnix or what ddnet uses
18:09
u put them behind a reverse proxy
18:09
like any person does nowadays
18:10
18:10
Performance comparison of a wide spectrum of web application frameworks and platforms using community-contributed test implementations.
18:10
rs is rust
18:10
but benchmarks are hard
18:10
and real world is different
Avatar
tbh for me in this case is also more about syntax
Avatar
php syntax sucks
Avatar
php is really on of the strangest languages
Avatar
and they dont use a unified naming sense
Avatar
it's like nothing else 😄
Avatar
sometimes they use _ and then not
Avatar
. for string concat
18:11
$ everywhere xd
18:11
bash age
18:11
and they use ->
18:11
xd
Avatar
ez
18:11
xd
Avatar
one thing top http server benchmarks have in common is
18:12
that they use postgres
18:12
so we should migrate to postgres
18:12
BASEDHALT
Avatar
do u want postgress bcs of the class like structures?
18:13
or is there other reason?
18:13
i am no db expert
Avatar
because its the best honestly
18:13
idk if u can define ur own types in mysql
Avatar
maybe i just never had a use for such complex databases yet 😄
18:14
i mean it sounds cool
18:14
no doubt
18:14
probs size of project matters lot
Avatar
If you have the MySQL background and want to see the differences between PostgreSQL and MySQL, this PostgreSQL vs. MySQL page is an excellent start.
Avatar
well i find mariadb very intuitive
18:15
i write SQL and it just works
18:15
xd
Avatar
same on psql
18:15
xd
Avatar
ok 😄
Avatar
but for example
18:16
psql has a data type of ips
18:16
it also supports json
18:16
with json search
Avatar
maria db not?
Avatar
even ms sql does xd
Avatar
i dont think it does
18:17
-- Give me params.name (text) from the events table select params->>'name' from events; -- Find only events with a specific name select * from events where params->>'name' = 'Click Button'; -- Give me the first index of a JSON array select params->ids->0 from events; -- Find users where preferences.beta is true (boolean) -- This requires type casting preferences->'beta' from json to boolean select preferences->'beta' from users where (preferences->>'beta')::boolean is true;
18:17
one thing is storing json the other querying it
Avatar
oh yeah
18:17
Avatar
but dunno if the performance sucks
Avatar
but their syntax looks worse
18:18
xd
18:20
12.1. Introduction 12.1.1. What Is a Document? 12.1.2. Basic Text Matching 12.1.3. Configurations Full Text Searching (or just text search) provides …
Avatar
i think i never used mysql
18:21
but mariadb should have it
Avatar
well mariadb
Avatar
even sqlite3 has it
Avatar
as an extension
Avatar
i experimented with the ddnet sqlite3 and optimized string searched to few ms 😄
18:21
the database is 9GByte now xD
Avatar
but im not talking about simple LIKE queries
18:21
btw
Avatar
yeah full text searches are more restricting
18:22
they require a full word
18:22
but u can split a word in half, then u can abuse it 😄
Avatar
i wonder if u can avoid using elasticsearch with that
Avatar
and thats what i did
Avatar
i never rly dived into it
Avatar
Congrats @FIDE_chess for joining the free open source software (FOSS) community! Some of Lichess's GPL code is now officially used by the international chess organisation 🎉 Surely the start of a long, productive, and cooperative relationship between FIDE and the #FOSS world!
Likes
529
18:42
@Learath2 fide using lichess
18:42
and actually making the source code available
18:42
due to lichess being gpl
18:42
epic
18:42
fide is the International Chess Federation btw
Avatar
FIDE has their own chess website now? Interesting
Avatar
hmm i think since long
19:00
i remember seeing it on the world championship
19:00
but its just to show matches
19:00
not play
Avatar
did someone ping
19:24
xd
19:24
WebAssembly has gone through quite a transformation this last year, while the wasm language landscape is slowly shifting, the more notable change is in what people are using WebAssembly for. The use of wasm for serverless, containerisation and as a plug-in technology has leapt considerably, with WebAssembly System Interface (WASI) becoming ever ...
Avatar
ez now 80% native performance and its the future
Avatar
Avatar
Ryozuki
-- Give me params.name (text) from the events table select params->>'name' from events; -- Find only events with a specific name select * from events where params->>'name' = 'Click Button'; -- Give me the first index of a JSON array select params->ids->0 from events; -- Find users where preferences.beta is true (boolean) -- This requires type casting preferences->'beta' from json to boolean select preferences->'beta' from users where (preferences->>'beta')::boolean is true;
isn't storing json in a db a bit of an antipattern?
Avatar
Avatar
Learath2
isn't storing json in a db a bit of an antipattern?
yeah
19:35
i wouldnt do it
19:35
but im sure the are uses
19:35
there*
Avatar
</BugCod3>𝓓𝓜 2022-06-20 20:09:29Z
Hi, I have a map myself, then I want to set it in the shop and the farm section. What should I do? [ddnet++]
Avatar
ask @ChillerDragon
Avatar
Avatar
</BugCod3>𝓓𝓜
Hi, I have a map myself, then I want to set it in the shop and the farm section. What should I do? [ddnet++]
ChillerDragon:
Avatar
Avatar
Patiga
@deen open this map in the editor for a crash ^^
I think there were many such crashes when I tried fuzzing it, especially on reading, so not as bad as on write
Avatar
Avatar
Learath2
isn't storing json in a db a bit of an antipattern?
postgres has jsonb type and gin indexes which makes it pretty usable
Avatar
Hm indexable json does sound nice, would you prefer it to just using proper columns though? I'd guess it does have some overhead, especially with the variable lengths of json fields
Avatar
There is no guarantee the json in a column even follows a set structure, I'm actually interested in how they did the indices now 😄
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:19:30Z
?
Avatar
ChillerDragon: The ping was about this question:
Hi, I have a map myself, then I want to set it in the shop and the farm section. What should I do? [ddnet++]
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:20:35Z
ah ye got it :D
22:20
thanks
Avatar
how can we ping you?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:20:53Z
u did good
22:21
DDraceNetwork + city + block! Based on ddnet (www.ddnet.tw) which is based on teeworlds (www.teeworlds.com). - DDNetPP/fddracepp.png at c2d4684138c2985682edd2c2b7feabea760ad3fd · DDNetPP/DDNetPP
Avatar
there are 3 chillerdragon in here
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:21:29Z
just ping any of them
22:21
irc/matrix pings work the same as in tw chat
22:21
just dont make any typo in my name and i get pinged
Avatar
@ChillerDragon @Fake Account @ChillerDragon.*
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:22:01Z
yes
Avatar
last one has '.*'
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:22:06Z
all 3 ping
22:22
okay, thx
Avatar
Avatar
[quakenet] ChillerDragon
are these wip icons? LOL
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:23:22Z
fakof
22:23
im not an designer xd
22:23
contributions welcome -.-
Avatar
of course! i just a) need free time b) need to know what the entities do
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:24:45Z
arent the icons not descriptive enough?
Avatar
Avatar
[quakenet] ChillerDragon
arent the icons not descriptive enough?
22:25
ddnet_lgbt
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:25:44Z
da
22:25
its rainbow
Avatar
Avatar
Voxel
Click to see attachment 🖼️
thanks c:
Avatar
like, i can help you guys with polish and everything
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:28:26Z
@</BugCod3>𝓓𝓜 you can also select "Info" at the top of the editor and map index 161 for shop and 160 for farmtile
Avatar
@Voxel dm me if ud like
Avatar
ChillerDragon !
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:29:12Z
!
Avatar
!11!1elf
Avatar
How are you @[quakenet] ChillerDragon#0000
Avatar
#off-topic
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:29:37Z
#not-bridged
Avatar
Chiller oleas guve ne votes.cfg gores/KoG
22:30
Give me votes.cfg KoG
22:30
ChillerDragon
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:30:53Z
they are not public
Avatar
I have a create.
22:31
?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:31:16Z
what
Avatar
I can create?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:31:35Z
yes
Avatar
Ow
22:31
Thanks
22:31
I have a question
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:31:58Z
you probably can use some public ddnet scripts to generate votes based on your map pool
Avatar
Ok , give me compiler windows
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:32:51Z
?
Avatar
Compiler for windows
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:33:11Z
c++?
Avatar
Yes
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:33:35Z
gcc
22:33
g++*
Avatar
G++
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:34:13Z
choco install llvm probably does the job
Avatar
Ok
22:35
Source bombay publiced?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:35:52Z
no
Avatar
For viproyal
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:36:01Z
but nouaa works on some things
Avatar
Price?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:36:30Z
DDraceNetwork, a cooperative racing mod of Teeworlds - GitHub - NouaaTW/ddnet at BlockWorlds
22:36
and some old leaked versions
Avatar
Ow source has compiled?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:37:18Z
you can ask nouaa for a release
22:37
but i suggest building it your self
Avatar
3f1f94c Fix segfault in SDL_JoystickClose on client quit - Robyt3 af1f0de Merge pull request #5453 from Robyt3/Joystick-Close-Before-SDL-Quit - def-
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:38:04Z
I made a tutorial on that also containing how to install a C++ compiler https://www.youtube.com/watch?v=qsoGOfBqPns
Avatar
Can i compile source?
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:38:45Z
ye
Avatar
Mmm
22:39
Pleas compile send me
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:39:36Z
I never looked into cross compiling to windows
22:40
ask @nouaa
Avatar
Ddnet-Server.exe
22:42
Where is sql for ddrace
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:42:12Z
?
Avatar
Sql for ddrace
22:42
Link download sql ddrace
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:42:46Z
what is "sql ddrace"
Avatar
SQL For Points and times
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 22:43:00Z
the official ranks?
22:43
of ddnet?
Avatar
Yes
Avatar
Ow thanks
22:43
Gl ^^
Avatar
Avatar
[quakenet] ChillerDragon
</BugCod3>𝓓𝓜 2022-06-20 22:46:21Z
how to add it?
22:54
d58c5df add penatly to the whole team - BloodWod-513 d7b5921 refactoring pPlayer to pPrimaryPlayer - BloodWod-513 29be9a7 Merge #5461 - bors[bot]
Avatar
4a32a95 Improve some german translations - Jupeyy eb0d48a Merge #5439 - bors[bot]
Avatar
[quakenet] ChillerDragon BOT 2022-06-20 23:16:51Z
put it in your editor folder next to all the other entities
Avatar
Avatar
[quakenet] ChillerDragon
@</BugCod3>𝓓𝓜 you can also select "Info" at the top of the editor and map index 161 for shop and 160 for farmtile
</BugCod3>𝓓𝓜 2022-06-20 23:39:51Z
I also added 161, but the shop is mixed with Farm
Exported 315 message(s)