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 2020-09-13 00:00:00Z and 2020-09-14 00:00:00Z
Avatar
Hello bois. Im streaming alot of teeworlds lately and i really have a big problem with people using the n bomb and other words
00:42
Really need a solution for this do like censore certain words. Can u guys help me out with this?
Avatar
they are using the n-word in the in game chat? i think we discussed about a language filter already
Avatar
ᶰ°Konͧsti 2020-09-13 02:18:07Z
no need
02:19
censoring will lead people to get around it and make it even worse
Avatar
I can feel a significant lag(maybe 0.1~0.5 ms) when other player send chat inculding many CJK characters in newest DDNet client (14.7.1). In older verion before steam, such as 12.8, did not have such problem. I think maybe we could take one or more of the following methods to alleviate this problem: 1. Pre-load the info and bitmap of every character into memory every time when starting the client. 2. Pre-load the info and bitmap of every character into memory, then dump it into files on ...
Avatar
ᶰ°Konͧsti 2020-09-13 09:48:32Z
can we have ammo for weapons
09:49
Like u set in switch layer with delay how many times u can shoot with the weapon that u collected and lose it afterwards
Avatar
Still a draft, since I want to do more testing by myself. But ready for review anyway. This implements a thread safe queue, which would be good if reviewed carefully. Fixes #2746. Helps with #2622, #2671 and #2672 because it enables a way to add/remove sql servers in a thread-safe fashion. If required, I can add a config option to disable retrying write statements. This PR splits the worker threads into three: one for read requests, one for write requests and one to process the retries...
Avatar
Well, having the chat not get recorded would help, but i guess it can't be changed easily
Avatar
I think the most easiest way is when initnalize CTextRender, do GetChar for every character (edited)
10:38
Only when I receive message full with CJK characters which had not encountered before, I feel lag. Repeated CJK characters message didn't make me lag. I upload a video to youtube https://youtu.be/et_SsWyCd5U?t=27 . The lag is begin at 0:26. And I found maybe most of the older player use old version of DDNet Client, so they did not encount this issue. When most of new player use steam client, they may think it is normal behavior.
Avatar
censoring will lead people to get around it and make it even worse
@ᶰ°Konͧsti even games like league of legends have a language filter, i don't think they would use them, if they made it worse
Avatar
censoring in roblox
11:00
justatest
Avatar
@Eki it would be really useful to say, what versions of ddnet e.g. ddnet since around 14.1 has a new font for chinese characters which is pretty huge can you try 13.x?
11:12
but ddnet cannot just call getchar for every character, that would kill even newest pcs
Avatar
censoring will lead people to get around it and make it even worse
if this censoring will be clientside & disabled by default nothing will change tho
11:39
but streamers should be happy
Avatar
@Eki it would be really useful to say, what versions of ddnet e.g. ddnet since around 14.1 has a new font for chinese characters which is pretty huge
>
can you try 13.x?
@Deleted User ok i will try it
Avatar
Atleast people who need it can turn it on, though I guess then people will send streamers things like "n1qqer`
Avatar
oh, this is what the problem
Avatar
Then we will have to try reduce 1337 text into a skeleton text and filter every variation
Avatar
btw they can also disable the chat and display it on the terminal on the 2nd window
👍 1
Avatar
Then they will start sending arabic that looks like latin letters
11:42
Yeah disabling chat seems to be the only safe way
Avatar
cl_showchat 0, doesnt even show old chat when typing, so it should be safe
11:50
@maggi323 @Stepfunn does above help?
Avatar
We might introduce something like 'streamer_mode' (which would have explanations how to use it) because using "cl_showchat" is not so obvious way especially for newcomers
11:54
newcomers... I bet even some devs(including me) wont discover Jupstars approach fast enough to use it
Avatar
@Eki it would be really useful to say, what versions of ddnet e.g. ddnet since around 14.1 has a new font for chinese characters which is pretty huge
>
can you try 13.x?
@Deleted User 14.1 don't have any problem, very fluent when people speak
Avatar
@BannZay you can disable chat via settings -> HUD
Avatar
yea, but its not obvious that you can still see it in dedicated console
12:08
and streamers might need to see it so they wont disable chat
Avatar
@Eki ok thx, then its probably that freetype struggles with the huge font size
12:15
@deen this might be interesting for you ^
Avatar
@maggi323 @Stepfunn does above help?
@Deleted User i know about that, but i mean a chat that is visible for the streamer, but doesn't get recorded in streaming software
Avatar
@maggi323 yes, just enable console, cl_show_console or smth like that in f1
12:45
then u have chat on 2nd monitor
Avatar
Ah, gotta try that out, ty
Avatar
ᶰ°Konͧsti 2020-09-13 13:19:43Z
junge @Animefan league of legends is an account based SJW game
13:19
Not even slightly compareable to teeworlds
Avatar
wtf is a SJW game
Avatar
or you can set your streaming software to capture only game window. Second monitor is not even a requirement here (edited)
Avatar
or you can set your streaming software to capture only game window. Second monitor is not even a requirement here
@BannZay But then you wouldn't be able to see chat 😄 but tried it out with hiding chat and activating console, works. But little bug is, that the steam fps is now shown in the middle of the screen and shift+tab isn't doing anything ingame (which is quite nice actually)
Avatar
@maggi323 yea, bad idea... you got to switch between apps to read the chat this way
16:05
How you like the idea to make chat as overlay (similar to steam overlay) ? How bad performance will be in this case?
Avatar
Tbh. I think a censoring option would be still really nice. U could just give us an option where we can add certain terms to the censoring collection. So we could add terms that we dont want to see in chat. I mean the consol thing is a solution for now. But for people who dont understand what is going on in this game and im constantly like writing stuff in the chat and noone can see what i am answering to could be really offthrowing
f3 1
16:38
Idk i would really love to still have the chat ingame and still have an option to block certain words
Avatar
Like Twitch chat filter, you can edit your personal FIlter list
Avatar
build check style makes me crazy, it complains about things I didnt touch. Can we fix all style issues in the codebase using this script someday?
Avatar
@maggi323 just use 'messages from friends only' or /dnd
Avatar
censoring feature with txt/json file so you can add words to censor by yourself
17:25
would be useful
Avatar
As requested by a streamer, it makes streaming services unhappy when people use words like nigger etc.
Avatar
As requested by a streamer, it makes streaming services unhappy when people use words like nigger etc.
18:05
@Stepfunn ^
Avatar
ᶰ°Konͧsti 2020-09-13 18:37:38Z
omg
Avatar
anti konsti function
Avatar
what is wordlist.txt in data folder?
Avatar
3fa500a update libwebsocket to 4.x and fix bug - QingGo 4ae0833 use clang formatter - QingGo b64a0ef make client able to connect ws server with ws:// - QingGo 5d64ed3 Merge #2805 - bors[bot]
Avatar
used for generating random save codes if you say /save without your own save code
19:18
okey, its amazing poggers
Avatar
what for does TILE_NPC_x stand? (edited)
Avatar
@Deleted User any ideas what I can do about the text problem?
Avatar
Theese buttons can't contain localized text properly
Avatar
@Deleted User you could abbreviate them? The only other choice was 2 rows in 5:4 & 4:3 screens, but people were not happy with that either
Avatar
@Deleted User замени на "Суицид", я когда переводил че-т и не думал, что они такие кнопки завезут
19:32
но все равно там по краям будет
19:34
and what is TILE_BONUS, looks like its empty tile
Avatar
@deen really, this small buttons cant fit on 4:3?
19:35
xdd
Avatar
Making them bigger won't fit
Avatar
Maybe font smaller?
Avatar
would look bad IMO
Avatar
What if left second button just kill?
19:40
In English
19:40
russians understand that xd
Avatar
is there really a need for a kill button
Avatar
When you afk block while fapping on tees...
Avatar
Some newcomers restart by rejoining their dummy or going to spectators and back, since those were the only available buttons
Avatar
What if make this button's text unicode skull icon?
19:42
Like it's obvious that skull symbol mean's death
Avatar
what if another button is not localized well?
19:44
to another language
19:44
I like dynamic font size here
19:45
solves all problems 🙂
Avatar
makes the menu look inconsistent
19:45
IMO
Avatar
check the screen, this is inconsistent lmao
Avatar
yes, if you look up you see that I didn't argue that this looks good
Avatar
yea, just saying
Avatar
what is TILE_BONUS, looks like its empty tile
Avatar
@BannZay I checked and SkyFly has different names. the one on DDmaX is Skyfly, not SkyFly
19:58
And apparently jao is aware of it
Avatar
I didn't get why some tiles' names end with END/START and another with DISABLE/ENABLE, so, I just replaced all END/START with DISABLE/ENABLE. Also, I renamed TILE_BONUS and TILE_PENALTY, because you need to check the variables' declarations/references for understanding their purposes.
Avatar
yea, all maps I mentione are from different servers
20:25
I thought we should not use names of existing maps despite their server
Avatar
they dont have same names
Avatar
Missing: scripts/languages doesn't work yet, but the context can be added manually, see german.txt for an example.
Avatar
@deen yes, make smaller fonts and let the fonts know their unicode regions, so freetype API calls are removed
20:29
the current font is 16mb, thats quite huge, and i dunno if freetype internally load it into memory or if it loads it from file (edited)
Avatar
@Deleted User well, I took that font because Chinese guys told me it looks best
20:30
Oh, loading from file might actually be relevant. We could try loading it into memory ourselves and pass that to freetype?
Avatar
yes that works, but no garantuee that this is the problem
20:30
its just guessing
Avatar
I have seen huge io delays on Windows
Avatar
bcs freetype takes the char pointer
Avatar
but mostly when writing, not reading
Avatar
@jao what you mean?
20:31
one letter lower case another uppercase = different names?
Avatar
doesnt makes sense to me
20:31
anyway
20:32
there 2 other maps with exactly the same names
Avatar
illusion
20:33
and some else
20:33
search my messages
20:35
and Experiment
Avatar
there is illusion and Illusion
20:35
not the same
20:36
same for Experiment and experiment
20:37
how to differently pronounce this maps names?
20:37
why do we even have a rule to not have the same names for maps
Avatar
ᶰ°Konͧsti 2020-09-13 20:38:02Z
illusion ddmax and Illusion oldschool
20:38
because they are old
Avatar
we can enforce the rule for new maps but not for old ones
Avatar
ᶰ°Konͧsti 2020-09-13 20:38:21Z
New maps should have different names
Avatar
sure, but I asked another question
Avatar
ᶰ°Konͧsti 2020-09-13 20:39:02Z
because it maps should be clear to divide i guess
20:39
if u make a popular map series u may wouldnt like someone using a similiar name
Avatar
@Deleted User hm, I don't see a file staying open, so my guess is libfreetype loads the font into memory.
20:40
@Deleted User could you maybe test with QingGo if making it know the unicode regions would work? (not sure how to do that)
Avatar
@deen it could also just be that freetype api is called twice when fallback
20:40
for both faces
20:40
so regions would be nice
Avatar
@ᶰ°Konͧsti unfortunetely having different letters registers is not enough to distinguish files in windows (edited)
20:42
thats why it makes no sense to me
20:42
the answer "the names is different" (edited)
Avatar
ᶰ°Konͧsti 2020-09-13 20:43:54Z
ik, on Linux capitals count as other letter but windows doesnt care
20:44
solution is using Linux
😆 1
Avatar
I mean, the names is the same
20:44
thats a point
Avatar
i'm using a even larger font on vanilla textrender rework, couldn't produce any noticeable lag.
Avatar
maybe ur pc is fast
20:45
or freetype only opens the file when needed
20:45
bcs my memory didnt jump when the fallback font was loaded
Avatar
maybe run a profiler
Avatar
but also just could be just runned in a thread
Avatar
@Deleted User interesting, the windows version indeed keeps the file open, Linux didn't
20:53
I'll try to load from memory directly
Avatar
yeah was more realistic with such huge laggs 😄
Avatar
Missing: Freeing the memory again. But not so important since we keep the same fonts until end of process anyway in our case. @QingGo Could you give this a try from the Github build artifacts?
Avatar
ah is aki = qinggo ?
21:05
eki*
Avatar
graphics.h:197:36: error: ‘uint8_t’ has not been declared
Avatar
>
ah is aki = qinggo ?
yes
21:12
21:15
ye, 60ms for one sentence on one frame is pretty bad
Avatar
its better with preloaded fonts anyway
21:15
never trust smth u didnt program yourself xd
21:15
not even then xd
Avatar
but ddnet did call RenderGlyph more than expected. for the same sentence it called RenderGlyph double than what I've called in mine for some reason.
21:17
Avatar
@TsFreddie maybe because we try the normal font first, like Jupstar said?
Avatar
i did font fallback too
21:23
i'm looking at the code. you didn't do anything with the font until you found the glyph index which is just looking at a charmap.
21:23
idk what went wrong
Avatar
maybe you could stop there with gdb and check?
21:24
where the backtrace comes from
21:24
(or some other debugger)
Avatar
probs bcs it has two different font sizes?
21:25
once u typing and once its displayed
Avatar
i'm using bind
Avatar
ok
Avatar
both test are executed the same way. let me poke around with a debugger
Avatar
r u at opengl 2?
21:27
or 3.0
Avatar
k
Avatar
wait
21:32
21:32
same sentence, one frame
Avatar
get char space is smth different tho
Avatar
but it did take 76ms
21:33
for one sentence
Avatar
@heinrich5991 did you make the indent depth 2 in .clang_format?
Avatar
in debug and with profiler
Avatar
@Learath2 no?
21:34
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/ddnet
21:34
I made it one tab
Avatar
Ah, github....
21:34
it's showing as 2 spaces
Avatar
but still
21:35
like.. how?
21:35
21:35
how do you spend that much time finding a space in the texture
Avatar
do you start with a 1024px texture?
Avatar
ye. i don't want to resize texture because i don't want to keep a copy of the texture in memory
21:36
so i'm using fixed sized texture
Avatar
also std::vector
21:37
who knows what happens in debug mode
21:37
try in releasewithdebuginfo
Avatar
sure
Avatar
and if it still uses >50ms, its too much
Avatar
Yeah, profiling in debug is meh in C, it's awful with C++ and STL use
Avatar
debug is rarely really useful
Avatar
In C you still get a rough idea of what is taking time, given you aren't coding like a goof
Avatar
well you could on purpose add things only for debugging
Avatar
Oh btw, @TsFreddie is that on windows?
Avatar
A profiler with a nice interface, I was excited for a second 😄
Avatar
C/C++ Performance Profiler. Contribute to google/orbit development by creating an account on GitHub.
21:42
21:42
lol
Avatar
Oh, for anyone profiling on linux, I spent a couple hours looking at profilers a couple days ago. For a sampling profiler perf seems to be the gold standard. For a JIT/VM like one there is no beating valgrind
Avatar
i tried perf, complained about many things i should change
21:43
never used it again xd
Avatar
Oh, googles gperftools wasn't bad either, and as a bonus it is valgrind compatible, so kcachegrind is available to display it
Avatar
but i used it in eclipse back then
21:44
so maybe i should retry
Avatar
@Deleted User I can't imagine it asking you to change much as long as you have the kernel module in there, you just need permissions
Avatar
yeah but i remember i did it and didnt work, then saw eclipse also had a bug, and then i gave up xD
Avatar
idk how well it integrates with tools honestly
21:45
perf record -g -p <pid> and perf report to display it worked great for me
Avatar
but perf is faster than valgrind isnt it?
Avatar
obviously ran as sudo so you can see the kernel symbols in cleartext
Avatar
that alone would be worth alot already
Avatar
They are different kinds of profilers. Perf is sampling, valgrind is a VM
21:46
Sampling is obviously much much faster, but as it can sample only so many times, it's also inaccurate sometimes
21:47
And VMs are also inaccurate because they introduce massive overhead that inflates the cost of very small calls
21:47
So you need both kinds of tools to get a good image of the performance of your application
Avatar
ok
Avatar
Oh and perf has annotate, which can show you which instructions map to which source lines and which instructions are the hottest
21:49
Sadly, no obvious bottlenecks left in the ddnet server, with #2820
Avatar
The only other low hanging fruit is "IsBanned" which you can optimize a whole lot, but it's only 1.6% of the cpu time under heavy load
Avatar
that bot xD
Avatar
depends how many bans u have
Avatar
maybe it should only trigger when "issue #number" or "pr #number"
Avatar
being able to turn off banlist checking for inforequest-sized packets is useful imo
21:50
especially with long banlist
Avatar
@noby even with 50 bans you can blast through with linear search
Avatar
and 500+?
Avatar
You have 500+ bans?
justatest 1
Avatar
Okay, we'd want something more like binary search at that point
21:52
but we could easily do that, if(m_vBans.size() > somearbitraryconstantwebenchmarkfor) bsearch(m_vBans); else lsearch(m_vBans);
Avatar
that does sound better but still i think being able to disable the check for certain types/sizes of packets could be useful
Avatar
Not very easy to discard packets without context
Avatar
For 0.7 you can get a conntrack module set up so you can drop things < 520 for non established conns
Avatar
the first connection packet + serverinfo request packets for 0.6 are always the same size
Avatar
For 0.6 I guess you can do something similar but do a u32 check for it being a join packet
Avatar
checking the header is probably better ye
Avatar
I think for these things you'll have a much better time dropping them waaaay early though
21:56
IsBanned is only 1.6% of the cpu load anyway
Avatar
with what size banlist
Avatar
but being a hashmap, it doesn't have bad asymptotic performance
Avatar
what kind of ban list do you have @noby
Avatar
@noby maybe consider a whitelist instead 😄
lol 2
Avatar
who is banned? network attacks or actual players
21:57
also how long?
21:57
the list is just perma bans and i go thru and clean it out every so often
Avatar
how many bans?
Avatar
People botting on noby's server are the only people on earth that use static ips in 2020 btw
Avatar
there are a surprising amount of static ips
Avatar
what is cgnat
Avatar
He is like a magnet for static ip botters
Avatar
wtf
Avatar
I guess it could be cgnat and noby could be banning significant portions of germany, but I guess there'd be complaints already 😄
Avatar
i check the ip (range) first to see if it has been shared recently
Avatar
well you don't see the server if you're banned
Avatar
u do if the server is set to not check the banlist for info requests
Avatar
That's probably a good idea
Avatar
meh
22:00
not sure
Avatar
We shouldn't be using the ban list for blocking reflections anyway
Avatar
lightens load during inforequest flood
22:00
for attacks it should be part of fw not banlist i guess
22:03
and i guess at ~50 of the bans or so are just undetected vpn ranges
Avatar
Add marks and mark players who switched to another app (when client lost focus) and players which switched to dummy as not active. Consider about allowing player to mark themself as not active so they can press a button to let everyone know that they are about to leave their keyboard
Avatar
@TsFreddie have u tried btw? the algorithm generally has O(n), but in real world scenario its O(n) + the character bitmap size, maybe in worst case a 2xO(n)
22:05
@TsFreddie you use bin packing?
Avatar
yes, it was better (7ms) and yes i'm using bin packing
22:06
skyline bottom left. heard it from you guys
Avatar
mhh ok
22:11
its just called like 5 times as much, but ok 2048 is unfair xDDD
Avatar
just use larger texture™️
Avatar
i would if there wouldnt be plp with gl 1.x, i fear a bit that their pcs will suffer from it
Avatar
@TsFreddie anyway, have u found out why getchar is called twice?
22:14
thats a problem too
Avatar
not really
Avatar
strange :/
Avatar
but I do know Grow is pretty stupid
Avatar
what do u mean by that
Avatar
the outline texture
Avatar
ah
22:16
mine spend more than half of the time just doing the outline.
Avatar
yeah thats huge
Avatar
idk if freetype stroker would be faster
Avatar
or maybe in the GPU shader directly xd
Avatar
or that
22:17
if you can drop gl1
Avatar
but grow could be optimized by just taking the grow param with how much it should grow
Avatar
@TsFreddie did you test if https://github.com/ddnet/ddnet/pull/2818 helps btw?
Missing: Freeing the memory again. But not so important since we keep the same fonts until end of process anyway in our case. @QingGo Could you give this a try from the Github build artifacts? If n...
Avatar
plus MSDF, you won't need that many font sizes
22:19
@deen sorry, just went bedEeveeShy
Avatar
but renderglyph isnt cvalled by fallback
Avatar
@TsFreddie np, it's quit late 😄
Avatar
and i don't see anything suspicious
Avatar
i get same count
22:35
with a shorter sentence tho
22:36
can vanilla still only handle 128 chars in chat?
22:36
or maybe less than ddnet
22:36
maybe somewhere there is the difference
22:38
@TsFreddie when u on tomorrow, you maybe check if the sentence is displayed 100% the same 😄 else i really dunno what the difference should be
Avatar
can vanilla still only handle 128 chars in chat?
@Deleted User yes, but I only rendered like 30 glyphs for both. they displayed the same.
22:40
maybe the profiler lied
Avatar
or the name of your tee was uploaded too
Avatar
my name aren't 30 glyphs long tho.
Avatar
xd
Avatar
anyway i'll probably keep checking tomorrow
Avatar
yeah maybe also without fullscreen
22:42
i think it only worked on linux, but i know that resizing will reset some stuff
Avatar
it was borderless windowed watermeron
Avatar
and (atleast on my linux) minimize is also resizing 😄
22:42
ah ok
22:42
then i dunno xD
Avatar
on windows you can't even tab out if a breakpoint hit
Avatar
maybe ddnet renders a magical spell in background
Avatar
at least my pc can't
22:43
so I don't run debugger with fullscreen app lol
Avatar
ah ok, strange i always had the opposite
Avatar
OS magic
Avatar
for me it always only worked in windows, in linux i have to press META(windows key) + D, to get my cursor back xD
Exported 355 message(s)