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 2022-01-17 00:00:00Z and 2022-01-18 00:00:00Z
Avatar
Should catch TERM and INT and handle them cleanly, like shutdown in rcon console. This makes the fifo file get removed properly, remaining ranks stored in sqlite file etc.
Avatar
746fc30 Allow multiple comands when adding vote in UI - def- 7e7fac8 Escape voting commands sent from client - def- e03e621 Merge #4604 - bors[bot]
Avatar
Avatar
plsplsplslol
ye you can use 3 dummies
ok ty
monkaS 1
08:25
lmao
Avatar
Avatar
Ravie
dummy hammer & copy
hi Ravie
Avatar
Jupstar ✪ BOT 2022-01-17 11:25:15Z
@deen: ever made a native benchmark run with the m1 btw? e.g. the phoronix benchmark maps could be interestingand maybe in entities on a map like Fly to the Legends 2 without any other players(to get max possible fps xd)
Avatar
hi @Souly
Avatar
As reported by MitakoKotomi in https://forum.ddnet.tw/viewtopic.php?f=118&p=70154

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+UB...
Avatar
Avatar
Jupstar ✪
@deen: ever made a native benchmark run with the m1 btw? e.g. the phoronix benchmark maps could be interestingand maybe in entities on a map like Fly to the Legends 2 without any other players(to get max possible fps xd)
not a real benchmark. but I noticed that fps are much higher than with rosetta2. i don't know if phoronix even supports macos
Avatar
Jupstar ✪ BOT 2022-01-17 13:07:08Z
yeah rosetta something like an emulator so thats expected i guessthe openbenchmark ddnet site says macos is supported and last time i checked the test suite didnt really check what client version you use, I could simply replace ~/.phoronix-test-suite/installed-tests/pts/ddnet-1.1.0/build/ with any build (@deen)
not a real benchmark. but I noticed that fps are much higher than with rosetta2. i don't know if phoronix even supports macos
13:08
but we have benchmarking built into the client anyway, guess you just need to run it with the demo to get the fps files, right?
Avatar
Jupstar ✪ BOT 2022-01-17 13:34:28Z
@bencie: whenever someone has around 300-400fps with nVIDIA card, its 100% a laptop with nVIDIA optimus, the worst shit ever invented And the only solution is to buy a new laptop without that.... and seriously suggest exactly that, there is no other fix
13:35
if he's lucky he can disable it in the bios, but probs not
Avatar
Avatar
Jupstar ✪
@bencie: whenever someone has around 300-400fps with nVIDIA card, its 100% a laptop with nVIDIA optimus, the worst shit ever invented And the only solution is to buy a new laptop without that.... and seriously suggest exactly that, there is no other fix
Ah i didn't know about that, but good to know. Still, an easy check would be to see if he accidentally locked refresh rate, but it's kinda annoying to even try to troubleshoot with no response other than "i want fps"
Avatar
Jupstar ✪ BOT 2022-01-17 13:45:12Z
tru :P
Avatar
Avatar
GitHub
Click to see attachment 🖼️
Yee
Avatar
Avatar
heinrich5991
@fokkonaut creating a minimal example can also help you find the error
c++ #include <iostream> #include <vector> using namespace std; class CDoorTile { public: struct Info { int m_Index; int m_Number; }; std::vector<Info> m_vTiles; }; class CDoorTile *m_pDoor; int main() { int Height = 10; int Width = 20; m_pDoor = new CDoorTile[Height * Width]; for (int i = 0; i < Width * Height; i++) { CDoorTile::Info Data; Data.m_Index = 5; Data.m_Number = i+1; m_pDoor[i].m_vTiles.push_back(Data); } int Found = -1; int Index = 7; for (unsigned int i = 0; i < m_pDoor[Index].m_vTiles.size(); i++) if (m_pDoor[Index].m_vTiles[i].m_Number == 8) { Found = i; break; } if (Found != -1) { cout << Found << "\n"; cout << m_pDoor[Index].m_vTiles.size() << "\n"; m_pDoor[Index].m_vTiles.erase(m_pDoor[Index].m_vTiles.begin() + Found); } return 0; } @heinrich5991 this is basically what i am doing. And it works in this example, as expected. I have no idea why it would not work in the tw base.
Avatar
Avatar
fokkonaut
when i hover over m_pDoor
As i said, this seems to be the weird thing. I dont see how that can happen though
Avatar
in the original, it says your m_pDoor array is empty, if I understand it correctly?
Avatar
but you access its first element
Avatar
no, only if found
Avatar
but you do in your case
Avatar
what do you mean?
Avatar
I can't copy-paste code from an image
Avatar
Avatar
fokkonaut
Click to see attachment 🖼️
if DoorIndex != -1
15:23
c++ int CCollision::GetDoorIndex(int Index, int Number) { for (unsigned int i = 0; i < m_pDoor[Index].m_vTiles.size(); i++) if (m_pDoor[Index].m_vTiles[i].m_Number == Number) return i; return -1; }
Avatar
DoorIndex is 0, but the m_pDoor array has size 0, if I understand it correctly
Avatar
Avatar
heinrich5991
I can't copy-paste code from an image
there are programs that get copyable text from images
Avatar
so m_pDoor[DoorIndex] is out of bounds
Avatar
Avatar
heinrich5991
DoorIndex is 0, but the m_pDoor array has size 0, if I understand it correctly
you mean: m_pdoor[index].m_vTiles[DoorIndex]
15:25
well, but its not
15:25
as you can see, it returned that DoorIndex
Avatar
m_pDoor[Index] is out of bounds, I mean
Avatar
huh?
15:26
But how can it be out of bounds, thats also not possible because m_pDoor = new [height * width], as in tw code
15:27
i dont get how you think that can be it
Avatar
c033513 Default players to being afk on new map - def- cfe5032 Merge #4611 - bors[bot]
Avatar
I don't get your mindset. you claim that everything is obviously okay, even though you obviously don't understand something: there is a bug
Avatar
fair
Avatar
in your debugger, it said that the array is length 0. did I misunderstand that?
Avatar
yes and no
Avatar
Avatar
fokkonaut
when i hover over m_vTiles
.
15:28
it shows it as correct, including correct values if i hover over m_vTiles
15:28
if i hover over m_pDoor though, it shows m_vTiles size = 0
Avatar
can you output m_Index?
Avatar
Index*
Avatar
wait
15:30
(Index cant be out of bounds though, because it gets set using GetPureMapIndex, but let me try real quick)
15:31
thats my index: 102882
15:31
a valid tile position
Avatar
okay. I think your debugger is showing m_pDoors[0] when you hover it
Avatar
would make sense
Avatar
so that's a different element than m_pDoors[Index] aka m_pDoors[102882]
Avatar
yea, so the size IS actually correct and i should be able to erase
Avatar
I'm going to eat something, see you later
Avatar
Avatar
fokkonaut
[2022-01-16 19:29:09][hi]: returned: 0 [2022-01-16 19:29:09][hi]: removing: 0/1
as i can also print the values
Avatar
Avatar
heinrich5991
I'm going to eat something, see you later
alright
Avatar
I can not even loop over the vector: for (std::vector<CDoorTile::SInfo>::iterator i = m_pDoor[Index].m_vTiles.begin(); i != m_pDoor[Index].m_vTiles.end(); i++) { }
15:58
That also asserts. Very weird.
Avatar
wrong iterator type? is m_vTiles initialized?
Avatar
how do you initialize a std::vector?
16:01
with .clear()?
Avatar
if you called normal constructor should be fine
Avatar
how?
Avatar
but if m_pDoor[Index] has not been initialized then you might read out garbage
16:02
default constructor should do it implicitly
Avatar
m_pDoor[Index] definitely is
Avatar
Avatar
deen
default constructor should do it implicitly
so i dont have to call anything manually?
Avatar
Avatar
fokkonaut
so i dont have to call anything manually?
no, std::vector<int> my_vector; creates an empty vector 🙂
Avatar
I don't see the assertion with the code you sent
16:03
you were supposed to give a piece of code that causes the problem, not one that works 😄
Avatar
how, if thats exactly what im doing? :D
16:03
now that i think about it there is one thing that is different in fact
16:04
that is that m_pDoor gets mem_zero-ed after creating, could that be it?
Avatar
definitely
Avatar
then that has to be it
Avatar
memzeroing a vector will destroy it
16:04
that's why I said it should be initialized properly 😄
Avatar
:D oh man
16:04
thinking u have everything correct and then someone elses year-old code comes in :D
16:04
i'll check one sec
Avatar
where do you store your crystal balls, deen?
16:05
I also need one
Avatar
Avatar
heinrich5991
where do you store your crystal balls, deen?
you sure its called "balls"? 😄
16:06
Thats sounds soo weird to me
Avatar
A crystal ball, also known as an orbuculum or crystal sphere, is a crystal or glass ball and common fortune-telling object. It is generally associated with the performance of clairvoyance and scrying in particular. In more recent times, the crystal ball has been used for creative photography with the term lensball commonly used to describe a cry...
Avatar
Avatar
fokkonaut
i'll check one sec
nice, it actually was it
Avatar
This article needs additional citations for verification
Avatar
you think this is about the name? 😄
Avatar
Yeah, I assume
Avatar
lol, definittely not
16:07
but I can give you another refernece
Avatar
But I am not sure, maybe my mindset is blown
Avatar
Definition of crystal-ball noun in Oxford Advanced Learner's Dictionary. Meaning, pronunciation, picture, example sentences, grammar, usage notes, synonyms and more.
a sphere especially of quartz crystal traditionally used by fortune-tellers; a means or method of predicting future events… See the full definition
Avatar
Okay okay, you right 😄 But imho it still sounds weird 😄
16:09
Gonna use crystal sphere instead
Avatar
Jupstar ✪ BOT 2022-01-17 16:11:41Z
@fokkonaut: just save Width * Height in a member var and check if the index is valid at runtime
Avatar
a error that rust would have prevented poggers
Avatar
Jupstar ✪ BOT 2022-01-17 16:12:01Z
102k doors sounds alot xd
16:12
he can also use a vector and use at()
Avatar
Avatar
Jupstar ✪
102k doors sounds alot xd
his mod has crazy stuff i think
16:12
at does bounds checking?
Avatar
Jupstar ✪ BOT 2022-01-17 16:12:54Z
yes
Avatar
Jupstar ✪ BOT 2022-01-17 16:13:10Z
but in debug mode i think even [] does it
16:13
for vectors
Avatar
Avatar
Jupstar ✪
@fokkonaut: just save Width * Height in a member var and check if the index is valid at runtime
all fine, it was because of mem_zeroing
Avatar
Avatar
Jupstar ✪
102k doors sounds alot xd
thats the door tiles only.
Avatar
Avatar
Jupstar ✪
but in debug mode i think even [] does it
well u probs need a flag for it
Avatar
Avatar
Jupstar ✪
102k doors sounds alot xd
Every single tile has a possible doortile :D
16:14
and the only thing i did is now to make each tile holding a vector, so multiple doors with different numbers can be put on one single tile
Avatar
Jupstar ✪ BOT 2022-01-17 16:14:49Z
i see, then ur map is just huge xd
16:17
since c++11 zeroing any kind of memory allocated with new is stupid anyway
Avatar
Avatar
Jupstar ✪
i see, then ur map is just huge xd
Nah, that spot is actually at 400/80 or so
Avatar
Jupstar ✪ BOT 2022-01-17 16:19:33Z
ok there is one exception, you can still allocate non initialized memory by leaving out the parenthesis and having no user defined constructor
16:19
e.g. Object* o = new Object;
Avatar
that uses the default constructor, no?
16:21
so only primitive types end up uninitialized
16:21
(and using () does not change that)
Avatar
Jupstar ✪ BOT 2022-01-17 16:21:33Z
the compiler generated one
16:21
it does
Avatar
can you give me a reference for that?
16:22
I thought new Object and new Object() were equivalent
16:25
it says that T object and new T is initialized the same way
16:25
when I write T object, then everything non-primitive in my object of class T is initialized
16:25
i.e. vectors, unique_ptrs, shared_ptrs, etc.
Avatar
Avatar
heinrich5991
where do you store your crystal balls, deen?
I spent some time tutoring students with little C++ experience? 😄
Avatar
Jupstar ✪ BOT 2022-01-17 16:27:38Z
then they use default initializers or constructors
Avatar
ok, what is initialized by new T() that is not initialized by new T?
Avatar
Jupstar ✪ BOT 2022-01-17 16:28:27Z
i think for classes that contain ANY member that has a constructor, the constructor is called
16:28
the compiler cannot just skip it
16:29
but e.g. struct test { int a; int b; } would not initialize any member when you have a var test t
Avatar
those are also true for new T as far as I understand it
16:29
yes
Avatar
Jupstar ✪ BOT 2022-01-17 16:29:13Z
without parenthesis
16:29
yes
Avatar
you say that this is initialized when you write new test()?
Avatar
Jupstar ✪ BOT 2022-01-17 16:29:39Z
yes
16:29
the default initialization for ints is 0
Avatar
interesting, TIL
16:30
(kinda "confirmed" by typing it into godbolt for int)
16:31
C++ is complicated ^^
Avatar
Jupstar ✪ BOT 2022-01-17 16:31:10Z
that's also why i usually prefer direct member initialization nowadays e.g. struct test { a = ...; b = ...; };
16:31
easier to not fuck up xd
16:31
its the java style
16:31
xD
16:32
newer c++ versions are also very relaxed
16:32
you can just call constructors directly there
Avatar
example?
Avatar
Jupstar ✪ BOT 2022-01-17 16:32:42Z
CSomeObject a = CSomeObject(1, 2, 3);
16:33
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/gameclient.h at master · ddnet/ddnet
Avatar
I'd call that "basic functionality", not "very relaxed" 😛
Avatar
Jupstar ✪ BOT 2022-01-17 16:33:19Z
i dont think vanilla could copy that code
Avatar
Avatar
Jupstar ✪
CSomeObject a = CSomeObject(1, 2, 3);
Tf
Avatar
Jupstar ✪ BOT 2022-01-17 16:34:34Z
true xD relaxed in a way that its not too annoying (@heinrich5991)
I&#x27;d call that "basic functionality", not "very relaxed" 😛
Avatar
heinrich always future proof
16:34
hello there irc log readers
Avatar
Jupstar ✪ BOT 2022-01-17 16:34:54Z
i mean creating stack objects anywhere is a relaxing c90's way for me
16:35
where you need to put them at the start of the funcion :D
Avatar
ouch 😄
Avatar
Jupstar ✪ BOT 2022-01-17 16:35:38Z
true, i always forgot such stuff xD (@Ryozuki)
heinrich always future proof
16:37
oh but this is value intialization actually
the default initialization for ints is 0
16:37
no default
16:37
but its still true in the context
Avatar
the quotes on this bridge are horrendous
16:37
why doesnt it just use the discord feature instead of an embed
Avatar
Jupstar ✪ BOT 2022-01-17 16:38:24Z
is reply working already btw?
16:38
or still doing its own formatting
Avatar
doing its own formatting
16:40
it's bearable but non-native
Avatar
Jupstar ✪ BOT 2022-01-17 16:40:47Z
ok too bad. new lines also always were broken e.g. shift + enter new lines
Avatar
newlines look good now(?)
Avatar
Jupstar ✪ BOT 2022-01-17 16:41:26Z
i hope so xd
Avatar
Jupstar ✪ BOT 2022-01-17 16:53:40Z
@fokkonaut: are you running your server on a linux VPS btw?
16:56
as others suggested ASAN and UBSAN should really help you with stuff DDNet had alot of bugs found by them Maybe you can test your server or a 2nd one with less player count or something https://github.com/ddnet/ddnet#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck Its also relativly easy to use
16:56
or ask @Ryozuki to rewrite teeworlds in rust for you
16:57
then you get panics automatically when there is a bug in your code xd
Avatar
Avatar
Jupstar ✪
@fokkonaut: are you running your server on a linux VPS btw?
yes but locally i code on windows
Avatar
Avatar
Jupstar ✪
as others suggested ASAN and UBSAN should really help you with stuff DDNet had alot of bugs found by them Maybe you can test your server or a 2nd one with less player count or something https://github.com/ddnet/ddnet#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck Its also relativly easy to use
thanks, will look into it
17:02
@heinrich5991 is it wanted that in CCharacter::IsGrounded() the moverestrictionsbelow do not check for whether your are on a laserdoor?
Avatar
Avatar
Jupstar ✪
then you get panics automatically when there is a bug in your code xd
you cant have uninit stuff in safe rust so
17:21
unless there is a soundness bug in std or rustc itself u are safe
Avatar
Doesn't -Wall -Wextra complain about mem_zero ing non PODs?
Avatar
PODs reminds me of nier
17:22
pod = plain old data
17:22
stop spamming discord shit nobo
17:22
go away
Avatar
Avatar
fokkonaut
yes but locally i code on windows
so u can do an client with 3 dumies/add 3 dumies in ur client?
Avatar
Ah it was a static analyzer warning I remember, not compiler warnings
Avatar
Avatar
Nathan_
so u can do an client with 3 dumies/add 3 dumies in ur client?
no u
Avatar
Avatar
fokkonaut
no u
Its too hard for you? x)
Avatar
thats a lame bait
Avatar
nah i actually did something like that already xd
Avatar
Where?
Avatar
not public lul
Avatar
Oh nvm, it does exist in gcc nowadays -Wclass-memaccess
Avatar
Avatar
fokkonaut
not public lul
Send me
Avatar
So if you were compiling with warnings it should have caught that 😛
Avatar
Avatar
Learath2
Oh nvm, it does exist in gcc nowadays -Wclass-memaccess
-Wall means all warnings but in c++ stuff all means nothing
17:24
monkalaugh
17:24
-Wall -Wextra is ilogical isnt it
Avatar
There is also -Weverything that might actually be what one would think of when you say -Wall
Avatar
I guess they use -Wall as more of an "all stable diagnostics of highish quality"
Avatar
Jupstar ✪ BOT 2022-01-17 17:30:56Z
we need Wdocumentation to finally force correct doxygen xd
17:31
instead of that system.h crap thats completly useless as is xD
Avatar
why is the system.h crap useless?
Avatar
and its generated every day
Avatar
it describes the stuff that happens in the functions
Avatar
btw did we ever try running clang analyzer on the codebase?
Avatar
Avatar
heinrich5991
why is the system.h crap useless?
cuz its not conformant with doxygen
Avatar
@heinrich5991 it probably doesn't work well with newfangled ides
Avatar
that'd not be a reason for me to consider them crap
17:32
the only documented class
17:32
xd
Avatar
Get the client interface.
17:33
this is a documentation I would consider useless
17:33
that I can write without looking at the code, but only at the signature
Avatar
Jupstar ✪ BOT 2022-01-17 17:33:46Z
but it doesnt look cool
17:33
fixes the classic using ìnt i`twice
Avatar
Avatar
heinrich5991
this is a documentation I would consider useless
Avatar
Jupstar ✪ BOT 2022-01-17 17:33:47Z
is there a difference?
17:33
wshadow is nice
17:33
Edit: fixes the classic using ìnt i` twice
Avatar
Avatar
Ryozuki
Click to see attachment 🖼️
what about this?
17:34
imagine using int for enums
17:34
good c++ stuff
Avatar
at least it describes the parameter. but the documentation for the actual method is still worse than not being there IMO
Avatar
Jupstar ✪ BOT 2022-01-17 17:34:44Z
lmao, i always use strong language to describe stuff, dont take it too personal
Avatar
"Get the demo recorder interface"
17:35
that's what the type signature tells me already
Avatar
Good code documents itself ^^ 😄
Avatar
no, I don't think that always works
Avatar
thats a lie
Avatar
but documenting the stuff that is already in the code is worse than not documenting it IMO
Avatar
Avatar
heinrich5991
but documenting the stuff that is already in the code is worse than not documenting it IMO
i dont agree
Avatar
like the classical int x; // declare an int named x
Avatar
In other news I think I finally have all of your behaviours modelled in my head
Avatar
documenting it makes sure to the reader there are no quirks you have to know
17:36
thus its fine if its just get x interface
Avatar
I can tell how you'll react to any single piece of opinion I give you a priori 😄
Avatar
vs a function with no docs
17:36
u dont know
17:36
u waste time checking it
Avatar
I still don't know after the documentaiton
Avatar
u know if its properly documented
Avatar
the documentation looks like it was written wtihout looking at the code
Avatar
so I still need to check
Avatar
okayyyy
Avatar
Jupstar ✪ BOT 2022-01-17 17:37:44Z
good names are often better than endless documentation
Avatar
better document all the weird methods and I might get trust in the fact that the non-documented functions do what is said on the tin
Avatar
nobody will document anything so this convo is useless
17:38
im the only one who tried and i get shit for it
Avatar
Jupstar ✪ BOT 2022-01-17 17:38:16Z
xD
Avatar
Jupstar ✪ BOT 2022-01-17 17:38:28Z
life bio: i breath in, i breath out
Avatar
this argument is annoying
17:39
guess where we'd be if I hadn't started including test code?
Avatar
Avatar
heinrich5991
I still don't know after the documentaiton
this one too
Avatar
I could just throw up my hands in the air and say "no one will test anything, might as well not do it"
17:39
but no, I added some useful tests, and now deen added some nice db tests
Avatar
Avatar
heinrich5991
I could just throw up my hands in the air and say "no one will test anything, might as well not do it"
but nobody said ur tests are trash and useless
Avatar
and it makes the code better
17:40
I don't say that all of the documentation on the class is bad
17:40
I'm saying that I consider this specific method's documentation bad
Avatar
anyway im demotivated now someone else can do it, good stuff about open source
Avatar
why don't you want to allow this kind of feedback?
Avatar
cuz i dont consider it that bad
17:41
and ur argument doesnt seem good enough to me
Avatar
Jupstar ✪ BOT 2022-01-17 17:41:20Z
i am all in for a teeworlds specification
17:41
400 sites
17:41
like opengl and vulkan
Avatar
okay, so suppose I'd find a method where it has this kind of trivial documentation but weird behavior
17:41
would you agree that I still need to check the code?
17:42
(when I write these kind of hypothetical questions, I'm being honest and have not actually checked yet)
Avatar
if its properly documented it will mention the weird behaviour, otherwise u wouldnt even know its weird behaviour
17:42
unless ur experienced with the codebase beforehand
17:42
and docs are specially useful to new coders
Avatar
yes. I think the rust standard library has excellent documentation
17:42
and that's amazing
Avatar
why are u mentioning rust in this
Avatar
but it has little trivial one-liners that just say what the type on the functions says
17:43
because I needed an example
17:43
and I happen to know rust
17:43
I think that the idea of "any documentation is better than no documentation" is wrong
17:43
and even "any correct documentation is better than no documentation"
Avatar
Jupstar ✪ BOT 2022-01-17 17:46:49Z
so your argument is the documentation should stick to the core of what its doing
17:46
and not implementation details
17:47
sounds reasonable to me
Avatar
e.g.: "virtual void CComponent::OnMessage(int Msg, void *pRawMsg) Called when receiving a network message."
Avatar
Jupstar ✪ BOT 2022-01-17 17:47:20Z
if more complex, a few examples can help ofc :D
Avatar
this is a good comment. it tells me that it's a network message this method is talking about
17:47
that's not said in the actual name
Avatar
Jupstar ✪ BOT 2022-01-17 17:48:06Z
atleast we know its a network message, and not a custom client message xd
Avatar
it might be nice to tell me where I can look up what kind of types there are, and what pRawMsg is (a pointer to a struct corresponding to Msg)
17:48
but it's a reasonable comment, it tells me something that is not obvious from the name and type alone
Avatar
Jupstar ✪ BOT 2022-01-17 17:50:03Z
but would you not say the name of the function is at fault here (@heinrich5991)
this is a good comment. it tells me that it&#x27;s a network message this method is talking about
17:50
i think its just a bad design
17:50
why not call it OnNetworkMessage
Avatar
"virtual void CComponent::OnReset() Called to reset the component. This method is usually called on your component constructor to avoid code duplication." this is an example of a not so good comment. it starts by stating the obvious, but doesn't tell me what I'm allowed to do in the method and what not. when is it called? I think it was when you disconnect?
Avatar
the int also should be a enum
17:53
i get it i suck xd
Avatar
Jupstar ✪ BOT 2022-01-17 17:53:55Z
i always feel like documentation should explain behavior, but the name must be very intuitive when i call System(). i want good suggestions
17:54
and when i select one of the functions, it will probs show the documentation in the IDE
Avatar
why would you suck because I criticized some documentation of yours 😦
Avatar
Jupstar ✪ BOT 2022-01-17 17:54:30Z
bro, atleast we have a start (@Ryozuki)
i get it i suck xd
17:54
if everything has shitty documentation, other devs might still add documentation at all
Avatar
sorry its just me its hard for me to accept stuff sometimes
Avatar
Jupstar ✪ BOT 2022-01-17 17:55:04Z
bcs they see that everything has comments xD
Avatar
see why I suck: I got up extremely late today, missed an appointment and haven't even started doing something useful today
17:56
let me fix the last one ^^
Avatar
damn, sounds like both of you have little self esteem 😦
Avatar
I'm good 🙂
17:57
at least in regard of what I posted ^^
Avatar
Avatar
Chairn
damn, sounds like both of you have little self esteem 😦
this happens to me when around other devs
17:57
specially in this chat
17:57
im never sure to counter argument peoples stuff
17:58
specially technical stuff
Avatar
Jupstar ✪ BOT 2022-01-17 17:58:18Z
this is gernerally an issue with computer scientiest tbf
17:58
all always toxic about why their stuff is best
17:59
but its even more specific to c++
17:59
since c++ has so many hidden quirks
Avatar
Jupstar ✪ BOT 2022-01-17 17:59:28Z
xDD
Avatar
some ppl will always come to u with some standard page with this x stuff said
Avatar
Avatar
Jupstar ✪
all always toxic about why their stuff is best
that's not true (such general statements are usually false)
Avatar
Jupstar ✪ BOT 2022-01-17 17:59:56Z
the funny thing about c++ is, you can learn from the same documentation multiple times xD
17:59
bcs there is always something you didnt get
Avatar
I know plenty of nice people studying or having studied informatics
Avatar
Avatar
heinrich5991
that's not true (such general statements are usually false)
ironic 😄
Avatar
Jupstar ✪ BOT 2022-01-17 18:00:43Z
i have pretty bad experience from my university time tbh xD
18:00
i was more friend with the math ppl xD
Avatar
it's ironic that I disagree with "all computer scientists are toxic"?
18:02
is this some kind of sentence where no response is okay? ^^
Avatar
no, its ironic that you say 'general statements are usually false' which is also a general statement
Avatar
fun, I had this argument like 5 hours ago already
18:02
"general statements are usually false"
18:03
this doesn't say that all of them are
18:03
in fact it's not even a general statement, because of the "usually"
Avatar
Jupstar ✪ BOT 2022-01-17 18:03:42Z
well i never met a computer scientist that just enjoyed every line of code
18:04
not even java devs if you want to count them as computer scientists(shots fired)
Avatar
I have never met a X that just enjoyed every line of code
Avatar
-Wno-pedantic
Avatar
Avatar
heinrich5991
this doesn't say that all of them are
doesnt change the fact the statement remains general
Avatar
Avatar
Ryozuki
the int also should be a enum
Actually even better design would probably not have either an int or an enum that could possibly fall out of sync with the actual type of pRawMsg, but maybe a variant type (one might also argue for a template function with concepts there)
Avatar
@Learath2 rust enum variants pog
18:06
i have to research c++ concepts
18:06
again
Avatar
i think concept is such a bad name for this
18:07
a named constraint is better
Avatar
Hm, I'm okay with either name
Avatar
a concept is a trait bound in rust right?
Avatar
well cya in 2030 to actually see them used
18:10
monkalaugh
Avatar
I wrote some code with it and I like it quite a bit
18:11
It really helps cut through the SFINAE mess
18:11
That and the new template shorthand together work wonders
Avatar
Substitution failure is not an error (SFINAE)
Avatar
got an example @Learath2?
Avatar
Well not on this computer
18:18
But I have a Sendable constraint and a bool Send(Sendable auto s) { ... }
18:18
No template<> mess, No std::enable_if
Avatar
Jupstar ✪ BOT 2022-01-17 18:23:05Z
i used them to write a print function that uses variadic templates to allow printing with a , seperated list of strings/ integers etc., instead of formatting not always the best solution(e.g. localization) but nice to use if you just want to spam out text
18:26
i wish templates would be easier to use, the header, translation unit concept makes it too hard with c++ full template classes would be nice, but increase compile time too much xd
Avatar
Jupstar ✪ BOT 2022-01-17 18:33:44Z
@heinrich5991: if you implemented so much stuff already, why dont you rewrite teeworlds in rust?
18:36
man you really wrote everything, even the physics
Avatar
uU, did someone clean up chat?
Avatar
Jupstar ✪ BOT 2022-01-17 18:42:25Z
what chat
18:42
ingame?
Avatar
Avatar
Learath2
But I have a Sendable constraint and a bool Send(Sendable auto s) { ... }
oh thats nice
18:44
i thought u always needed template
18:44
that looks roughly like Send(s: impl Sendable) -> bool in rust (edited)
Avatar
Jupstar ✪: the whole of teeworlds/ddnet is huge. I don't think I even covered 10% of all features
Avatar
Jupstar ✪ BOT 2022-01-17 18:53:54Z
true ddnet is huge, teeworlds might be ok
18:54
the rewrite will probs cleanup alot of weird stuff
Avatar
that's the next thing, you can't cleanup physics stuff in ddnet, it has to be bug-for-bug compatible (edited)
Avatar
Jupstar ✪ BOT 2022-01-17 18:55:46Z
yeah, teeworlds might be the better start
18:56
i mean its really mostly about the core and the projectiles
18:56
the rest doesnt matter too much i guess
Avatar
tokei counts 168,000 lines of code for ddnet and 35,000 lines of code for libtw2
18:56
both excluding external libs
18:56
so maybe I got 10%
Avatar
Jupstar ✪ BOT 2022-01-17 18:56:55Z
but ddnet especially the client is giantic
Avatar
or just make a better game which just takes the ideas from ddrace, see what TsFreddie's company is doing for example
18:57
then you don't need to be bug compatible
Avatar
Jupstar ✪ BOT 2022-01-17 18:57:21Z
cant be better than tw physics
18:57
they are good bcs they are broken xd
18:57
especially the hook physics/movement is unmatched
18:58
gores is just unique, i dont feel like any game is similar, even tho its so basic code wise
18:58
most speedrunned games are console games, or something like geometry dash
Avatar
I think hedgewars also has people doing racemaps with their hook
Avatar
Jupstar ✪ BOT 2022-01-17 18:59:38Z
i never really played it
18:59
is it as action based, like real time movement
18:59
looks like worms to me xD
Avatar
it's generally not action based, it's worms
19:00
but the hook allows you to re-hook any number of times, and then suddenly the race mode is action-based 😄
19:00
just like teeworlds is pvp but ddnet isn't
Avatar
Jupstar ✪ BOT 2022-01-17 19:01:02Z
tru
19:01
but the funny thing is, when you are really good in understanding the movement of teeworlds, you are really good in ddrace and vanilla
19:01
ofc not the best directly
19:01
but still, its just a solid base somehow
19:07
atleast it feels like most speedruns for many games abuse stuff more teeworlds isnt glitchy in this sense
19:07
u need "pure" skill xd
19:07
but maybe thats just bcs im corneum doesn't have enough time to create so complex maps that you need to think more than play xD
19:07
modern ddrace is faster than old one I wonder if that came from the simple fact that the player base got better
19:07
in gores the skill level increased insanly too, main maps are hard maps from the past xD, pretty interesting
19:09
maybe due to the fact teeworlds has extremly tight mouse + keyboard movement, its just harder than most games in this specific combination mario maker insane maps for example are mostly impossible timings css surfing is relativly slow movement wise, but requires precision
19:10
i just wonder if its just being emotionally attached to the game, or if it actually offers something that makes it really unique
Avatar
Avatar
Jupstar ✪
i just wonder if its just being emotionally attached to the game, or if it actually offers something that makes it really unique
its unique specially due to coop imo
19:13
uncapped coop at it too
Avatar
Avatar
Chairn
uU, did someone clean up chat?
ok, seems like web interface is sometimes broken
Avatar
well the core of ddnet itself is unique
Avatar
Jupstar ✪ BOT 2022-01-17 19:14:45Z
yeah but i'd arguee that its more about the core of teeworlds
19:15
sure ddnet parts are often creative
19:15
but i especially enjoy when the part has flow
19:16
coop, yeah defs are huge bonus
19:16
tho solo maps are nice too
19:17
atleast i never found any action game i liked as much my second favorite game for example is divinity: original sins 2
19:17
which is a strategic turn based game
19:17
completly unrelated xd
Avatar
Avatar
Jupstar ✪
atleast i never found any action game i liked as much my second favorite game for example is divinity: original sins 2
i played it too and its rly gud
Avatar
is it possible to "link" the demos folder other than to the %appdata%? So lets say I save all my demos and stuff on another harddrive.. Can I still open them when I am in ddnet? Maybe there is a command somewhere to change the path ddnet is looking for demos?
Avatar
change the storage.cfg file
Avatar
i found it but
20:40
what do I have to write to still save the demos to the appdata folder. but also have access to demos on another harddrive?
Avatar
Reference article for the mklink command, which creates a directory or file symbolic or hard link.
Avatar
@becc those are all game-related messages that a teeworlds server and client can send
20:49
but there's also a proof-of-concept server in the repository
Avatar
i dont know any other way, but you gotta create a symlink from one directory to another
20:51
maybe there's a simpler way @heinrich5991 ?
Avatar
you can add a path that contains a demo folder after the three add_path lines @Shyzo
20:58
add_path D:\abc\def
20:58
if the demos are in D:\abc\def\demos\
Avatar
hmm. i tried it and somehow it did not work. let me check again
21:03
its not working. is it maybe because my folders contain a space? like "Good Folder"
21:03
@heinrich5991
Avatar
try quoting it
Avatar
not working :/
Avatar
can you show what you wrote and show that folder in the explorer?
21:17
can you show what the console shows when you start the client?
Avatar
tried it like this, and also "D:\Dicke Festplatte\nvme\Teeworlds Related\demos" and D:\DickeFestplatte\nvme\TeeworldsRelated\demos
21:19
and without " " at all too
Avatar
remove the "
21:20
and remove the \demos
Avatar
D:\Dicke Festplatte\nvme\Teeworlds Related\demos
21:20
let me try
21:20
D:\Dicke Festplatte\nvme\Teeworlds Related\ like this you mean?
21:20
because its not working :D
Avatar
yes, I mean that
Avatar
maybe he is only checking the first folder and not the additional path? because he already finds something in the first path. i mean because of this: "The search goes top down which means the first path has the highest priority."
Avatar
can you screenshot the console when starting the client?
Avatar
i would, but the console is not opening since ddnet 10.smth. can i enable it?
21:25
ok got it
Avatar
Try quote full path in cfg: "D:\xxx\yyy"
Avatar
no, quoting won't work here
21:27
wait maybe i fcked something up
Avatar
looks good actually
21:27
it says that it can't load some skins, so it apparently reads the directory there
Avatar
yes now it works. i have no idea what changed
21:28
the last 10 times it didnt work :D
21:28
maybe it was because I changed folder names from "Dicke Festplatte" to "DickeFestplatte"
21:28
no space
Avatar
theoretically sholdn't be the problem
Avatar
very strange
21:29
but alright, got it now :D thanks!!
Avatar
Many cmd tools need a backslash before each space if path is not a quoted string. So add_path would be followed by a single argument. It depends on the parser actually
Avatar
yes, but I looked at how the path is parsed
21:35
it just takes everything after the "add_path "
Avatar
Code by Robyt3 taken from Teeworlds, added SIGTERM

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:/...
Avatar
Thank @fokkonaut Revert two lines to original. Commit to be reverted: https://github.com/ddnet/ddnet/commit/2017464282aa55fc21c90229a5acc3376ce5ecac#diff-6ecdf8a78005b8c2541e54e3532ebec8f3f4ef2ec69ba8a6a281ce4421562570

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 possib...
Avatar
163666a Revert of 2017464282aa55fc21c90229a5acc3376ce5ecac - GiuCcc 0177f21 Merge #4613 - bors[bot]
23:51
f3b0a1e Add ClPredictionMargin - trml e7f13bc Only use configured prediction margin on servers with predictable/synced weapon input - trml 30093e4 Remove extra projectiles - trml b4a99fe Revert "Split CInput::NextFrame() from CInput::Update() (fixes #444)" - Robyt3 7987959 refactor mouse state handling - Robyt3 6675de3 do not copy keyboard over mouse state, refactoring - Robyt3 3557bea reduce indentation of input event handling code - Robyt3 bbc194c use info provided by sdl for mouse double clicks - oy e3b2069 end double mouse click state when doing a new single click. - oy c495d4b change type of MouseDoubleClick from int to bool - Robyt3 c214918 only consume double click if item hot - Robyt3 d54a799 Fix compiler warning with ffmpeg 5.0 - def- 48e5347 Merge #4581 #4590 #4593 #4607 - bors[bot]
Exported 498 message(s)