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-11-21 00:00:00Z and 2020-11-22 00:00:00Z
Avatar
When I try to compile DDNet on the WSL (Version 1) with gcc it will compile fine and start. However, it cannot initialize SDL2 then because I'm on the subsystem. Is there a known way around this somehow? [2020-11-21 01:11:30][sdl]: SDL version 2.0.10 (compiled = 2.0.10) error: XDG_RUNTIME_DIR not set in the environment. [2020-11-21 01:11:30][gfx]: unable to init SDL video: No available video device [2020-11-21 01:11:30][gfx]: out of ideas. failed to init graphics [2020-11-21 01:11:30][client]: couldn't init graphics This are the last 5 lines printed to the log
Avatar
@Learath2 you could copy the whole config directory and try on Linux or send to us
Avatar
[quakenet] ChillerDragon BOT 2020-11-21 07:37:18Z
@Spyry how many threads do you use for compiling? How bad is your hardware? And which file are you editing? If you edit a deeply rooted file that everyone depends on then it has to recompile a lot.
Avatar
@becc does WSL support graphical applications at all?
07:44
because this error message sounds like not
Avatar
and what is your goal? If it's just to get a Windows executable, you should use mingw or Visual Studio
Avatar
@Deleted User it was a clean config
Avatar
Avatar
Spyry
@Deleted User what version can i use ddnet to create my mod?
Just use the most recent github version.
Avatar
@Ravie write shorter messages
Avatar
I really love the new chat layout. Especially that it has miniature of a player skin. It's easier to tell if that's a zombie or a human. Players tend to trick others a lot telling "he is on right side of a map, catch him" while being on the other one ๐Ÿ˜„
08:13
I was tricked by that every time and it was annoying ๐Ÿ˜…
08:14
@Ravie how does it break readability? it improves it actually
Avatar
what do you mean hole on the left side
Avatar
idk about you, but I read who said the message, and then my eyes naturally go to the left side of the next line
Avatar
the text is always align next to the name
08:16
@Ravie write the exact same text with old chat
08:16
and send a pic and then rate again
Avatar
if you read chat as a continuous text, this does break the flow
Avatar
mhh ok, i disagree on that
Avatar
also more often that not it leaves a single word in the next line which looks extra stupid with the huge hole next to it
Avatar
it should have been like that before
08:18
we didnt change that algorithm
Avatar
yeah but it would be kinda tucked under the name and not look dumb
Avatar
well the best would be if the name is above the message always like here on discord
08:19
but the chat is too small for that
Avatar
cozy mode justatest
Avatar
also most games with chat that I'm familiar with also wrap chat like old tw
Avatar
@deen I am trying to keep my Windows Environment clean and install most of the Toolchains on the WSL. So my question would be if it is possible to compile for Windows with gcc/g++. However, I also tried installing VS Community 2019 but keep getting errors compiling the Client. I am pretty new to DDNet-Sources and Compiling and only got basic knowledge in C/C++. The warnings I get compiling with Visual Studio: cl : Command line warning D9025 : overriding '/MDd' with '/MTd' cl : Command line warning D9025 : overriding '/W3' with '/W0' The error I get compiling with VS: C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um\winnt.h(2482): error C2338: Windows headers require the default packing option. Changing this can lead to memory corruption. This diagnostic can be disabled by building with WINDOWS_IGNORE_PACKING_MISMATCH defined. I read on some sites that this error occurs because of the Zp (structure packing) Flag. However, I cannot really find where to change it in Clion
Avatar
@becc Probably you need to use mingw and cross-compile then.
09:14
I'm not a Visual Studio expert, but there were some tutorials that should work: https://forum.ddnet.tw/viewtopic.php?t=5765
Avatar
Or just install Linux, fix that and ruin your life in every other aspect
09:31
imo using cmake-gui makes it really ez (edited)
09:32
just define the source and dest directory generate VS .sln project and open it normally in VS
Avatar
VS2019 should be able to open CMake project directly
09:39
finally ๐Ÿ˜„
Avatar
Fixed all the merges and clang-format (hopefully)

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://...
Avatar
b70a59d Add benchmark command for pts - def- 8b8eed3 Merge #3337 - bors[bot]
Avatar
As requested by Aoe to decide who gets to do a part. Other games support the same: https://wow.gamepedia.com/Roll !screenshot-20201121@114310

Checklist

  • [x] Tested the change ingame
  • [x] 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...
Avatar
Translations can be too long for text buffer and get cut off. We should somehow warn about this. Text can be too long to be shown in graphics, maybe it can be scaled then? Not so easy to solve.
Avatar
@noby have u exported your fng 0.7 map without a "data" directory
11:27
bcs it looks broken with 0.7 client
Avatar
i sometimes get huge fps drops right now, with no apparent reason
Avatar
even on older versions?
Avatar
how can i figure out where they come from?
11:28
good point, gonna check
11:29
i didnt have them earlier tho and my computer setup hasnt changed, no problems in other games
Avatar
the biggest problem with laggs is using a old client after using a new client, bcs that can reset alot of default config vairables
Avatar
259629d Map optimizer - jupeyy 1883546 Merge #3201 - bors[bot]
Avatar
ah, also between the closer versions?
Avatar
no
Avatar
i switch between the steam (non-nightly) and the one from the aur all the time
Avatar
that should be fine
Avatar
okay, im gonna check on an old client
Avatar
@Comrade VS's cmake support is god awful
yes 1
11:33
Your best bet on windows is to avoid VS, just use mingw or msvc from the command line with whatever make you want
11:33
nmake, ninja, msys make all work just fine
Avatar
but cmakes vs support is good xd
Avatar
@Deleted User about the map optimizer, do I just run it after map_convert_07?
Avatar
yes but be aware that it always outputs maps into "out"
Avatar
oh, that's a bit annoying, but ok
Avatar
but you could do ./map_optimize "m.map" "../m.map"
11:38
probably
11:38
ok not the same name
11:38
else it reads and writes the same file xD
Avatar
that is very unintuitive
11:38
../m.map should be from your CWD, not from out
11:38
and the default can be out/m.map, ok
Avatar
yes but i said that in the pr
11:38
its to be sure its not overwritting old files ever
Avatar
I forgot about that stuff already, too long ago ๐Ÿ˜„
Avatar
but feel free to change this parameter things ๐Ÿ˜„
Avatar
just want to use it for 0.7 maps for now, not improve it
Avatar
alright
11:41
@deen do you understand what that guy on steam tried to say?
Avatar
not sure which
Avatar
@Deleted User if you only want to build yeah the vs project generation works, it's hardly any good for development
Avatar
@deen
Avatar
nor is it "good" for building, the generated project will not have launch targets correctly set
Avatar
some graphics bugs, maybe ask him to provide screenshots
Avatar
well it sounded like he fixed it, but not sure xD
11:49
you asked me if i can help him, but i dont understand him xd
11:49
@Learath2 it updates if the cmake file changes
Avatar
map_optimize takes a while, but 50% size is nice
Avatar
map_convert was slower for me xD
11:51
killed my whole pc xD
Avatar
sure, but I had map_convert finsihed already
Avatar
ah ok
Avatar
and now need to map_optimize all maps ๐Ÿ˜„
11:52
out of memory probably?
Avatar
nah i have 32gb, it was just that KDE thought my pc crashed or smth, atleast i had to replace it with a new isntance
11:54
i triggered all maps at once xD
11:54
map_optimize takes around 5minutes with all my cores
Avatar
``` /home/teeworlds/src/master/src/engine/shared/network.cpp:27:44: runtime error: index -1 out of bounds for type 'unsigned char [1394]' #0 0x6c8233 in CNetRecvUnpacker::FetchChunk(CNetChunk) /home/teeworlds/src/master/src/engine/shared/network.cpp:27:44 #1 0x6d1a35 in CNetServer::Recv(CNetChunk, int*) /home/teeworlds/src/master/src/engine/shared/network_server.cpp:635:21 #2 0x4a9b5d in CServer::PumpNetwork(bool) /home/teeworlds/src/master/src/engine/server/server.cpp:2171:...
Avatar
that sounds dangerous
Avatar
@Deleted User want to look into it? Got to go afk a bit
12:05
otherwise I'll check in the evening
Avatar
i've no idea for the network code, but if its easy i can look into it
12:46
where is my update button xD
Avatar
settings -> ddnet
12:48
cant find it
Avatar
weird
Avatar
so i have to download from website?
Avatar
maybe idk
Avatar
update manualy
Avatar
@Boti. nice to move all your stuff in the new folder...
Avatar
@Slayer its better to replace and store all stuff into your config directory anyway
13:00
the config directory is just like a data directory, u can do the same thing there
Avatar
i will do^^
13:20
PES2_OmgMask
Avatar
[quakenet] Learath2 BOT 2020-11-21 15:26:23Z
Riddle me this, I'm too sleepy to study I'll just fall asleep, I'm too sleepy to code, I can't really think when sleepy and I can't sleep because then I won't be sleepy at night
15:26
Wtf am I supposed to do then? I'm just standing up and walking around the house so I don't just fall asleep
15:30
or play teeworlds greenthing
Avatar
play teeworlds
Avatar
[quakenet] Learath2 BOT 2020-11-21 15:39:32Z
everyone knows I only play tw at 2am
Avatar
!screenshot_2020-11-21_16-52-35 To reprod.: input any filter(so the selection is small) Scroll
Avatar
@deen I think we explicitly wanted ot not run Jupeey's optimize map tool on all maps
Avatar
what does that tool do?
Avatar
removes unused tiles from tilesets
Avatar
ah
16:35
that sounds pretty useful tho
Avatar
ah, you're only talking about autogenerated 0.7 maps, I see (@ deen)
Avatar
@deen is showall now on and cant be disabled?
Avatar
@Slayer yes, the last few versions had a broken autoupdater unfortunately
16:50
@Deleted User no, but client sends the distance and server sends as far you can see
16:50
@heinrich5991 yeah, only autogenerated ones. especially important because 0.7 download is so slow
Avatar
got a crash
Avatar
But you can still manually enable /showall to get a demo where you can see all
Avatar
in the auto demo of my friend it was exactly when someone joined
Avatar
so you can reproduce it with demo?
16:52
then should be easy to debug
Avatar
nope
16:52
(spec the other tee "lume")
16:52
the timing is just too perfect
16:53
exactly crashed when someone joined, or the skindownloader)
Avatar
sadly no output nothing ๐Ÿ˜ฆ
Avatar
@deen fwiw download on 0.7 should be at old fastdownload speeds now
Avatar
yes, that's still relatively slow for me when I'm far away
Avatar
Which is still nowhere near what we get with http yeah
Avatar
The releases on the website are completely broken for me, doesn't happen if I build it myself, I can't debug it either
17:30
(it's rather impossible to debug something when you have no debug symbols)
Avatar

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/#using-addresssanitizer--u...
Avatar
oh damn. could it be related to the shared library versions on your system?
Avatar
could be, do you know of a ldd equivalent I could use to check which libraries are being loaded?
Avatar
oh, it's on mac?
Avatar
on windows
Avatar
i think windows should always prefer the local directory
Avatar
macOS might be completely insane, but atleast it comes with the tools to sort out the insanity
Avatar
but it's weird that you're the only one reporting it. many should use windows
Avatar
well we have ppl who record instant crash dont we?
17:36
in steam
17:36
and in #bugs
Avatar
smells like it crashes in the nvidia driver
Avatar
since I never installed the driver by hand I assume windows update shipped it to me
Avatar
mhh, but u said it showed strange outputs, didnt u?
17:41
ah could u test 14.5 or earlier (edited)
17:42
wanna know if old renderer works atleast
Avatar
I don't understand anything about this, if I launch it from a command line it works just fine. If I launch it under a debugger it instantly crashes, if I launch it by double clicking it just dies around when we initialize gfx
Avatar
ohh ok
17:43
confusing af
17:43
maybe timing tho
Avatar
in windbg it says it crashed deep inside the nvidia driver, in VS it says it crashed in ntkernel, in cdb it says it didn't crash at all
Avatar
now that we have timing crashes with intel and nvidia driver this is really bad :/
Avatar
but this one is completly different
17:44
intel crashes inside a map
17:45
also its not confirmed yet, its just possible
Avatar
How do I switch from Time to Score?
Avatar
SDL2 calls into some opengl thing, which calls into nvoglv64.dll which calls into KernelBase.dll!GetFileType() which fails and raises an exception
17:49
0xC0000008: An invalid handle was specified.
17:50
This is the best I can do without symbols for SDL2.dll
Avatar
@Learath2 do u know our caller?=
Avatar
I don't have symbols for our code either
17:50
I can try to reverse it ๐Ÿ˜›
Avatar
oh yeah right u said that ๐Ÿ˜„
17:51
but own builds work fine @Learath2 ?
Avatar
yep, if I build it myself it works fine
Avatar
maybe its a mingw bug xd
Avatar
no idk what sdl it links to if I build myself
17:52
Ah, ghidra figured out what SDL function it's calling
17:52
I forget that disassemblers use more than just debug symbols ๐Ÿ˜›
17:52
it's SDL_CreateWindow
Avatar
well u could just replace the SDL2.dll
Avatar
Which explains why it crashes before I ever see any graphics
17:54
How silly is it that windows doesn't let me know it crashed? it seems like it exits gracefully but it raises an exception all the way in the kernel...
Avatar
i probs would as soon as the windows would be created
17:55
but without any kind of window it just closes it
Avatar
if there is a console attached it launches fine btw
Avatar
thats a really strange bug xD
17:56
have u tried 32bit?
Avatar
wait I'm almost there ๐Ÿ˜›
17:58
I wonder if this has something to do with the debugging support we added
17:59
GDI32.DLL::ChoosePixelFormat
17:59
opengl32.dll!pgldrvLoadAndAllocDriverInfo()
18:00
um
Avatar
but its default off
18:00
but this should be the normal process of creating a opengl window
18:00
doesnt sound weird to me
Avatar
Okay for some reason my computer is running AppVerifier
18:03
Which I don't get because I don't even have it running?
18:04
okay, seems VS injects this to break on exceptions
18:06
I can't work like this, why is it injecting things into my environment?
Avatar
what did u expect xd
Avatar
How am I supposed to debug a volatile bug when the environment is actively being manipulated by the debugger itself?
18:07
I don't get how this tool is "industry standard" and how people swear by it. How can you do any serious work with this?
Avatar
have u tried to disable highdpi flag?
Avatar
Okay found why verifier.dll is getting injected. Did you know about IFEO on windows? turns out VS sometimes sets a global flag on an image file
18:15
but forgets to remove it when it's done debugging
Avatar
never heard of it xd
Avatar
Windows and it's mishmash of a thousand year old systems is really so, sooo, sooooooo annoying
18:21
How in the world can a process with TrustedInstaller privileges fail to write to registry?
18:25
Anyway, removing the stupid registry key using some arcane black magic to launch regedit with TrustedInstaller privileges finally fixed this most annoying issue
Avatar
@deen can you lookup where finishes are made, on what exact server?
Avatar
from database no
Avatar
ok
Avatar
from teehistorian yes, I think
Avatar
i just still wonder about my crash, maybe asan server side would have shown something
Avatar
asan only runs on ger2
Avatar
yeah thats why i wanted to know ๐Ÿ˜„
Avatar
and ger2 showed nothing special in the last days except what I opened the bug for
Avatar
ok
18:32
guess i have to play with asan then xd
18:32
even if the perf is really annoying
Avatar
I guess there is no timing bug, there is a bug in sdl though which causes this exception when a console is not attached
18:37
I'm guessing some winapi function takes a handle to an existing window before allowing you to create a new one, but we nuke our console too early
Avatar
but does using a different SDL.dll fix it?
Avatar
well let me give it a try to just complete this mess of an experiment
18:40
nope even with the newest SDL the exception is raised
18:40
I'm guessing somewhere along the 5 different libraries this call traverses, someone catches this exception and drops it
18:41
(instead of not passing an invalid handle to winapi in the first place)
18:42
Oh if you ever want to give Application Verifier a try on windows, it's also completely broken unless you launch it with TrustedInstaller privileges
18:43
and windbg might or might not accidentally add your application to the wrong application verifier list causing it to be run under 32bit, a native 64bit binary running under 32bit is veeery fun to debug
18:45
And application verifier requiring kernel support is a testimony to how horrible an ecosystem windows is
18:46
I will go have a drink, this experience really depressed me
Avatar
How do I switch from Time to Score?
Avatar
in client? cl_ddrace_scoreboard 0
19:06
in server: there's probably some flag or it depends on servertype
19:06
try to change name to something not containing ddnet/race
19:06
@Deleted User you probably know ^
Avatar
@deen in which file can I change this?
Avatar
gamemode.h
Avatar
does anyone know what default flags are set by gcc ? how can I check that
19:51
like -Wall
Avatar
gcc -Q --help=warnings|grep enabled
Avatar
fd45f65 Add Solo Cheat II news post - def-
Avatar
@deen i changed the names and not worked
Avatar
7110ac3 Add missing phpbb files - def-
Avatar
Don't set GAMEINFOFLAG_TIMESCORE in gamecontroller.cpp
20:01
Try to figure out such things on your own. In this case it was rather easy. I told you about cl_ddrace_scoreboard already, when you grep for that, you find its in-code name ClDDRaceScoreBoard. When you grep for that, you find m_TimeScore in scoreboard.cpp. When you grep for that, you find GAMEINFOFLAG_TIMESCORE in gameclient.cpp. So the final grep for that delivers you to the source in the server: gamecontroller.cpp
Avatar
@Spyry I've just made this
20:08
As none of DDRace gameinfo flags were relevant to my mod.
20:09
And yes, TIMESCORE is the thing.
20:09
Btw you will bump into many more fixes after that. As there is no separate score for points, it's still seconds.
20:09
And you will need to remove all logic that will load and save time.
20:10
And maybe you will need to negate score for 0.7 clients before giving it them.
20:10
I mean giving them negative value.
20:10
And you will need to add incrementing score for kills off course. (edited)
20:12
src/game/server/player.cpp void CPlayer::ProcessScoreResult(CScorePlayerResult &Result)
20:12
comment out all here
20:12
ah and you will need to reset score after match end
20:13
and make matches ๐Ÿ˜„ as there are none
20:13
@deen ty
20:14
negative score logic is here src/game/server/player.cpp void CPlayer::Snap(int SnappingClient) ... - int Score = abs(m_Score) * -1; + int Score = m_Score; + if (Server()->IsSixup(SnappingClient)) + Score = m_Score * -1;
20:14
not sure if you really need it
20:15
also src/game/server/player.cpp void CPlayer::Snap(int SnappingClient) ... - pPlayerInfo->m_Score = Score == -9999 ? -1 : -Score * 1000; + pPlayerInfo->m_Score = Score == -9999 ? -1 : -Score; // TBD: removed multiplication + //pPlayerInfo->m_Score = Score == -9999 ? -1 : -Score * 1000;
20:15
as time score was in milliseconds and you reuse score variable, so you don't need multiplication
20:17
@Spyry @becc ^ about scoring
20:19
@deen unfortunately there is no simple switch as DDNet is tailored to scoring in time, not points.
Avatar
Also to show score to all players on "match end" you need to set server flag to paused = true for 3-5 seconds.
20:21
That was a hard trick to find.
20:21
There is no documentation and I've spent about a day/ searching for that. (edited)
20:21
But we can write one ofc
Avatar
eh it's rather awful to work with ddnet as a mod base :/
20:27
too much spaghetti
Avatar
make -j$(nproc) [ 23%] Built target engine-shared [ 23%] Built target json [ 24%] Built target dilate [ 24%] Built target fake_server [ 25%] Built target map_extract [ 32%] Built target game-shared Scanning dependencies of target DDNet-Server [ 34%] Building CXX object CMakeFiles/DDNet-Server.dir/src/game/server/score.cpp.o Now don't compile anymore
20:38
justatest
Avatar
Chuck Norris approved Teeworlds. Chuck Norris network has 9 repositories available. Follow their code on GitHub.
23:34
???
23:35
Why does it happen?
Avatar
which mod is that
Avatar
I'm using ddnet as base
23:38
The default code of shotgun dont work fine
Avatar
maybe someone botched it, since we don't use that part of the code in ddnet
23:41
you could compare to 0.6.5 vanilla
Avatar
I uncommented the part that was commented on shotgun and it's like this
Avatar
yeah, check how it looks in 0.6.5 vanilla
Exported 298 message(s)