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 2021-08-23 00:00:00Z and 2021-08-24 00:00:00Z
Avatar
@deen do you compile SDL yourself?
09:29
for ddnet-libs
09:29
Should I update it to 2.0.16?
Avatar
ok, not yet, but i made a pr on sdl
Avatar
I heard some people had problems
Avatar
if that goes in we can give it a try
Avatar
yeah, I can add your PR
Avatar
yeah but i'd prefer the SDL devs atleast give a small feedback, who knows if that works on every OS XD
09:30
only tested it on windows and linux
09:31
@nori all SDL problems solved under wayland?
Avatar
for me it's works on sway
09:41
i don't know how it is for gnome/kde
Avatar
ok i'll try it too in a few minutes, and check if glews pr works to convince the glew guy to merge https://github.com/nigels-com/glew/pull/216 Then we also wouldn't need EGL hacks probably
10:06

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://github.com/ddnet/ddnet/#using-addresssanitizer--und...
Avatar
c7580b3 Remove Windows XP code - Jupeyy d51f205 Merge #4110 - bors[bot]
Avatar
can someone merge/review? #4103 😀
Avatar
Fixes #3806 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 ...
Avatar
Avatar
GitHub
Click to see attachment 🖼️
unsupport macos when xd
Avatar
i cant run macos builds from github :c
Avatar
Avatar
Ryozuki
can someone merge/review? #4103 😀
the problem is, you cannot really test every case, it will be a trial and error again anyway the switch bug was already not really visible
10:54
but this fixes a known issue
Avatar
just sayan
10:55
saiyan
Avatar
super sayan
Avatar
<-
Avatar
It was previously not possible to load a map or really any file with a filename containing unicode, e.g. german umlauts. Now all filenames are converted from multibyte to widechar on windows, and the correct functions and structs (with the W suffix) are used consistently. Some changes are made to synchronize ddnet's implementation with upstream (once https://github.com/teeworlds/teeworlds/pull/2936 has been merged there):
  • The unused and not working IOFLAG_RANDOM is removed (on up...
Avatar
^ this is why we need c++20 xd
11:15
u8"path"
11:15
finished
Avatar
I love that Robyt is contributing to ddnet too
11:16
He is great at refactors, would be great to have him around
Avatar
who is robyt?
Avatar
thats for sure
Avatar
is he someone famous
Avatar
he's the last man standing vanilla contributor xd
Avatar
Avatar
Ryozuki
is he someone famous
he has been doing some great work on 0.7 very clean commits, not clinging to staying merge-safe like others
11:17
Downstream client authors haven't been very happy with it but teeworlds is a mess in need of cleaning
11:18
but i dont see his prs merged
Avatar
now comes the oy drama
Avatar
ah well some are
11:19
11:19
monkalaugh
Avatar
Nah, oy has been very receptive to his stuff. I honestly expected most to never get merged from how extensive the diffs were
Avatar
i guess aslong as they aren't changing physics or opengl or cpu architecture he is fine xD
11:20
or c++1
11:20
1
11:20
or stl
11:21
so basiucally stay at 1999
11:22
robyt3 should overtake teeworlds vanilla, and just program as he wants
11:22
then you get a nice teeworlds after 1-2 years
Avatar
Seeing as I'm having trouble focusing on math maybe I should finally get rid of base/tl
11:23
c++20 lets go
Avatar
I think we are doing 14 in ddnet for now, right?
Avatar
11
11:23
17 would add filesystem support
11:23
c++20 adds char8_t
11:24
then the pr above would be 20 lines
11:24
instead of so many
11:24
just saiyan
Avatar
Maybe we can get to 17 now so I can finally get rid of the ugly void_t mess in https://github.com/ddnet/ddnet/blob/master/datasrc/seven/compile.py#L121-L134
Avatar
wtf
11:25
never noticed it yet
Avatar
only instance of template magic in ddnet I guess 😛
11:26
c++ template<class T, typename std::enable_if<!protocol7::is_sixup<T>::value, int>::type = 0> inline int SendPackMsg(T *pMsg, int Flags, int ClientID)
11:27
Allows this mess
Avatar
char8_t?
Avatar
char8_t - type for UTF-8 character representation, required to be large enough to represent any UTF-8 code unit (8 bits). It has the same size, signedness, and alignment as unsigned char (and therefore, the same size and alignment as char and signed char), but is a distinct type.
Avatar
omaigat
11:29
unsigned char, char, signed char, char8_t
Avatar
13b76ba Add donation by SP | Someone - def-
Avatar
but its nice bcs std::is_same can be used with constrains to differ between math and characters
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
why are "string" literals in c char and not unsigned char?
Avatar
good question
11:32
next question xd
Avatar
in rust u have strings they are made up of u8
11:32
iirc
11:32
xd
11:33
and char type
11:33
The char type represents a single character. More specifically, since ‘character’ isn’t a well-defined concept in Unicode, char is a ‘Unicode scalar value’, which is similar to, but not the same as, a ‘Unicode code point’.
Avatar
fancy
11:33
thats the benefit of rust, clean designed (edited)
11:34
i always feel weird casting a char* to unsigned char*
Avatar
Avatar
Ryozuki
why are "string" literals in c char and not unsigned char?
To allow implementation flexibility I guess
Avatar
whathever that means
11:36
wathever
11:36
idk how to write
Avatar
char is unsigned under arm xd
Avatar
e.g. afaik older ARM machines didn't have signed support, so you get to avoid a sign extend if your chars are unsigned there
Avatar
i just recently discovered that the ddnet github wiki even mentions how to build for arm32 https://github.com/ddnet/ddnet/wiki/armv6h-server
DDraceNetwork, a cooperative racing mod of Teeworlds - armv6h server · ddnet/ddnet Wiki
Avatar
Working with unicode strings is absolute pain in C and C++
11:42
You get used to it but after using modern languages with stdlibs designed in this decade it's always a bit of a bummer when I need to iterate through utf8 code points by hand
Avatar
honestly i generally dont like working with utf8 if you dont program a text editor you can also just use an decoded utf8 string, so directly work in utf32 or whatever that is and dont care about the few extra bytes lost in your RAM
Avatar
therefore you have direct access in your memory array
11:43
the offsets are all equal
11:43
and only encode to utf8 when needed
11:43
e.g. networking etc.
Avatar
the absolute wastefulness
Avatar
as said
11:43
if you dont work on text editor
11:43
it doesnt matter
Avatar
You are quadrupling memory use 😄
Avatar
wchar_t is 32bit under linux
11:44
ok
Avatar
Which is why you wouldn't find any wchars in any code I write 😛
Avatar
max ddnet chat message = 256 chars, maybe 10 total 2560 bytes * 4 = 10 240
11:45
its nothing
11:45
10kb and you have no disadvantes of utf8
11:45
decoding utf8 on fly wastes cpu performance
11:45
and freetype only takes decoded anyway
Avatar
Avatar
Deleted User
decoding utf8 on fly wastes cpu performance
I bet prefetch and using the cache line more efficiently more than makes up for it
Avatar
so you decode every code point every time
11:46
i doubt at that small numbers
11:47
make a 256byte unicode string and get a random offset
11:47
and see the performance
11:48
utf8 vs 32
11:48
then we'll know
Avatar
It's absolutely trivial to craft a testcase that would make either look worse
Avatar
then make on that makes utf32 look worse
11:49
but in a realistic ddnet task
11:50
bcs that was my condition
Avatar
Sure, since you didn't mention a metric it is trivial. 1) Receive any message that is just ascii (most of our messages) 2) Notice that your 256 character message is now taking 1k of memory 3) Notice memory does not grow on trees
Avatar
most players are chinese arent they
Avatar
Sure, for them notice your 512b message is now taking 1k, similar
Avatar
so you probs often have 4byte utf8
11:53
yes
11:53
not going to deny there are disadvantages (edited)
11:53
if you proof me wrong, i accept it
Avatar
The disregard with which you treat memory usage actually makes me so annoyed
11:53
This attitude is how we ended up with browsers that use the entire system memory
Avatar
i dunno
11:54
i think its unrelated
11:54
browers use utf8 probably
Avatar
No not utf32, the attitude of "it's just a few bytes" is what I take issue with
Avatar
but its true
11:55
do you always shrink your std::vector?
11:55
probably no
11:55
so that wastes memory too
Avatar
I extensively use linked lists in my code so it's usually not an issue for me
Avatar
well i prefer performance over ram, there is a sweetspot sure
11:56
but lists in many cases have too many disadvantages bcs of the heap allocations
Avatar
Modern arena based allocators are extremely good at putting linked list nodes in the same bucket for me
11:57
But if I'm using a vector I do try to reserve if at all possible and if I'm doing bulk insertions I do shrink it afterwards
Avatar
it depends on the usecase anyway, but i want a 2d game as use case
11:58
and there the hotpath should stay away from as much allocations or decoding etc as possible
11:58
but if you want to write a test case and proof me wrong, i'd be glad bcs its better to learn from such things than not 😄
Avatar
I mean you constrained me to cases where utf32 is strictly better, so I guess you win. There is no way in hell O(n) indexing is better than O(1) indexing in a 256b string
12:00
Try the same in a 4Mb string and you won't be very glad with your now 16Mb string with now O(n) indexing because it can't fit in even L3 cache
Avatar
possible, i dunno honestly
12:01
depends of if the processor even loads it into l3 cache at all
Avatar
Besides indexing is an operation hardly used at all in string manipulation, atleast not without first scanning through the string anyway
Avatar
4014385 Clean up CDoor - Learath2 b851d74 Merge #4112 - bors[bot]
Avatar
Avatar
Learath2
Downstream client authors haven't been very happy with it but teeworlds is a mess in need of cleaning
yeah and ddnet too
12:05
every tw project xd
Avatar
It seems that ddnet client doesnt like my server, as it sometimes crashes there. Just like https://github.com/ddnet/ddnet/issues/3695 there is another crash, someone told me the program showed "free(): invalid size" and then "Aborted" before the crash. Also there is anothet problem where the client hangs and if you dont wait for a few seconds and press nothing, it would crash aswell. I cant reproduce this myself, so I have no idea where these crashes could come from. If anyone here could try...
Avatar
what's the point of using char8_t instead of char?
12:34
i'm reading its papers and can't find anything
12:34
For the char specialization, eq and lt are defined identically to the built-in operators == and < for type unsigned char (not char).
Avatar
mathematically speaking there probably isnt any You could code your codebase to distinct between utf8 and ansii template <typename T> concept IsUtf = std::is_same_v<T, char8_t> || std::is_same_v<T, char16_t>; //.... template<typename T> void do_smth(T ...) requires IsUtf<T> { .. do smth for utf } template<typename T> void do_smth(T ...) requires !IsUtf<T> { .. do smth for other types } (edited)
Avatar
isn't handling everything as UTF-8 the correct way?
Avatar
i doubt
12:40
does utf8 even exist in c
12:40
it exist in c++ <20 but only pretty annoying, and they removed it iirc in c++20
12:41
ok not removed
12:41
deprecated in c++17
12:43
i guess they remove it as soon as there are better utf8 string functions
12:43
however, for the api in the std it might already be useful now
12:45
i guess someone under windows could try what happens if you use a utf8 path with std::filesystem
Avatar
std::filesystem::path uses std::wstring on Windows
12:46
so yes, some conversion is needed
12:47
but i still don't see any reason why every char string shouldn't be considered as UTF-8 string 😄
Avatar
yeah but apparently windows doesnt
12:47
have u seen the pr on ddnet?
Avatar
which one?
Avatar
#4111
Avatar
It was previously not possible to load a map or really any file with a filename containing unicode, e.g. german umlauts. Now all filenames are converted from multibyte to widechar on windows, and t...
Avatar
try that pr with char8_t xd i dont know, but i could imagine msvc added support for it
12:50
bcs devs are annoyed by these legacy things
Avatar
it looks fine
12:53
i don't think char8_t can fix WinAPI awfulness in any way
Avatar
well u8"my_pathüöäÜÖÄ.txt" is easier
12:53
than converting
12:54
what msvc does under the hood doesnt matter for the dev then
Avatar
"my_pathüöäÜÖÄ.txt" => convert it to UTF-16 => pass it to some W WinAPI function
12:54
it's always like that with or without char8_t
Avatar
yeah but since its a distinct type windows can handle it internally
12:55
it knows it expects an utf8 string now
Avatar
WinAPI heavily relies on UTF-16 and it cannot be changed for sure 🤔
Avatar
yes
12:56
not winapi must change
12:56
filesystem can implement everything
12:56
under the hood
12:57
imagine it like this u8"ÜÖÄÜÖÄ.txt" works on every system
12:57
standard
Avatar
ah so the point is that it's guaranteed to be UTF-8 string, so std::filesystem stuff is forced to do valid UTF-8 => UTF-16 conversion always?
Avatar
i dunno if that stands like that in the standard
12:58
but i guess thats the idea yes
Avatar
what if std::filesystem::path file = "ÜÖÄÜÖÄ.txt"; already works as expected? (edited)
Avatar
uff, thats also possible yeah, really dunno
Avatar
and if not, it's definitely a bug
Avatar
i could imagine c++ prepares for string functions that automatically convert such stuff to other types
13:01
and makes it a requirement for alot of the API
13:02
and char just doesnt have this requirement
13:02
bcs c didnt gave it it
Avatar
so everyone should now pollute their code with char8_t and u8"" junk?
13:03
that's bad
Avatar
depends, how often do you use unicode?
13:03
but if you use, i'd do it yes
13:04
i mean you can probs just use char* and put (char8_t*) before it xd
13:04
for IO stuff
13:04
what you use internally is your choice anyway
Avatar
you know, even #pragma once is not standardized, but it just works correctly everywhere
13:05
and code should be readable!
Avatar
yes
13:05
i use pragma once always
Avatar
the same applies to char
Avatar
but thats different still
13:06
pragma once is an addition
13:06
not a new way
13:06
its more like you say header guards should work differently than they are designed
13:06
char just isnt designed for it
Avatar
hmmmm maybe storing arbitrary byte sequence in char array actually violates some standards, but again, it just works 😄
Avatar
its not like i dont understand your point
13:08
but thats the disadvantage of an old language probably
13:08
not designed for the future 😄
13:09
it seems that sometimes people who design C++ and people who actually use it don't understand each other
Avatar
#include <filesystem> #ifdef _WIN32 #include <locale.h> #endif int main() { #ifdef _WIN32 setlocale(LC_ALL, ".UTF-8"); #endif const bool success = std::filesystem::create_directory("ÜÖÄÜÖÄ"); return (success) ? 0 : 1; }
13:47
this works as expected on both Linux and Windows @Deleted User
13:47
setlocale is needed on Windows
13:48
and it doesn't work with MinGW for some reason
13:48
MSVC is needed
Avatar
mhh
13:48
if that has no side effects.. locale always changes so much stuff
13:48
printf and stuff like that
13:49
but good to know anyway
Avatar
but no stupid char8_t 😄
Avatar
but does it work with char8_t?
13:50
@Comrade
13:50
i am curious about that xxd
Avatar
it does probably
13:50
let's try
13:50
u8"ÜÖÄÜÖÄ" is so ugly 😄
Avatar
xD
13:51
at some point i got used to suffix and prefix of strings and numbers, so idc anymore xD
13:51
6llu * 3llu xd
13:51
just to silence warnings
Avatar
it still works well on Linux, but it doesn't work on Windows 😄
13:54
even setlocale doesn't help
Avatar
ui, thats unexpected
13:54
well thats really sad, guess i need to wait for c++26 then xDD
Avatar
or just use good old char 😄
13:56
my MSVC installation is few months old so maybe that's why it doesn't work
Avatar
i dunno, could also be that they dont care yet
13:56
aslong its no requirement
Avatar
and MinGW still doesn't work
13:57
tested both Wine and native Windows
Avatar
what gcc does ur mingw use?
13:58
last time i tested c++20 features alot of stuff was still missing
Avatar
x86_64-w64-mingw32-g++ (GCC) 10-win32 20210110
13:58
looks quite old
Avatar
yeah, but probs still newer than mine xd
Avatar
but it doesn't complain about -std=c++20 at least
13:59
msvc is actually really good
13:59
implemented most stuff
Avatar
yes, and STL source code is available finally
Avatar
ah nice
Avatar
im now fully vaccinated 2/2
14:17
monkalaugh
14:17
greenthing
Avatar
Avatar
Comrade
but i still don't see any reason why every char string shouldn't be considered as UTF-8 string 😄
in rust a string has to be valid utf8
14:20
but c doesnt have strings anyway
14:20
just buffers of data that end with a \0
14:20
feelsbadman
Avatar
Avatar
Ryozuki
in rust a string has to be valid utf8
nice, that's how it should be
Avatar
thats also why the api for the filesystem doesnt use strings in rust iirc, since strings have to be valid utf8 buth unix paths dont
14:21
xd
Avatar
I am here to be the cranky old man, what are we talking about this time?
Avatar
that i can sense 5g waves
14:22
and that everythiung should be utf8
👍 1
Avatar
Avatar
Ryozuki
that i can sense 5g waves
14 days passed after your 2nd vaccine?
Avatar
no i got it today
14:23
im developing my senses
14:23
14:23
imagine having a modern std
14:25
isnt out there some more modernish libc or something
Avatar
hmmmm PathBuf and Path 🤔
Avatar
Facebook, google and boost all have moderner implementations of std stuff
14:27
What don't you like about std anyway? It is getting fairly modern nowadays, albeit very slowly
Avatar
iirc the C std doesnt have filesystem stuff
14:27
c++20 does
Avatar
Ah, C, yeah C pretty much requires companion libraries
Avatar
C is so "simple" but thats why it requires either too make the wheel or use libs, and managing libs is a pain
14:28
xd
14:29
did u figure out the cdoor collision stuff?=
Avatar
I know how it works now
Avatar
It creates some weird pseudo layer, it's extremely odd how it's implemented
Avatar
oddly i always name the files lol when testing stuff
14:49
just noticed lol
Avatar
are you that one guy hosting a server with "sv_hostname lol"? lol
Avatar
not hosting a sv rn lol xd
Avatar
maintest.cpp mh.cpp moduletest.o test.c test.cpp test.txt a.out2 compile.sh main.cpp mh2.cpp moduletest.cppm moduletest.pcm test.c.obj test.exe tmp seems like i like mh or *test
Avatar
I always have a ~/test 😛
Avatar
@Learath2
Avatar
@Deleted User moduletest
14:52
where u testing c++20 modules?
Avatar
yeah
14:52
with clang
Avatar
i think they look nice
Avatar
but thats like 1 year old xd
Avatar
Avatar
Robyt3
are you that one guy hosting a server with "sv_hostname lol"? lol
welcome to ddnet discord! 😄
Avatar
oh he joined
14:53
thats him
14:53
or her
Avatar
I'm usually just lurking around
Avatar
Avatar
Learath2
Click to see attachment 🖼️
is this zoomed or u rly have big font
14:59
L"rb" monkalaugh
14:59
windows monkalaugh
Avatar
maybe we'll add a mode L"fröüß" later lol
Avatar
Avatar
Ryozuki
is this zoomed or u rly have big font
retina display, so hidpi
15:00
i actually dislike hiding the pointer stuff behind typedefs
15:00
its so confusing
Avatar
winapi should really just get a reset
Avatar
this is also a problem with auto iirc
Avatar
sometimes it's okay not to support 16bit executables anymore
Avatar
I've sent this a few times, but https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/ this blogpost really illustrates how insane winapi can get
In this post, we’ll discuss the improvements we’ve been making to the Windows Console’s internal text buffer, enabling it to better store and handle Unicode and UTF-8 text. Posts in the Windows Command-Line series: This list will be updated as more posts are published: Command-Line Backgrounder The Evolution of the Windows Command-Line Inside th...
Avatar
@Robyt3 btw ur filesystem io pr doesnt conform with our naming conventions monkaS
Avatar
you mean outside of system.c?
Avatar
typedef has one advantage @Ryozuki char_ptr a,b; are both pointers
Avatar
I though system.c was not following the naming conventions anyway
Avatar
char* a,b; not
Avatar
iirc we dont have system.c
15:03
we are modern
15:03
we got system.cpp
Avatar
"modern" 😄
Avatar
and i think new code should conform
Avatar
yes, this caused me great pain during rebase
15:04
lol
Avatar
idk what others think
Avatar
c++23 lets go
Avatar
Avatar
Deleted User
char* a,b; not
this should be illegal in both C and C++
Avatar
Avatar
Comrade
this should be illegal in both C and C++
i agree
15:04
i dislike it too
Avatar
Avatar
Ryozuki
idk what others think
Hm, this is a good question, I actually didn't think about what to do in system.cpp
Avatar
imho new code should conform
15:05
i am also for correcting stuff
Avatar
Avatar
Comrade
this should be illegal in both C and C++
It is completely sane syntax if you learn C/C++ properly
Avatar
but makes it harder to read
👍 1
Avatar
I wanted to have ddnet and upstream somewhat stay in sync, so I didn't update the style on upstream
Avatar
char *a, *b; this is valid?
Avatar
yes
Avatar
but I agree that new style would be better to have everywhere
Avatar
i would always put it in 2 lines anyway
Avatar
yes
15:06
what is this magic number? xd
Avatar
Avatar
Deleted User
but makes it harder to read
I will say I never have any trouble with it, you will give me no evidence at all about your claim, you will go on with your day, I'll be pissed for the entire night, so let's agree to disagree
Avatar
wtf xD
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Windows epoch is before unix epoch
Avatar
1 January 1601
Avatar
according to wikipedia
Avatar
windows wants to be special always
Avatar
Btw I don't remember if we clamped that, what happens if the time is before unix epoch?
Avatar
Ah I do, t == li.QuadPart
15:09
if it underflows this will fail
Avatar
and time_t is still 32-bit on some platforms even today 😐
Avatar
ah yeah, the mingw trouble
Avatar
and signed for some reason
Avatar
@Robyt3 I think your pr looks fine, I'll give it a more thorough eye over tonight
Avatar
@Learath2 can you also review #4103
Avatar
Fixes #3806 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 ...
Avatar
@Ryozuki btw sv_swap's default value must also be changed then
15:14
should i do it?
Avatar
i dunno
Avatar
oooof, 4103 looks scary, I'll take a look
Avatar
ask deen and learath if they are ready for potential trouble xD
15:14
i tested it with switches and teams
Avatar
Changing defaults shouldn't break anything
Avatar
test it with team of 2 and 2+
Avatar
when i tested it, i found the same function as cause
Avatar
if you changed the meaning of a value feel free to update the default
Avatar
so yeah, it probably is the right patch
15:15
but who knows, just look at the "new" startline skip xD
15:15
the players always find weird stuff xD
Avatar
SetForceCharacterTeam
15:16
this was the problem wasnt it
Avatar
ye its the cause
15:16
maybe the if doesnt need to wrap the other 2 functions
Avatar
yeah also dunno xd
Avatar
@Ryozuki about your switchstate netobj, do you think maybe we should send it per team instead? With 64p and delta compression it's not that important and allows more flexibility. fokkonaut seemed a bit concerned
Avatar
i dont understand
15:18
int Status = (int)GameServer()->Collision()->m_pSwitchers[i].m_Status[Team()];
15:18
isnt it alreayd per team? more or less
15:18
xd
Avatar
Yes, but you send a snap object per character
15:19
feel free to make the pr
Avatar
And you send all players switch states to all players
Avatar
Mh, not sure if I want to make the change, I feel it's good as is. Do you see any reason?
Avatar
i dont know
15:20
maybe fokkonaut should explain himself
15:20
lately his comments are "not like this"
15:20
without any explanation xd
15:21
15:21
it triggers me so much xdd
Avatar
Yeah, hm
15:21
@fokkonaut what was your concern with the switch state object?
Avatar
chillerdragon BOT 2021-08-23 15:47:13Z
because you do not have an macos? do you want me to test something? (@Deleted User)
i cant run macos builds from github :c
Avatar
a friend of a friend has a friend who has macos on an emulator which is totally not me
15:48
but nice reply
15:48
better than the one from discord xd
15:48
but yeah, actually you can try smth chiller
15:49
GitHub is where people build software. More than 65 million people use GitHub to discover, fork, and contribute to over 200 million projects.
15:49
if you compile yourself, you need to use bundled libs, i tried the glew pr, which we also need
15:51
and if your mac supports it, especially try opengl 2.1 as this loads the most extensions
Avatar
chillerdragon BOT 2021-08-23 15:51:53Z
thats nice :) (@Robyt3)
I wanted to have ddnet and upstream somewhat stay in sync, so I didn&#x27;t update the style on upstream
Avatar
if it starts it is already enough, tahts all i need
Avatar
chillerdragon BOT 2021-08-23 15:52:27Z
is mac even supported at all? I can not get any builds working.
Avatar
you mean, if ddnet supports mac?
Avatar
chillerdragon BOT 2021-08-23 15:53:03Z
ya well ok to be fair only tested teeworlds
Avatar
i wouldn't know that macos isnt supported
15:53
but i hope with new SDL it gets less buggy
15:53
bcs the version we have is buggier than the one tsfreddie is testing on
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:55:37Z
I am not sure if its me not using mac at all anymore but I feel like apple gets more and more trash.
Avatar
just bcs they spy you and hide it under child porn as excuse?
15:56
no but i cannot judge
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:56:34Z
Got so many bugs with the new macbooks at work. And omagawd im not sure who? maybe zsh or the terminal someone hijacks my alt presses so i can not change irc buffers anymore aaa
Avatar
on the emulator it ran normally
15:56
just the github builds dont work
15:56
only from ddnet.tw
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:56:53Z
can you compile on the emulator?
Avatar
no
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:56:59Z
lemme try to compile ddnet real quick
Avatar
and i also dont want that trouble
15:57
its enough is see learath struggle once per month
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:57:24Z
hrhrhr learath the macos guy
15:58
its more than just the spying its usability and availibility that feels worse than i remembered it. I feel like those two things are the main reason one uses mac.
15:58
"it just works"
Avatar
its like with android, users like it, bcs its easy but devs hate it
15:59
bcs its annoying
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 15:59:42Z
ouu android i feel like i will never try it
15:59
im planning to replace my iphone by a pinephone in the near future
16:00
only good thing about mac terminals is that cmd+c and cmd+v works :D
16:00
not like ctrl+shift+c like in linux
16:00
yea ddnet does not build on my machine latest macos
Avatar
[quakenet] deen BOT 2021-08-23 16:01:15Z
ChillerDragon: you see PMs?
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:01:43Z
i see that i got one
16:02
but i need my archlinux desktop to open it :D
16:02
fakin mac
16:02
i use arch btw
Avatar
i use arch btw
Avatar
hi, im jupstar i have an iphone btw xd
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:05:24Z
how can github even build
16:05
also im vegan
Avatar
nice
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:05:53Z
im not :D
16:05
i just like saying it
Avatar
i am most of the time xd
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:06:01Z
good meme
Avatar
even github macos build fails like 10% of the time randomly
kek 1
Avatar
except when i go with friends
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:07:12Z
running ddnet/teeworlds on macOS is cursed anyways isnt it?
16:07
i dont even know what the current ddnet state on my mac is
Avatar
i dunno, cant be that hard
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:07:33Z
oops wrong paste
Avatar
if it comes hard on hard static link everything
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:07:53Z
oh no it launches
16:08
but i mean the actual expirience
Avatar
oh, i assume it shouldnt be bad
16:08
except that the hardware maybe is
Avatar
[quakenet] ChillerDragon BOT 2021-08-23 16:08:25Z
tabbing in and out didnt work iirc fonts not being rendered resolution being wrong or zoomed
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
Isnt it self explaining? The layer is always switch for switchstates.
Avatar
didnt we fix all this stuff xd
16:08
but tabbing in out sound like SDL bug
16:08
that might be fixed with newer sdl versions
Avatar
Avatar
fokkonaut
Isnt it self explaining? The layer is always switch for switchstates.
doesn't switch layer change it's state like everytime you interact with it
Avatar
chillerdragon BOT 2021-08-23 16:09:44Z
ima_25f8ed5.jpeg
16:09
XD
16:09
wtf is that
Avatar
is HiDPI on chiller?
Avatar
chiller when new vid showing u traveling with a laptop with tw
Avatar
chillerdragon BOT 2021-08-23 16:10:20Z
Yes
Avatar
wow weird
Avatar
chillerdragon BOT 2021-08-23 16:10:29Z
On
Avatar
must be the old SDL version too
16:10
i think TSfreddie had no problems
16:10
he tested HiDPI and non
16:11
or broken opengl drivers xD
Avatar
chillerdragon BOT 2021-08-23 16:11:03Z
ima_4e7a1a3.jpeg
16:11
Time to get sdlvm
Avatar
https://github.com/ddnet/ddnet/pull/4084#issuecomment-903225761 It is not required to predict players from other teams anyways, so it makes sense to only send one set of switch states per character @Learath2
This PR is related to #3990 Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configuration options Written a unit te...
Avatar
chillerdragon BOT 2021-08-23 16:11:16Z
Lemme try latest official release to compare
Avatar
I love how drivers just mess everything up anyway
16:11
like NVIDIA somehow makes it impossible to actually disable anti-aliasing
Avatar
are you in windows @Robyt3 ?
16:12
OpenGL + windows = true love
Avatar
yes, windows (edited)
Avatar
OpenGL on DirectX 12 for DDNet. GitHub Gist: instantly share code, notes, and snippets.
16:13
you can try this, it works on intel, nvidia and amd i think
16:13
the latest version is nice, but you only have like 60% of the native performance (edited)
Avatar
chillerdragon BOT 2021-08-23 16:13:30Z
im actually not planning a new one was always meant as a duology (@Ryozuki)
chiller when new vid showing u traveling with a laptop with tw
16:15
i also feel like every mac is different :D
16:15
@Deleted User: ok latest ddnet release looks pretty similar
16:16
what differences am i searching for?
16:16
what did you try to fix?
Avatar
i just want to know if it starts
Avatar
chillerdragon BOT 2021-08-23 16:16:21Z
ye it starts
16:16
:D
Avatar
so the glew mantainer knows it works, bcs he asked ppl to test his pr
Avatar
chillerdragon BOT 2021-08-23 16:17:06Z
owo
banhammer 1
banhammer 1
ban 1
ban 1
ban 1
ban 1
ban 1
banhammer 1
bann 1
bann 1
banhammer 1
16:17
can i comment on the pr?
16:17
if you have something to add xD
16:17
spam his emails so he merges it xD
Avatar
chillerdragon BOT 2021-08-23 16:17:36Z
can i write "developing graphic drivers" on my CV now?
Avatar
glew has no compile time version, thats annoying
Avatar
chillerdragon BOT 2021-08-23 16:17:53Z
i liked ur comment
16:18
that should work
Avatar
ez
Avatar
Anyone know how I can fix this?
Avatar
chillerdragon BOT 2021-08-23 16:18:57Z
i love how i keep getting python crash reports randomly on my mac
16:19
someone trys to run python i dont even know who :D
16:19
maybe vim? idk
16:19
ah yes its vim :D
Avatar
I'm finally removing base/tl, Q: How do you think I should handle sorted_array?
16:21
In cases where inserts happen bulk, it's much more efficient to just insert everything and then sort, which is what I did
Avatar
seems fine
Avatar
but for CUuidManager inserts can always happen but currently they happen in bulk
16:22
How should I handle that case? Just bite the bullet and do insertion sort?
Avatar
chillerdragon BOT 2021-08-23 16:27:02Z
@Deleted User: btw ddnet 13.1 works fullscreen
Avatar
nice, then its not the driver
16:27
maybe turn hidpi off xd
Avatar
chillerdragon BOT 2021-08-23 16:27:47Z
xxd
16:28
i love how i get 3 blackscreens
16:28
then a red
16:28
:D
Avatar
4 windows or what?
Avatar
chillerdragon BOT 2021-08-23 16:29:10Z
now it blinks :D
16:29
no*
Avatar
Would anyone kindly help me fix the "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." issue? I'm not familiar with VS so I'm unsure how to change the build variables
Avatar
define WINDOWS_IGNORE_PACKING_MISMATCH
16:29
xD
Avatar
You'd think I just said I didn't know how
Avatar
where did you even change the packaging option
16:30
did you use pragma pack?
Avatar
I just did what it said on the git, nothing more, nothing less
Avatar
oh its on ddnet git?
Avatar
Did we forget to pragma pop somewhere?
Avatar
i doubt we use it
16:31
heinrich killed it, when i used it once xxD
Avatar
Avatar
Learath2
How should I handle that case? Just bite the bullet and do insertion sort?
just use std::lower_bound or smth
16:32
but yeah
Avatar
Is there a stable I can use instead?
Avatar
its still insertion sort
Avatar
Avatar
Blade
Is there a stable I can use instead?
update msvc
16:33
i don't see why this should happening
Avatar
Updating the build tools should suffice?
Avatar
update everything, delete cmake cache
16:37
the classic
Avatar
"The classic" first time working with cmake, I'm used to Bam
Avatar
chillerdragon BOT 2021-08-23 16:39:18Z
bam master race
16:39
I use bam btw
Avatar
does bam even support clang?
Avatar
Is it still possible to build with bam?
Avatar
no
Avatar
chillerdragon BOT 2021-08-23 16:39:44Z
ddnet no
Avatar
and pls dont add it back
Avatar
Avatar
Deleted User
and pls dont add it back
troll
Avatar
chillerdragon BOT 2021-08-23 16:39:59Z
petition to add back bam
f3 2
Avatar
I'm all for it
Avatar
chillerdragon BOT 2021-08-23 16:40:15Z
and ./configure autgen
16:40
and ./configure autogen
Avatar
pls
Avatar
It was clunky and weird, but it worked
Avatar
cmake works too
16:40
our CI works with MSVC
16:41
i dunno, just use cmake-gui
Avatar
does the configure work?
16:41
no errors
16:41
Worked flawlessly, just compiling threw that one error
Avatar
well then its a MSVC problem i guess, we don't change packaging i think
16:41
does it name a file?
16:42
where the microsoft header is included from
Avatar
I'm updating msvc right now, hopefully it fixes itself (edited)
Avatar
anything that includes windows.h would trigger this warning
Avatar
What Roby said
16:47
Everything updated, same error. Seems to come from winnt.h
16:47
Line 2482
Avatar
mhh, also updated the windows sdk?
Avatar
Windows sdk?
Avatar
its probably an option in the MSVC updater
16:48
what even is your MSVC version?
Avatar
"As 1201ProgramAlarm mentioned above, the solution was disabling the /Zp (structure packing) compiler option. "
16:49
When I'm trying to compile my C++ project in Visual Studio, I keep getting the 2 following errors: E1574: Static assertion failed with "Windows headers require the default packing option. Changin...
16:49
right click ddnet and search that option
Avatar
Assuming you mean in CMake, I don't see any Zp option
Avatar
in msvc
Avatar
do you click on ALL_BUILD?
Avatar
No, I build only DDNet
16:53
strange thing
Avatar
why dont u use visual studio 2019 btw
Avatar
2022 incoming xd
Avatar
why dont u use visual studio 2022 btw
16:57
I have no clue what I'm doing wrong
Avatar
disable
16:57
maybe default is on
Avatar
I can't, I can only choose a value or "default"
16:58
Avatar
mh i dunno then
16:58
google your problem or use a modern version
Avatar
Okay, what kind of crackhead at the standards committee decided that std::binary_search should return a boolean?
16:59
It takes a dimwit of monumental stupidness to not return an index or at the very least a damn iterator
17:00
The person who got it in should just quit programming, taking along the people that voted yes to it
justatest 1
Avatar
Aight, weird. Using VS2019 worked
Avatar
I have seriously seen smarter toasters than this person... I'll have to litter the code with lower_bound which is far less descriptive now
Avatar
Return value true if an element equal to value is found, false otherwise.
17:22
does that not sound reasonable?
Avatar
It is correct, I have no problem with that, but it's also useless except for checking if something is already in a vector
17:31
A sane implementation would return an iterator to the found value, and the end iterator if not found
Avatar
ah yeah
17:31
you are right xxd
17:32
didnt even notice xxD
Avatar
Q: I'm wrapping std::vector to get a sorted vector of our own. Should I inherit and delete the methods that can lead to the vector getting unsorted or should I keep the vector as a private member and only expose methods of my own?
Avatar
second i think
Avatar
yep, composition > inheritance
Avatar
inheritance best xd
17:40
why don't you use boost headers @Learath2 ? most of these template stuff can be used in header only mode
Avatar
replace /base with boost xdd
Avatar
could probably xD, boost has everything
17:44
but header only are safer, bcs they work everywhere
Avatar
don't we include boost for mysql support?
Avatar
looking at the server code, it doesn't look like m_Layer in entity.h is used for much except to check if an entity is in switch. would be ok to remove/refactor out m_Layer, and just use m_Number == 0 when it's not in switch?
Avatar
make an issue or pr
18:08
this chat is fast af xd
Avatar
yes looks safe to me
18:10
the only thing is that reserving Number == 0 is very clean (but not sure if using something like -1 would be better?)
18:10
not very clean*
Avatar
is it even so bad to send the layer?
18:11
or if its always a switch layer just set it when the packet comes in?
Avatar
I don't think so, since this won't be sent often
18:13
but if we are certain that m_Layer will never be used for anything else in the future (and can always be inferred from m_Number) it's perhaps not needed
Avatar
you can never be certain xd
18:14
if somebody ever creates a new switch layer or smth
Avatar
yeah, thats my thought:P
Avatar
then argument like this in the pr, and its fine, either the ppl comment on that give better explaination or it doesn't help xD
Avatar
yes, will comment
Avatar
Hm, if only we were up to C++20 this would be so much prettier
Avatar
@Deleted User https://github.com/ddnet/ddnet/commit/0e71a4770 why did you use a sorted array here? You only insert unsorted into it and you never sort it
Avatar
doesnt it automatically sort?
Avatar
Not if you insert unsorted 😛
Avatar
shitty library then xd
Avatar
Ehe? You find a function literally called add_unsorted and you expect it to sort somehow? How? by magic? 😄
Avatar
Avatar
Learath2
Ehe? You find a function literally called add_unsorted and you expect it to sort somehow? How? by magic? 😄
XDD
Avatar
but where is that even called
Avatar
Um, since no one ever noticed that these arrays are unsorted I guess they can be replaced by vectors
Avatar
im not so sure
Avatar
Avatar
Deleted User
but where is that even called
menus_settings_assets.cpp:L386 e.g.
Avatar
i insert unsorted FROM a sorted array
Avatar
So I can replace it with a simple vector
Avatar
yes if they dont have any call to add then yes
19:01
and you can also remove static while u at it xdd
19:01
ok no
19:01
the temlates to lambdas is too much work
Avatar
I think you are by far the biggest used of sorted_array in the entire source 😄
Avatar
its not unuseful xd
19:01
if std would have flat_set
19:02
i wouldnt use it xD
Avatar
I have a diff so large it hurts my head
Avatar
Storing all the indexes as int was a rather large mistake on our part :/
Avatar
instead of size_t or instead of what
Avatar
instead of size_t
19:43
I hope everything still works
19:44
It does, wtf
19:44
oh nvm, no such luck failed to open file. filename='assets/entities/comfort/blockworlds.png'
Avatar
its ok
19:45
that is not a bug
19:45
that just means that comfort asset pack still misses other mods
Avatar
Avatar
trml
looking at the server code, it doesn't look like m_Layer in entity.h is used for much except to check if an entity is in switch. would be ok to remove/refactor out m_Layer, and just use m_Number == 0 when it's not in switch?
No, its also for Layer_game and layer_front
Avatar
Avatar
trml
but if we are certain that m_Layer will never be used for anything else in the future (and can always be inferred from m_Number) it's perhaps not needed
we dont need anything to determine this, number 0 is always on and also used for game and front layer
20:08
Thats why its num_switchers + 1, because 0 is reserved as always on, for game, front and also switch layer
20:09
you only need to send which switches are active for your current team, no need to know about others' switch states, as other teams shouldnt be predicted anyways (using /showothers)
20:09
and when you are spectating or in pause, no tees are predicted anyways
20:10
So the client also does not need to know any numswitchers, as it always receives every switch state (0-255) anyways
Avatar
and the layer doesnt need to be sent because it doesnt matter, gane and front layer switches are determined by switch number 0, which is always on when sent
20:11
(if m_Status[0] is not set to true, it has to be done, thats a server issue then because i think loops start at 1)
20:12
I worked a lot with this code in my mod, i think i know it good
Avatar
switches should be refactored... after teams core refactor
Avatar
Yes, they should, but current system also works fine.
20:13
And makes sense to me, after understanding ut
20:13
it*
Avatar
its literally spaghetti code
20:14
yeah its understandable but bruh you should check every line that works with switches
Avatar
about the first, entities are currently only added to layer_switch or layer_game (layer_front would currently have no special effect for entities anyway), but this is basically the same as what you say in the next message
20:16
I commented about this on the pr too btw
20:16
(entities as in actual objects in the gameworld, not the tiles)
Avatar
stupid Q: can we get std::bad_alloc while adding all teleouts?
Avatar
I will make a pr soon, fixing the switchstate server message and i will also look at the client
20:20
Dont release a new version with the just added switchstates, new messages should always be checked carefully and well thought, according to heinrich
20:20
We dont need more of compability code
20:20
Especially in such a case
Avatar
Q: how many bytes does server send about one player with character?
20:21
to another player
Avatar
just use vanilla as fallback
Avatar
Avatar
fokkonaut
you only need to send which switches are active for your current team, no need to know about others' switch states, as other teams shouldnt be predicted anyways (using /showothers)
that may reduce the network traffic in some cases (when there are many switches). on maps with few switches it might increase it though, especially if switching to dummy or speccing often. (and you'd also want to send this while speccing to allow adding more features on top of it)
Avatar
outdated ddnet = vanilla
20:26
simple as that xd
Avatar
besides to only send it for the characters own team you dont need to change the pr, just add a couple of lines in the server to skip the message unless character_id == snapping_id
Avatar
fits better to gamecontroller::snap
Avatar
Hey guys. Ive just started uni and if i translate it to english it would be Computer Engineer. In reality its more of a mix between CE and CS. Since i love this game, i thought id ask if there could be any possibility of me maybe helping out a bit in the future when ive studied a bit more? dont need to be anything huge, but if the opportunity arises i would gladly help a bit. Would give me some RL experience as well 🙂
Avatar
Yeah okay, sending numswitchers might actually be cool, but i dont think sending all teams is neccessary
Avatar
Avatar
Saiborg
Hey guys. Ive just started uni and if i translate it to english it would be Computer Engineer. In reality its more of a mix between CE and CS. Since i love this game, i thought id ask if there could be any possibility of me maybe helping out a bit in the future when ive studied a bit more? dont need to be anything huge, but if the opportunity arises i would gladly help a bit. Would give me some RL experience as well 🙂
just read the code + issues
Avatar
there is a lot of code:P
Avatar
Avatar
Saiborg
Hey guys. Ive just started uni and if i translate it to english it would be Computer Engineer. In reality its more of a mix between CE and CS. Since i love this game, i thought id ask if there could be any possibility of me maybe helping out a bit in the future when ive studied a bit more? dont need to be anything huge, but if the opportunity arises i would gladly help a bit. Would give me some RL experience as well 🙂
accounts
20:33
jk but someone wanted animated skins a while ago
Avatar
Avatar
trml
there is a lot of code:P
skip everything unless src/game ahah
Avatar
Ah, yeah that would be a good idea xD Just wanted to know if you guys would be okay with someone helping out a bit.
Avatar
especially src/game/server
Avatar
Avatar
Saiborg
Ah, yeah that would be a good idea xD Just wanted to know if you guys would be okay with someone helping out a bit.
maybe ask Learath or TsFreddie if there's any small stuff they want to fix but don't have time for
Avatar
as heinrich said to you
20:35
"good first issue"
20:35
i forgot it zd
Avatar
Avatar
lynn
maybe ask Learath or TsFreddie if there's any small stuff they want to fix but don't have time for
Thanks, i will do that as soon as i feel i have a bit more knowledge... Still too newb at the moment to be of any help 😛
Avatar
just try to do some shit with ddnet code to introduce another features you want to see in a game
20:36
good train, rly xd
Avatar
I will give it a go 😄
Avatar
true, starting is the hardest 😄
Avatar
Avatar
gerdoe
"good first issue"
ptsd
Avatar
i think #4104 also fixed picking too huge resolutions i looked in the SDL code and it always checks the resolution requested first
Avatar
SDLSetWindowSize&#39;s documentation tells that SDL_SetWindowDisplayMode should be used to set the sizes of fullscreen windows. SDL commit 72d812852023450b7c3850b8e87b63575df041ee changed SDL...
Avatar
i dont know cpp dont talk to me
Avatar
Avatar
lynn
i dont know cpp dont talk to me
bcs u don't "just" start 😄
20:40
c/c++ da best
20:40
you can do anything you want
Avatar
i will in 5 years
20:40
irl has been too fucked up
Avatar
yeah you can even hack yourself ez
Avatar
asshack ez
20:41
or hackass
20:41
nvm
Avatar
@Saiborg dont wait for uni to learn programming
20:47
ofc any contribution is welcome
20:47
ah i misread u already started
Avatar
would be funny if he already had an pr up
Avatar
Avatar
Ryozuki
@Saiborg dont wait for uni to learn programming
Yeah, started today 🙂 I have some basic knowledge in Java from before, but nothing fancy
Avatar
ddnet and being able to read discord
21:02
single monitor real life hacks
Avatar
ontopreplica?
Avatar
no
21:04
linux just allows it xD
21:04
to set the window half transparent
21:04
SDL_SetWindowOpacity
Avatar
"Combines" https://github.com/ddnet/ddnet/pull/4084/files and https://github.com/ddnet/ddnet/pull/4094/files aswell as making sure no unallocated memory gets accessed, thus making it safe to change NumSwitchers mid-game. It's better to send switch state per team than per character in my opinion, also this directly writes to CCollision instead of saving the switch state per character in m_SwitchStates[].

Checklist

  • [ ] Tested the change ingame
  • [ ] Provided screenshots if it is a ...
Avatar
@trml @Ryozuki
Avatar
also, i dont fully understand what https://github.com/ddnet/ddnet/pull/4108 is for
For prediction of bullets and moving pickups in switch layer (#3990). This sends the info in a separate netobject (as proposed in #4102), as an alternative to adding new netobjects/fields for each ...
Avatar
it's to associate entities with switches
Avatar
And how does the client know where its connected to?
Avatar
The id field within the netobj, the same way it's done with character netobjs
Avatar
I have a pr ready for pickups and projectiles based on this, but it requires this netobj or something similar (also one for laser walls, but will test it a little first)
Avatar
ah, yea
Avatar
Avatar
Learath2
The id field within the netobj, the same way it's done with character netobjs
ty
Avatar
hmm, 2 line diff waiting for 2 years ? :d
Avatar
@fokkonaut sending per team seems ok to me. btw I'd replace the block with the "delete"/"new" stuff with just "continue"
Avatar
no, thats inacceptable :D
21:53
xd
Avatar
Avatar
trml
@fokkonaut sending per team seems ok to me. btw I'd replace the block with the "delete"/"new" stuff with just "continue"
I think it makes sense to do it like this
21:53
Really
21:53
otherwise 1. mod makers wonder why their stuff isnt working
21:54
and 2. it is just a good way, i think, because otherwise memory that is not allocated could be accessed
21:54
see how SSwitchers is built in collision.cpp
21:54
if it would be a 256 array, it would not be an issue anyways
21:54
But like this, i think this is a good way
Avatar
Avatar
nori
hmm, 2 line diff waiting for 2 years ? :d
xD
Avatar
i think #4108 is actually okay like it is
Avatar
For prediction of bullets and moving pickups in switch layer (#3990). This sends the info in a separate netobject (as proposed in #4102), as an alternative to adding new netobjects/fields for each ...
Avatar
Avatar
trml
@fokkonaut sending per team seems ok to me. btw I'd replace the block with the "delete"/"new" stuff with just "continue"
I thought about this, I think I like it better per player, it'd be more flexible that way
Avatar
Thats the same, mod makers can change it depending on the snappingclient
Avatar
It's only the same if you send a single switch-list, which is fine with me too, if @trml thinks there is no value in the switch state of other tees
Avatar
It is, if something is needed when there is no character
Avatar
for other tees I think there is
Avatar
yeah, I thought so too, we can predict other tees using it
Avatar
for example, when switching back and forth between dummy or in/out of spec, then you wouldn't have a delay
Avatar
i dont think we need prediction of players in another team, anyways its not a big difference when sending it per player or per team, just per team makes more sense as the client has all information it needs then
22:05
(all the time)
Avatar
in a way I also agree about doing it per character, if that could open up modding possibilities (if looking at only current ddnet source team is technically enough)
Avatar
@trml you can modify it per snappingclient as fokkonaut said, so it's not really any less flexible per team
Avatar
(just better, there could also be a client that displays all team states)
22:07
then it is more flexible when its per team
Avatar
I honestly would prefer per character as the less ddnet specific the client is the better imho
Avatar
huh?
Avatar
Teams are a concept of ddnet after all
Avatar
I dont get it, it is as you would send gameinfoex per character
22:08
Its not even possible to set players into another team without them being transparent
22:08
(when speaking of modding etc)
Avatar
Okay, let's split the discussion, I'm talking about sending all switch states, not just one
Avatar
Avatar
fokkonaut
Its not even possible to set players into another team without them being transparent
for color purpose
Avatar
I'm not sure I follow the part about the snappingclient
Avatar
Server can send different switch states to different clients
Avatar
was that still about per-team vs per-character?
Avatar
Yea, about more flexibility, which in this case is the same
Avatar
I see those two as the only two options, but don't see how you can do much with the snappingclient there
Avatar
on serverside
22:11
depending on some player specific values you can choose to send number 1 as closed, for exmaple, while its opened for another client
Avatar
@trml when sending per-team you can still fake as if you are sending per-character
Avatar
When snapping switch state for team n for client x you can pretend as if team n has a different switch state
Avatar
(and i dont see how it is not better to send it per team, because when sending per character the client doesnt always have correct information
22:12
When there is no character around for example
Avatar
oh, I see
22:12
so the "subjective" switch state can be different for each character in a team
Avatar
This is a general information the Client should have, regardless of anything else, also its not character specific so it doesnt make sense at all to me
Avatar
Avatar
fokkonaut
When there is no character around for example
This is an interesting edge case
Avatar
Yea, and stuff like this can be easily avoided :D
Avatar
"easily" just need to introduce the concept of teams to the protocol, no biggie 😛
Avatar
We don't snap anything for teams yet
Avatar
I wanted to put this into teams::snap, knowing there is none xD then i thought it would fit (ddrace)controller
22:15
so i put it to the gameinfoex, which is also something that has to be available all the time (and/or should be)
Avatar
I guess we should create a CTeams::Snap and snap it there
Avatar
From where we send it is not from matter for now, but yes
Avatar
And the client will need a CTeams of it's own with an array of switch states
Avatar
Why?
22:16
they are in collision
22:17
Or do you mean for a full refactor of teams including different gameworlds? xd
Avatar
collision knows nothing of teams
Avatar
Avatar
Learath2
collision knows nothing of teams
Doesnt need to
Avatar
I tried putting a Snap in CTeams when first looking at this and the code for some reason ended up looking very ugly
Avatar
but the switchers are saved there
Avatar
hey guys I just moved from windows to debian and did the basic $ apt-get install ddnet, but that means im on older version
Avatar
You are still thinking of sending a single switch state object
Avatar
is it possible to do something to be on newest version? (edited)
Avatar
CTeams::Snap(int) for (int i = 0; i < 64; i++) SnapTeam(i, int);
Avatar
Avatar
Learath2
You are still thinking of sending a single switch state object
Me?
Avatar
Yes, CCollision has space for one state, we are sending one per team
Avatar
no? it has space for 64 teams
22:19
states*
Avatar
how about when a character is in solo? that would perhaps be a case where you have to send different states to different team members (when doing per-team instead of per-character)
Avatar
Oh, that's so ugly, I missed that 😛
Avatar
Avatar
Learath2
Oh, that's so ugly, I missed that 😛
xd
22:19
Thats how its saved on the serverside
Avatar
@trml you'd think so, solo people in teams share switches, it leads to some very INSANE behaviour
Avatar
xddd
22:20
i still dont think people of other teams or solo players should be predicted at all
22:20
because you dont interact with them
Avatar
yeah, when thinking about it I never saw any place where it would separate the players
Avatar
Avatar
fokkonaut
because you dont interact with them
then, while watching, it would also be smooth, if you just have /showothers on
22:21
same as we dont predict while spectating
Avatar
we dont predict other teams now
Avatar
no? thats good, should also be done for solo players
22:22
(if not super)
Avatar
Avatar
trml
we dont predict other teams now
Only if unseen though, no?
Avatar
they are also considered as "other team"
Avatar
Avatar
Learath2
Only if unseen though, no?
I think so too, not sure
Avatar
I removed the physics prediction as well
Avatar
If showothers is on and predict others are on it should still be predicted?
Avatar
@Learath2 I thought it would be worth trying it out to see how it worked
Avatar
@trml and how do you have the team information?
Avatar
we have it somewhere I think, I just remember using IsOtherTeam
Avatar
svteamsstate
Avatar
Anyway, if you don't think you'd use the switchstate of other teams for anything we can also send just a single one
Avatar
but we can use it
22:26
since it means less delay when switching to/from spec/dummy
Avatar
How much less though? We snap fairly often
Avatar
yes, would just be limited to ping
Avatar
Hm, wouldn't the dummy also get its own switch state object actually?
Avatar
actually yes, but the other snapshot is never used
22:28
or
22:28
hmm, yeah
Avatar
It should be used at the very least to get the dummy client id 😛
22:29
anyway, I think it'd only help when switching to spec if we don't predict other teams
Avatar
so the delay is not actually the whole ping, just the time until the next snapshot is read
Avatar
in that case we can just send one I guess
22:30
I just had an idea for a very ugly optimization, if tees tell the server whose dummy they are, they can receive even lighter deltas 😛
Avatar
another possibility would perhaps be to only update the snapped state for the current player. but that would require some hacky code on the server
Avatar
Avatar
trml
another possibility would perhaps be to only update the snapped state for the current player. but that would require some hacky code on the server
I don't follow this
Avatar
the state would be sent for each team/character, but the server would not update the state that is sent for all the other characters other than the snapping client, and would just send the last cached state
Avatar
I think its okay to send it only for your own team. @Learath2, should m_Status from the ccollision array for other teams be reset, or can we just leave old information in there as they get updated when it needs?
Avatar
Avatar
trml
the state would be sent for each team/character, but the server would not update the state that is sent for all the other characters other than the snapping client, and would just send the last cached state
Hm? every character has their own snap
22:34
SnappingClient iterates through every client
Avatar
you mean each client has, not each character
Avatar
yes, ofc
Avatar
Avatar
trml
the state would be sent for each team/character, but the server would not update the state that is sent for all the other characters other than the snapping client, and would just send the last cached state
This would be a very minor optimization though, since deltas are already extremely light
22:35
An update of up to 8 switches will only cause 1 byte to be transmitted
Avatar
Avatar
fokkonaut
I think its okay to send it only for your own team. @Learath2, should m_Status from the ccollision array for other teams be reset, or can we just leave old information in there as they get updated when it needs?
clientside
Avatar
yes, you could cache it clientside as well
Avatar
Avatar
fokkonaut
I think its okay to send it only for your own team. @Learath2, should m_Status from the ccollision array for other teams be reset, or can we just leave old information in there as they get updated when it needs?
Hm, I guess we can keep garbage in there, the implementer just needs to keep in mind only the current team is valid
Avatar
I mean the info gets outdated fast
Avatar
Avatar
Learath2
Hm, I guess we can keep garbage in there, the implementer just needs to keep in mind only the current team is valid
good
Avatar
Sorry if I'm being annoying with the questions btw. Until someone gets in some compatibility code we only get one shot at netobjs, so I want to get it right
Avatar
Same as i think
22:44
updated my pr
22:44
#4114
Avatar
This even only changes the server code
22:45
thats quite good i think
22:47
If our own character doesnt exist we dont predict anything, so this seems to be okay
Avatar
mind if I review this tomorrow? I'm exhausted
Avatar
Sure, not much to review tho
22:48
really small pr
22:48
just geting netobj correct, i use item id as team
Avatar
seems correct to use team
Exported 959 message(s)