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-06 00:00:00Z and 2020-09-07 00:00:00Z
Avatar
Hi! I am trying to build the javascript client of DDNet in this project: https://github.com/eeeee/ddnet. And I get stuck at the last stage of linking. It seem that the wasm binary file can not link with dynamic library in linux64. Should I compile all dynamic library which ddnet client used to wasm binary with emscripten by myself? or there are another simpler way? Any help would be appreciate.
@Eki Finally I change the compileto_js file and build some js target successfully, but it still can not run normally in browser. So I use ddnet*.js file from http://teewebs.net, and do some hack, then serve it using github page. https://github.com/QingGo/ddnet-web-client-test
(edited)
Contribute to QingGo/ddnet-web-client-test development by creating an account on GitHub.
Avatar
@Learath2 u around?
07:10
ok nvm
Avatar
@Eki nice. what's the plan now?
Avatar
@Eki nice. what's the plan now?
@deen next step I'll make a crawler to fetch info of servers whose support websocket and respond json to web client.
Avatar
Could you fix websockets in servers first? 😄
08:46
Might be related to websockets update, I'm on Arch Linux using libwebsockets 4.0.20-3 Using https://teewebs.net/, compiled server with -DWEBSOCKETS=ON, getting this on the server: [2020-08-...
08:47
Maybe something like ws:127.0.0.1:8303 Maybe try websockets when udp connection doesn't work.
08:47
And would also be great to have a way for normal client to use websockets, since sometimes UDP is blocked but Websockets keeps working
Avatar
Could you fix websockets in servers first? 😄
@deen i ll try but it seems work normally with libwebsockets 2.x, why should we update it?
Avatar
Ah, then we just need to enforce using websockets 2.x in cmake
08:50
because my distribution only has websockets 4
08:50
and we don't bundle it, do we?
Avatar
And would also be great to have a way for normal client to use websockets, since sometimes UDP is blocked but Websockets keeps working
@deen and this maybe including lots of work
Avatar
I thought most of the changes for the server code would apply equally to client
Avatar
can we bundle it by change cmake and put it into ddnet-lib?
Avatar
Since we have dyncam already. As suggested by n000b on Discord
Avatar
I thought most of the changes for the server code would apply equally to client
@deen it seem not that difficulty, i 'll try it.
Avatar
Thanks a lot!
09:03
@Eki yeah, we could bundle it. But is libwebsockets 2 even still maintained? Maybe libwebsockets has an upgrade guide explaining what you have to change to make it work with current library version?
09:03
And if you get websockets working again, I'm planning to run it on official servers again
Avatar
is there an Option that ddnet.exe doesn't use recources when tabbed out
Avatar
oh heinrich ur here
Avatar
@Im 'corneum you could try gfx_backgroundrender
Avatar
@Eki yeah, we could bundle it. But is libwebsockets 2 even still maintained? Maybe libwebsockets has an upgrade guide explaining what you have to change to make it work with current library version?
@deen when I install libwebsockets in debian 10 and ubuntu 18, the default version is 2.0.3 iirc. I will try to add websockets function to client first, and then try to update the libwebsockets version.
(edited)
Avatar
@Ryozuki just woke up
Avatar
well, read my pm when u can justatest
09:09
well i can just say it here, im trying to add the join functionality via steam, but it needs the callback stuff from steam, to register a callback you use a macro and i dont know how to add that exactly to the api flat
Avatar
@Im 'corneum I use cl_refresh_rate_inactive 120
Avatar
also is there a reason why you didnt add the connect key to rich presence?
Avatar
@Ryozuki couldn't figure it out last time, added some debug info
09:11
wanted to add it today
Avatar
i think this is fine
09:12
but to join another u need the callback
Avatar
as is, this just puts the server address on the command line
09:12
which is not that helpful
09:12
but yea, something like this will work
09:12
I wanted to experiment with what the callback actually returns
09:12
we need to handle this event
Avatar
the steam:// url?
09:13
what we passed?
09:13
no
Avatar
no
Avatar
the connect in the rich presence is just that
09:13
ip + port
Avatar
that's not the thing we need I think
Avatar
and it is used in that event
09:13
i think its that
09:13
"connect" - A UTF-8 string that contains the command-line for how a friend can connect to a game. This enables the 'join game' button in the 'view game info' dialog, in the steam friends list right click menu, and on the players Steam community profile. Be sure your app implements ISteamApps::GetLaunchCommandLine so you can disable the popup warning when launched via a command line.
09:14
so we can get the param using GetLaunchCommandLine
Avatar
which we do already
09:14
but it also works for when the game is already running
09:14
via the callback i sent
09:14
this command line is when the game is not running
09:14
and u join
09:14
iirc
Avatar
not only
09:14
your stuff sounds like you have to invite your friend
09:14
it also works for joining
Avatar
there is an event "new launch param"
Avatar
without iinvite
09:15
GameRichPresenceJoinRequested_t Called when the user tries to join a game from their friends list or after a user accepts an invite by a friend with InviteUserToGame.
09:15
see
09:15
it is either u join or u join by nivite
09:15
its both
09:15
and the callback contains the value of the connect key that rich presence has
09:16
thats why u dont need invite
09:16
if the rich presence has the connect info
09:17
well i just need to know how to add STEAM_CALLBACK to api flat
Avatar
it probably doesn't have to do anything for the flat API
09:19
maybe insert a typecheck, if feasible
09:20
but other than that, it can simply be a no-op, if I understand it correctly
09:20
ah
09:20
hm
09:20
maybe not
09:20
need to investigate
Avatar
Setup: 2 monitors, 1920x1080, 2560x1440. DDNet 14.6.2 (Steam version). $ i3 --version i3 version 4.18.2 (2020-07-26) © 2009 Michael Stapelberg and contributors When starting DDNet with fullscreen enabled (the default), it sets my right monitor's resolution to 1280x1024, leading to a weird scroll-on-screen-edge behavior. This obviously makes fullscreen mode unusable. Interestingly, when I have two windows open on the right screen before launching, so that the DDNet window get...
Avatar
i have i3 and it works perfectly for me
09:50
well i3-gaps
09:50
ah but both my monitors have same resolution tho
Avatar
@Im 'corneum you could try gfx_backgroundrender
@heinrich5991
@Im 'corneum I use cl_refresh_rate_inactive 120
@deen i had backgroundrender on 0 and refresh rate on 120 already. but ddnet still causes my pc to stay awake or even wake up from energy saving mode
Avatar
Oh, it's about this problem. Sounds more like a Windows Energy Saving setting
Avatar
@Ryozuki have you tried only having the steam window open on the screen when launching it?
Avatar
it is defenetly because of ddnet. ofc i searched all about windows settings already
Avatar
@heinrich5991 i have steam set to floating tho cuz its all bugged with the friends chat
09:58
but ye usually only steam is open there
Avatar
@Im 'corneum I don't really understand how an application can wake up a computer if the computer is off
Avatar
@Ryozuki can you open one non-floating window before ddnet?
09:58
perhaps windows wakes up the computer for updates (it sometimes does) and ddnet doesn't let it power off automatically anmore
Avatar
its not off. its that mode when i press any button or move the mouse the fans turn on again and the pc the ready to go.
Avatar
still, ddnet is not running then
09:59
the cpu is off in that mode AFAIK
Avatar
@heinrich5991 works fine with firefox open steam on top of it floating and opening ddnet
Avatar
hm k
Avatar
@heinrich5991 do u use i3 or i3gaps?
10:00
i3gaps has fixes and stuff
Avatar
@Im 'corneum same problem with teeworlds btw?
Avatar
it has to be. today i logged out of my account with ddnet turned off. and then after 20 minutes my pc automaticly went into the energy saving mode.... i didnt even knew that was a thing
10:01
im gonna try tonight or later
10:02
also i mentioned before that when i used to tab into ddnet in the morning (it was running all night) the client would crash instantly.. or maybe already be crashed idk
10:03
i mean its no big deal. i just have to close ddnet when i turn off my pc. but something must be going on there
Avatar
maybe sdl sets some kind of "do not power off while I'm running" flag like media players do?
10:04
@Ryozuki no, using i3. it doesn't happen with only one monitor enabled for me
Avatar
any reason u dont use i3gaps
10:05
xD
Avatar
I don't need gaps? ^^
Avatar
u can disable them
10:05
:)
Avatar
but why would I run i3gaps then?
10:05
AFAIK they're by the same maintainer
Avatar
its not just gaps
10:06
i3-gaps – i3 with more features (forked from https://github.com/i3/i3)
10:06
no
10:06
arch has it btw
Avatar
It is kept up to date with upstream, adding a few additional features such as gaps between windows (see below for a complete list).
10:08
features: gaps, smart gaps, smart border, smart edge borders, i3 bar height
10:09
idk then
Avatar
@deen could it be that because i deleted all languages.txt ddnet says update failed, but it actually updated?
10:51
All except 1
Avatar
Couldn't we store both mapres .png & .rules in mapres directory, instead of having the first one in mapres/ while the other in editor/? it's damn confusing, even though I think I kinda get the point of separating them... but that'd also make it easier to clearly see for what you have the automapper rules
Avatar
why do i have to redownload almost every map? (edited)
Avatar
in autoupdater? we deleted them in some version and redownloaded later.
Avatar
was there any change in the hash?
12:44
or looks like a lot of map have been updated recently
Avatar
@Chairn Lots of maps had mapres in sizes not divisable by 16, which could, or caused graphical bugs
12:54
so they had to be fixed
12:54
that explains it then
12:54
thx
Avatar
[quakenet] deen BOT 2020-09-06 12:54:51Z
Zwelf: teamrace inserts fail super often, other ones seem to work fine. could you take a look if you see something wrong?
Avatar
[freenode] Zwelf BOT 2020-09-06 13:15:12Z
Since mostly teamrace is affected, I would guess that the cause is locking the tables. As for each insert/update the table is locked first.
Avatar
[freenode] Zwelf BOT 2020-09-06 13:26:56Z
Using a transactions instead might help. Or changing the teamrank semantic to save each teamrank would help as well, but would make accessing teamranks more expensive. (Didn't come around to test how expensive yet :/)
Avatar
@Moderator trolol block on ger3:8303
PeepoPing 1
🐑 1
13:53
apparently watching this channel
13:53
now left
13:54
@heinrich5991 id 2763 generic enough that we can implement join with another sdk too?
13:54
s/id/is/
Avatar
yes actually
13:54
although I didn't take care about that
Avatar
I was thinking of doing discord game sdk so we get rich presence here too
Avatar
discord isn't accepting new games rn apparently
13:55
although the deprecated rich presence API might still work
Avatar
huh, where did you see that?
Avatar
on the help pages about the game sdk
Avatar
I only saw a warning about the discord commerce stuff
13:56
we aren't looking to sell skins are we?
Avatar
Due to unforeseen circumstances we currently are unable to review games for commerce approval. This means that all unapproved games won't be able to get their needed approval to start charging &...
13:56
ah
13:57
okay, understood
Avatar
I even made us a team 😛
Avatar
aww
Avatar
5991... 5.09.91 happy birthday afterwards i guess xd
Avatar
prolly nit
14:16
not*
Avatar
oh 😦
Avatar
I know we aren't too far apart in age so I'd guess the 5991 stands for 1995 😄
Avatar
lets just celebrate heinrich without any reason
14:17
oh thought he's older 😄
Avatar
Though I don't know for sure, so lets celebrate anyway Celebrate feelsbirthdayman 🎂 🥳
Avatar
alles gute zum geburtstag @heinrich5991
Avatar
thanks
14:19
I guess it's my real fake birthday today 🥳
Avatar
happy fake birthday \o/
Avatar
@Learath2 is str_token_next allowed to not advance? like is a length of 0 allowed
Avatar
I actually don't remember what specifications I designed that to
14:45
@Deleted User wym by length of 0? like empty string?
Avatar
@Deleted User I think that you now abort the tokenization on empty list elements
14:45
unfortunately, it seems that there is no test for this
14:45
can you add one?
14:46
e.g. EXPECT_TRUE(str_in_list("abc,,def", ",", "def")); in src/test/str.cpp
Avatar
yeah i meant what heinrich said 😄
Avatar
https://github.com/fmtlib/fmt @Learath2 c++20 format, available now 😉
A modern formatting library. Contribute to fmtlib/fmt development by creating an account on GitHub.
Avatar
Eh, this is nice, but it kinda requires compiler support to be great
Avatar
wdym?
Avatar
Knowing the internals of std::string would make the implementation nice, clean and performant 🙂
15:16
Did you see what this one looks like? Full of compiler specific workarounds for stuff
Avatar
the implementation? no
15:16
haven't looked into it
Avatar
though I guess one doesn't really need to concern themselves with the implementation details
15:17
I just have a thing for elegant code 😄
Avatar
the std lib also usually looks messy 😉
Avatar
Y, so much backwards compatibility cruft
Avatar
Problem: Different tile images for tiles with ids 6 (shifted "outdated" inscription), 9 (snow at the bottom), 12 (snow at the bottom) Not critical but we getting out of sync. Related to 3767eebead65d482a5666df145f368ef070ec2fd. If I revert it - problem is gone Steps to reproduce: 1. Start editor 2. New map 3. Add front layer 4. Keep space 5. Click on Game layer and front 6. Repeat step 5 until you can`t see the differences in existing tiles
tear 2
Avatar
@deen || Zwelf: Should we just log every INSERT query we make while one of you figures out how to fix teamranks?
Avatar
@Learath2 well, i have a bug for that open but Zwelf said it's not so easy to do since we have prepared statements now
17:38
we used to do that, made life much easier
17:38
The MySQL C++ doesn't provide a way to print a prepared statment AFAIK, but SQLite provides a function to expand a prepared statement. Therefore we could just always create a SQLite stateme...
Avatar
Sqlite seems to allow us to expand the query, we can do that
17:39
Its better than not having the query and losing teamranks
17:40
we should have a pinned topic here with some helpful links + the discord link
Avatar
@louis join the group, send me your steam name and I'll add you as mod
17:41
then you can create that topic
18:17
again not dilated/compressed/optimized
18:19
@BannZay ^
Avatar
when u take a screenshot wouldn't it be good to echo in chat "Screenshot Taken" or something along those lines
Avatar
bind f10 "+screenshot(dk, is it right); echo Screenshot Taken"
Avatar
Bind <key> "screenshot; echo <msg>"
Avatar
when u take a screenshot wouldn't it be good to echo in chat "Screenshot Taken" or something along those lines
@louis I had another idea but @jao didn't like it :C
Avatar
1fd5c3e Try out higher mysql timeouts - def-
Avatar
my game just hanged twice when I used spectate on person while being on pause. on full server (Back in the sky, windows, steam version)
Avatar
r u able to debug it
Avatar
Game hangs when you changing person you spectate Steps to reproduce: 1. Connect to the server (with players one) 2. Say /pause 3. Switch person you spectate (hold shift and select any random name from the list) 4. Repeat 3 until your game hangs (it reproduces with ~10 switches sometimes it takes much more) Managed to reproduce it on released steam version and on master (ef9260601e0386e67ef9d7f999bdf0fcb8f1ab71) Hang call stack: ![image](https://user-images.githubusercontent.com/...
Avatar
@Deleted User yes, I opened an issue
20:59
the thread just infenitely sits at system.c sphore_wait()
21:03
it loads CPU pretty hard and memory grows up to 3gbs and keep doing it
Avatar
seems like a dead lock, a couple of other threads also blocked here
21:11
but I am not familiar with this code
Avatar
can u see what the graphic thread is doing @BannZay ?
Avatar
how can I know which thread is a graphics thread?
Avatar
it will probs feature class names with graphic in it
21:13
or backend
Avatar
right now its at CommandProcessorFragment_OpenGL2::RenderBorderTileEmulation
Avatar
ok
Avatar
at sync_barrier();
Avatar
oh
21:15
mh
21:15
can i see a screenshot?
21:16
from the calling tree
Avatar
yes, as well I could stream for you if you want to
21:16
yes
21:16
secd
21:16
Avatar
can u look what the value of vertexcount is
Avatar
not, its not available
Avatar
ah is it an optimized build?
21:19
oh, I dont know
21:19
I dont think so*
Avatar
mhh strange that u cannot access it
21:20
does it still run or does it hang there?
21:20
like can you continue debugging?
Avatar
I used "${workspaceFolder}/build/DDNet.sln", "-t:DDNet", "-p:Configuration=Debug", "-p:Platform=x64", "-m",
21:20
it hanged
Avatar
can you access Drawnum in the for loop?
21:21
just hover over it
Avatar
DrawNum 4294966218
Avatar
ah
21:22
that sounds wrong xd
21:22
can u click left on function call above
21:22
and go over pcommand
Avatar
VertexCount 4096
Avatar
that sound good, but the other is way too much
Avatar
ok ty
Avatar
anything else?
Avatar
hard to say, bcs actually it uses the same command as the OpenGL 3.3 impl, and i never had that bug, so either buffer overflow inside the backend or buffer overflow outside of that thread
Avatar
okay, I can reproduce it later if you will need some more data about it. Just contact me if you will need
Avatar
ok ty
Avatar
well if its easy to reproduce for you, you can quickly write a patch to find whats the real value 😄
Avatar
the real value? Of what?
21:30
I have no idea what to do
Avatar
i will tell you soon
Avatar
sure, I will be available for about an hour
Avatar
src/engine/client/graphics_threaded.cpp replace the first three lines of function RenderBorderTiles with void CGraphics_Threaded::RenderBorderTiles(int BufferContainerIndex, float *pColor, char *pIndexBufferOffset, float *pOffset, float *pDir, int JumpIndex, int64 DrawNum) { if(DrawNum < 0) { return; } in src/engine/client/graphics_threaded.h replace the function with virtual void RenderBorderTiles(int BufferContainerIndex, float *pColor, char *pIndexBufferOffset, float *pOffset, float *pDir, int JumpIndex, int64 DrawNum); and in src/engine/graphics.h with virtual void RenderBorderTiles(int BufferContainerIndex, float *pColor, char *pIndexBufferOffset, float *pOffset, float *pDir, int JumpIndex, int64 DrawNum) = 0;
Avatar
oh boy, hacker time
Avatar
then set a break point at the return
21:36
its funny, that bug should be pretty easy to repreduce
21:36
but i cant xD
Avatar
I spent about 2 minutes clicking on different persons, its actually not that ez in debug build
Avatar
if thats actually the bug and not smth else, it should be dependend on the position of your camera
21:37
maybe it resets or smth when switching spec
Avatar
yes, try to locate your camera far away from the start
21:37
you are right
21:38
thats what I did]
Avatar
maybe u can record with obs
21:40
then we see where it happens _D
Avatar
mhm? You want recoring of how do I reproduce the bug?
Avatar
yes, it should always happen at the same position
Avatar
hmm, okay
Avatar
but you can also just remember the position
21:41
if the game hangs it probs still shows an image?
21:41
that would probs already help
21:41
even in release mode
Avatar
The slow query logs are full of this: # Time: 200906 21:03:43 # User@Host: teeworlds[teeworlds] @ ger6.ddnet.tw [89.163.212.120] # Thread_id: 101540 Schema: teeworlds QC_hit: No # Query_time: 11.012166 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0 # Rows_affected: 0 Bytes_sent: 67 SET timestamp=1599419023; LOCK TABLES record_teamrace WRITE, record_teamrace AS r WRITE; Do we really need these lock? See also https://dev.mysql.com/doc/refman/5.7/en/table-lock...
Avatar
thx @BannZay
21:45
the camera might reset too far left
21:46
like even left from killtiles
21:46
i dunno if i ever thought about that xD
21:47
yep can reproduce
21:47
ty
Avatar
by the way I patched code and reproduced hang, do you still need results ?
21:47
oh, okay. So you can do it now
21:48
I always say and then think, nevermind
Avatar
just as i thought
21:51
the camera goes left from border kill tiles
21:51
i'll fix it, and somebody else should fix these camera bugs xD
Avatar
fixes #2766 Appearently the center of the camera can even go outside of the kill border(like even left from it) I also notice that sometimes when zooming out, and then in again the zoom level gets negative(since the new smooth zoom) These numerical unstableness makes me sweat a bit xd
22:09
This prints SQLite statements to the console. I tried to expand MySQL statements with the SQLite function as well, but this didn't work since it isn't valid SQLite syntax.
22:14
will fix that too
Avatar
Zwelf: Oh boy, I had some horrible SQL statements running in /ranks/. Got a few down from 20 s per query to 0.05 s...
Avatar
sry @deen
22:20
canceled your bors
22:23
i hope i didnt destroy it xd
22:30
f682a79 Make it possible to join via the Steam friend list - heinrich5991 89eb210 Mark players on the same server as playing together in Steam - heinrich5991 7162ded Fix formatting in CClient::Update - heinrich5991 435137d Allow joining and inviting others via Steam friend list while ingame - heinrich5991 ebe5b51 Clamp kill border count - Jupeyy bfd24d7 Clamp camera zoom - Jupeyy d6a353f Merge #2763 #2768 - bors[bot]
Avatar
I don't think that's true for all unicode names, is it? This might explain some of the duplicate team ranks we got.
Avatar
aed4293 Prevent NULL pointer in mem_copy (fixes #2753) - Jupeyy 297f276 Merge #2764 - bors[bot]
Avatar
[freenode] Zwelf BOT 2020-09-06 22:50:38Z
deen: nice :)
Avatar
f897660 Don't lock SQL writes for teamrace - def- 85f8095 Merge #2767 - bors[bot]
Avatar
No reason to predict camera position in case when we just changed spectator. But tbh I have not found a big reason to predict it at all.
23:11
b7c3a6d Allow different timeouts for different downloads - def- 742ee90 Merge #2744 - bors[bot]
23:18
92d08d0 add str_utf8_copy - TsFreddie a3a363f C90 - TsFreddie 44c699b Fix unicode pasting in DoEditBox - TsFreddie b045a3d Revert & use "str_utf8_truncate" instead - TsFreddie f0971f5 Update mapres by mind - def- badc49c Revert "Revert & use "str_utf8_truncate" instead" - TsFreddie 6b05393 str_utf8_copy using str_utf8_truncate - TsFreddie e48596d Add test cases - TsFreddie 05c199e I can't count - TsFreddie e3cfb23 Merge #2742 #2745 - bors[bot]
23:25
a496583 Fix proof circle position in editor - def- acea5bd Merge #2747 - bors[bot]
Avatar
b7da058 Remove the rudimentary fuzzing since no one uses it anyway - def- 5548be0 Update front.png by Soreu - def- 7069d26 dont predict camera position on spectator changed - BannZay cbc272f Merge #2758 #2769 #2772 - bors[bot]
Avatar
Is someone working on a skinfetcher?
Exported 337 message(s)