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 2018-12-07 00:00:00Z and 2018-12-08 00:00:00Z
Avatar
Caused by unprecise floating point arithmetic (m_EvalTick can be high and is casted to float). Generelly a cast to double wouldn't hurt, e.g. if the tick speed will be changed in future.
Avatar
I must say, banks have one of the most broken corporate structures that I've ever seen
Avatar
You can complain all you want, the branch manager can be apologetic all he wants, but if he can't communicate with the internal department responsible for your problem your problem won't get fixed
12:30
No way you can directly talk to the internal department either
12:31
So complaining is pointless, you just submit a request and wait until the responsible person decides to read complaints
Avatar
be prepared to wait at least 6 months to get what you need 😃
Avatar
luckily I know a guy who knows a guy
12:48
It's either that or you need to have a ridiculous amount of money in your account (which sadly I don't) 😛
Avatar
that helps 😋
Avatar
Oh well, luckily I never had problems with my bank and they even correctly detected and reimbursed me when someone stole my credit card info (might be DDNet server related, tried way too many hosters)
13:16
Not sure if that's just your bank or all though
Avatar
ChillerDragon 2018-12-07 13:20:06Z
yo guiis
13:20
can some1 explain snapshots?
13:20
I wonder how ofthen the CGameClient::OnNewSnapshop() function gets called
Avatar
hey, no idea i'm not familiar with that, you could either ++ a static var or use tools like hmm i don't remember is it gprof ? gcov/lcov lvoc something like that
Avatar
You get one snapshot per ticks that could be processed before the next ticks start time
13:37
That is unless you are connecting or recovering and your snap rate is limited
Avatar
ChillerDragon 2018-12-07 13:42:02Z
lol all this code gets executed every tick?
13:42
It iterates over all skin names and compares them for evey player?
Avatar
No, it gets executed every couple ticks
13:42
but it could potentially be executed every tick yes
Avatar
ChillerDragon 2018-12-07 13:44:25Z
how is the client still that fast haha
Avatar
In the runloop the server gets the current time, then until it's time for the next tick to start it'll keep ticking. As soon as it's time for the next tick to start, it'll snap. And unless you are a rate-limited client you'll get a snap
Avatar
ChillerDragon 2018-12-07 13:45:03Z
So the client should get slower the more skins you have i guess
Avatar
Because languages like C/C++/Rust are no joke, they have a ridiculous amount of optimisation that goes into them and they are blazingly fast
Avatar
ChillerDragon 2018-12-07 13:45:17Z
I thought the skin graphics are saved on join and on change
Avatar
A computer can do a lot more then one might imagine after using a language like Java or something interpreted like python
Avatar
ChillerDragon 2018-12-07 13:46:41Z
Because i want to add something similar to a skin system to my client without slowing it down :c
13:46
its like a second skin
13:48
So i am save with iterating over a big array of strings every tick and compare it agianst all the playernames
Avatar
Where in OnNewSnapshot do we iterate every skin?
Avatar
ChillerDragon 2018-12-07 13:49:08Z
m_aClients[ClientID].m_SkinID = g_GameClient.m_pSkins->Find(m_aClients[ClientID].m_aSkinName);
13:49
i think here
13:49
if i understood it correctly
13:49
find does stuff and then calls FindImpl
13:49
int CSkins::FindImpl(const char *pName) const { for(int i = 0; i < m_aSkins.size(); i++) { if(str_comp(m_aSkins[i].m_aName, pName) == 0) { return i; } } return -1; }
Avatar
Yeah i see
13:49
It's for each snapped player mind you
13:50
so only players close to you
Avatar
ChillerDragon 2018-12-07 13:50:30Z
oh so snapped players are only close players?
13:50
yea so all visible players i guess
13:51
i play a lot whit showall on full ddnet servers
Avatar
Also only for players that changed Clientinfo
Avatar
ChillerDragon 2018-12-07 13:51:25Z
wait only if they changed it
13:51
where do i see that
13:52
if(Item.m_Type == NETOBJTYPE_CLIENTINFO)
13:52
ah here?
Avatar
Snapshots are deltas
13:52
they indicate change
Avatar
ChillerDragon 2018-12-07 13:52:30Z
what ever that means xd
Avatar
Which word do you not understand in that sentence?
Avatar
ChillerDragon 2018-12-07 13:54:24Z
delete but i get it now
13:54
delete is change i rememberd something from school
13:54
delta*
13:54
not delete xd
Avatar
The server sends delta snapshots but the client reconstructs the full snap before processing it. But well... calling this code 25 times per second isn't that much
Avatar
ChillerDragon 2018-12-07 16:17:09Z
k thanks @redix
Avatar
What the actual fuck is wrong with windows? .....
Avatar
@Learath2 what do you mean
19:49
everything is fcked
19:49
october up, edge -> chromium, ....
Avatar
I'm trying to get the stupid utf8 output working on console
Avatar
Not possible I think
19:59
maybe we can just create our own console-like window in sdl2?
Avatar
good luck, from what i saw it might be done but with big caveats like not on all win versions and so on
Avatar
or just turn off the console alltogether on windows and write to a log file
19:59
there are editors on windows that can display utf8 just fine
Avatar
I thought outputting with WriteConsoleW would handle all the stupid parts but apparently even that isn't enough
20:08
@jao how does one find someone on ddnet.tw when they have a utf8 name?
Avatar
uh you could copy paste from in-game or somewhere
20:10
or navigate through favorite partners
20:11
and if it's not all uft8 chars you might get away by searching the non utf8 ones and then have the right suggestion
Avatar
This is just insane, how this can even happe nis beyond me
20:13
the data is completely garbled by the time it makes it into kernel32.dll
20:13
It's like they rand() it
Avatar
does mintty uses cmd ?
Avatar
mbrtowcs also totally destroys the pointer it gets, wtf
Avatar
" however, mintty is not a full replacement for the Windows Console window (by default running the Windows Command Processor / command prompt / cmd.exe)."
Avatar
mintty is sane
20:20
mbsrtowcs I mean
20:27
the data is garbled way before we hand it off to msvcrt though 🤔
20:28
5B 32 30 31 38 2D 31 32 2D 30 37 20 32 31 3A 32 34 3A 31 38 5D 5B 63 68 61 74 5D 3A 20 4C 65 61 72 61 74 68 32 3A 20 7A D1 94 E2 84 93
20:28
This is what gets to the logger, those aren't valid code points
20:29
5B 32 30 31 38 2D 31 32 2D 30 37 20 32 31 3A 32 34 3A 31 38 5D 5B 63 68 61 74 5D 3A 20 4C 65 61 72 61 74 68 32 3A 20 7A D1 94 E2 84 93
20:31
Actually no they are just fine...
Avatar
[quakenet] <tosky> Rᥱad wһаt IRC іnvestіgatⅰ⋁e jⲟᥙrᥒalⅰѕts hɑⅴе unϲഠⅴereԁ οn the frеenode pеⅾоpһіlia sϲɑᥒԁɑl httpsː⧸/еnⅽуcⅼοреdⅰaⅾraⅿаtiϲɑ.rs/Frееnodegate
20:55
[quakenet] <tosky> А fascinɑtiᥒɡ bⅼoɡ whеrᥱ freᥱnode stɑff ⅿеⅿbеr Ϻɑttһew ⅿѕt Trοᥙt recഠᥙnts his experiences of eyᥱ−rаⲣiᥒg yoᥙᥒɡ сһiⅼⅾrᥱn httⲣs∶//MɑttSTrⲟut.ⅽഠⅿ⧸
Avatar
+s +r
Avatar
How does one encode utf16?
Avatar
Consoles in windows are "devices", outputting to them through stdout is handled horribly in msvcrt. Accessing it properly through WinApi seems to fix the issue. This also reverts #1385 as the fix there is broken on Win7, half-baked on Win8 and meh on Win10.
Avatar
It only took me 4 hours \o/
22:58
And after all that I got told by Mithrandir that I should be focusing on other issues 🙂
22:58
As always very rewarding to work on this stuff 😛
Avatar
huh it failed CI though, guess my eyes were too tired 😛
23:10
@deen if you have the time could you review my pr? I don't feel that good about the bitmagic in my utf16 encoding, I was too tired 😛
Avatar
Thanks for working on this @Learath2 !
23:12
(but automated checks fail)
Avatar
oh I didn't push the next commit 😛
23:13
now it should compile just fine
23:13
(my ssh-agent died apparently)
Exported 103 message(s)