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 2023-03-28 00:00:00Z and 2023-03-29 00:00:00Z
Avatar
though I do have that other tool that already takes screenshots of maps without a window, using that same method would give you exactly that
00:00
its definitely a thing I keep in mind :)
Avatar
Avatar
Learath2
the person who kills will have the lowest entity id iirc
But there's a segment in KillTeam(int Team, int NewStrongID, int ExceptID) that purposefully uses the NewStrongID/ExceptID to ignore the person who killed first
Avatar
The person who hits kill first is already killed, so when killing team we need to ignore the already killed person
00:14
And that person ends up with the lowest entity id, since they killed before the team
Avatar
Hence, Die(int Killer, int Weapon, bool SendKillMsg) (edited)
00:21
I'm confused at what you guys are confused at <:(
Avatar
sorry
00:21
I'm not investing the right amount of time to criticize the PR properly, I think that's why I'm being so vague :/
Avatar
It's my fault.. I should be more patient
Avatar
Avatar
Voxel
I'm confused at what you guys are confused at <:(
I'm just confused why you have this bool when you can get team state inside CCharacter::Die
Avatar
anyway, what's currently a bit weird (I don't have a good solution to this) is that the Character::Die function basically implements the team logic for whether to send a team kill message or just a kill message
Avatar
Avatar
Ravie
I'm just confused why you have this bool when you can get team state inside CCharacter::Die
c++ void CGameTeams::KillTeam(int Team, int NewStrongID, int ExceptID) { for(int i = 0; i < MAX_CLIENTS; i++) { if(m_Core.Team(i) == Team && GameServer()->m_apPlayers[i]) { GameServer()->m_apPlayers[i]->m_VotedForPractice = false; if(i != ExceptID) { GameServer()->m_apPlayers[i]->KillCharacter(WEAPON_SELF, false); // <<< this line of code is connected with the tees dying, and if i don't have the bool then what's the point in squashing it all if(NewStrongID != -1 && i != NewStrongID) { GameServer()->m_apPlayers[i]->Respawn(true); // spawn the rest of team with weak hook on the killer } } } } } (edited)
00:26
The false in KillCharacter tells the code if to send the message or not
00:26
And if all the tees send the message and it's squashed it's very repetitive
Avatar
Avatar
heinrich5991
anyway, what's currently a bit weird (I don't have a good solution to this) is that the Character::Die function basically implements the team logic for whether to send a team kill message or just a kill message
I mean, that's the thing. When a tee dies, it doesn't even touch up on any team related code. It sends the kill message before anything else
Avatar
as said I don't have a good solution to it
00:29
but it could be moved out of this function entirely
00:29
e.g. making CTeams send the kill message
00:29
but don't implement that now, I don't see why this is a good solution right now
Avatar
Avatar
Voxel
The false in KillCharacter tells the code if to send the message or not
I know but you can decide this INSIDE CCharacter::Die, you have access to team stuff there
Avatar
okay i think i know what you guys are talking about
00:32
yeah i'll wait until fokko verifies this until I do it
Avatar
but I also agree with heinrich that team logic inside Die function is kinda unclean
Avatar

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 (especially base/) or added coverage to integration test
  • [ ] 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-ad...
Avatar
d0d3325 Update Korean translations by CHaBek - cwh7435 98a5c4e Merge #6475 - bors[bot]
Avatar
Avatar
Ravie
I know but you can decide this INSIDE CCharacter::Die, you have access to team stuff there
I wouldnt do it there
Avatar
chillerdragon BOT 2023-03-28 06:38:31Z
Nice stuff !!! (@Patiga)
06:38
Im hyped
Avatar
Avatar
Patiga
@Jupstar ✪ I finally actually started on the tee rendering ^^
looks funny with eyes only
Avatar
378d395 Update translation status - def-
Avatar
hm I just implemented interpolation for the rendering. on the stronghold (also cutted) demo, there are still the stutters as in the video above, but on the new demo I'm trying everything is perfectly smooth thonk
Avatar
Avatar
GitHub
Click to see attachment 🖼️
ah that caused it xD i already saw it on kog and thought its some weird new feature
Avatar
Avatar
Patiga
hm I just implemented interpolation for the rendering. on the stronghold (also cutted) demo, there are still the stutters as in the video above, but on the new demo I'm trying everything is perfectly smooth thonk
and in ddnet client?
Avatar
maybe now its more random
Avatar
Avatar
Jupstar ✪
and in ddnet client?
smooth
Avatar
Avatar
Ryozuki
maybe now its more random
it was bigger radius xd
12:49
randomly bigger radius ez
Avatar
Avatar
Patiga
smooth
mhh weird
Avatar
I simply just take the characters out of the snapshot and read the x, y and angle of the contained charactercore
12:51
ah
Avatar
i'd start with printing all variables involved and see if its not an interpolation bug
Avatar
got it, there are some snapshot parsing issues
Avatar
ah 😄
Avatar
for some reason I had logging turned off
12:52
interesting that this causes a difference tho
12:53
since obv part of the parsing still works fine, super weird
12:53
were the character snap objects variable sized at some point o.o
12:54
(wild guess)
Avatar
don't think so
Avatar
@heinrich5991 u might be interested
13:35
This PR implements the experimental Tree Borrows (TB) rules for tracking reference aliasing, as an optional alternative to Stacked Borrows (SB). SB and TB are mutually exclusive. Using -Zmiri-tree-...
Avatar
I don't understand it ^^
13:37
ah
Avatar
metzgerlim_o_O BOT 2023-03-28 13:38:01Z
damn scholar slang
Avatar
it's some runtime checker for borrowing rules
Avatar
for miri
Avatar
Avatar
GitHub
Click to see attachment 🖼️
I can fix on the weekend or someone else can if they find jt. Seems like I did a math error when calculating m_Vel even though I checked at least 3 times. Previously it was a random value between 0.1f and 1.1f, now it's a random value between 1.0f and 1.1f.
Avatar
is there a list of all attributes that can be changed via console?
Avatar
Avatar
Simon
is there a list of all attributes that can be changed via console?
Avatar
wtf i like the new death particles
Avatar
What's int To?
Avatar
It smells like your GameServer() is bad, no idea how you added your new class but have you initialized your gamecontext pointer properly?
Avatar
Are you sure GameServer() is valid?
Avatar
Did you initialize m_pGameServer properly?
15:59
e.g. in the constructor of your class or an init function
Avatar
Btw whats better design, constructor or init function? Or is it just used when its preferred in each situation?
Avatar
Avatar
fokkonaut
Btw whats better design, constructor or init function? Or is it just used when its preferred in each situation?
We don't really have a convention for it, but if it can fail it needs to be in an init function since we don't use exceptions
Avatar
Original message was deleted or could not be loaded.
Ofc not, 0x0 is a null pointer constant. You need a pointer to the working instance of CGameContext
Avatar
Avatar
Learath2
Ofc not, 0x0 is a null pointer constant. You need a pointer to the working instance of CGameContext
kek
16:04
try 0xbeef (joke)
Avatar
0xDEADBEEF
16:05
0xBAADFOOD
16:06
or my favourite 0xBAAAAAAD
16:12
Yes, and when calling your constructor make sure you are calling it from somewhere where you have access to a valid game context pointer
Avatar
Original message was deleted or could not be loaded.
oh actually the signature should be CMyClass::CMyClass(CGameContext *pGameServer)
16:13
You can't just name constructors whatever you want, and you can
16:14
and you don't want to pass CGameContext by value, you want a pointer to it
Avatar
are you inhereting cgamecontext?
Avatar
Original message was deleted or could not be loaded.
huh, you don't need to create new instance of gameserver, just pass it on CGameContext::OnInit(...)
17:12
i don't remember which class has this thing but search up for init
17:12
ah wait im wrong again
Avatar
Original message was deleted or could not be loaded.
normally no
Avatar
today i started implementing a tagged union in llvm (like rust enum) and remembered that llvm is moving from pointers with types to opaque pointers
17:49
well it already moved on
17:49
LLVM IR pointers can be cast back and forth between pointers with different pointee types. The pointee type does not necessarily represent the actual underlying type in memory. In other words, the pointee type carries no real semantics.
>
Historically LLVM was some sort of type-safe subset of C. Having pointee types provided an extra layer of checks to make sure that the Clang frontend matched its frontend values/operations with the corresponding LLVM IR. However, as other languages like C++ adopted LLVM, the community realized that pointee types were more of a hindrance for LLVM development and that the extra type checking with some frontends wasn’t worth it.
Avatar
Original message was deleted or could not be loaded.
As I said, don't pass CGameContext by value
18:08
This is why I recommend learning C++ properly before trying to do things, it's much more pleasant when you don't have to blindly hammer on things until they work
Avatar
!multiple_selection When loading a lot of already loaded pictures all warnings are shown and you have to click them away one by one. This is definitely not ideal. One option to solve this would be to only show one warning. The other would be to show a list of warnings, but I'm not sure how hard that is to implement.

Checklist

  • [x] Tested the change ingame
  • [x] Provided scr...
Avatar
Avatar
Learath2
This is why I recommend learning C++ properly before trying to do things, it's much more pleasant when you don't have to blindly hammer on things until they work
well you learn by doing things, that's kind of a paradox to expect of someone
Avatar
Avatar
Ewan
well you learn by doing things, that's kind of a paradox to expect of someone
You learn by doing specific things targeted at learning. Not everything you might want to do works well as learning material
Avatar
Original message was deleted or could not be loaded.
That part looks correct, how did you declare it in the header?
Avatar
most folks on the internet who code would not be where they are without screwing around with codebases that are way out of their league
Avatar
Avatar
Ewan
most folks on the internet who code would not be where they are without screwing around with codebases that are way out of their league
So did I and I butted my head against random things until I picked up a book and learned the language. You learn 10 times quicker from proper material
Avatar
as is the case with me but you will never keep interest in the material without having some background with it
18:36
you have to struggle to succeed
Avatar
Original message was deleted or could not be loaded.
This looks like it has the correct signature too, so that leaves the place you call the constructor. I'm guessing you are trying to construct a new CGameContext tgere
18:36
there*
Avatar
Avatar
Ewan
you have to struggle to succeed
Eh, I find that certain kinds of struggle is just not useful, but to each their own I guess. I would never learn a language that way again if I can help it, that's all I know for sure
Avatar
if it was your first language, you don't have to
18:39
though yeah there are very unproductive forms of struggle that beginners go through
18:39
that they can definitely be made aware of to avoid
Avatar
Original message was deleted or could not be loaded.
please post the full code so we can better help you
Avatar
Avatar
Ewan
that they can definitely be made aware of to avoid
but this is not it. he's asking for help and trying to do things the right way
Avatar
making things that don't work helps you actually understand how things work rather than reading all the theory and just "doing things how it should be"
Avatar
Avatar
Ravie
making things that don't work helps you actually understand how things work rather than reading all the theory and just "doing things how it should be"
in code and informatics yes, don't try that with chemistry 😄
Avatar
Avatar
Ravie
making things that don't work helps you actually understand how things work rather than reading all the theory and just "doing things how it should be"
If it doesn't work due to a failure in your problem solving, yes. If it doesn't work due to you just not understanding how a class and it's instance differ I honestly don't think looking at it over and over will help much
Avatar
hmmm, pseudocode is just the high level view, doesn't say a lot about c++ implementation
Avatar
Avatar
Ravie
making things that don't work helps you actually understand how things work rather than reading all the theory and just "doing things how it should be"
Also why good teaching never consists of "read all theory before doing anything", you are supposed to get bite sized pieces of theory, then doing exercises directed at digesting that information
Avatar
especially if you're a newcomer to coding
Avatar
Original message was deleted or could not be loaded.
Uhm, maybe paste it to somewhere like codepad or pastebin?
18:45
broke my keyboard lmao
Avatar
if ur asking every 10 mins about a problem here, its better u learn some actual tutorial
18:45
cuz at this point u using the ppl time here as a tutorial
Avatar
Well I don't mind it tbf. I only wanted to say that there is a better way that'll cut the pain short 😄
Avatar
Avatar
Learath2
Also why good teaching never consists of "read all theory before doing anything", you are supposed to get bite sized pieces of theory, then doing exercises directed at digesting that information
doing exercises is just as much of a waste of time as figuring things out on your own but way less fun
Avatar
Hard disagree on the waste of time part. Agree on the less fun part (though well made exercises can actually be fun)
18:51
The whole idea of exercises is that they are targeted. You learn some theory, you soludify the knowledge in an exercise within 30 minutes. You can spend 8 hours trying to code something fun and not learn anything new
Avatar
i think u see exercises with too much "school" point of view, there are things i consider exercises that are way more fun
18:51
like nand to tetris
Avatar
at least for me personally it's much better to understand things in my own ways rather than being fed some information and methods, and I learn fast so I guess there is something to it
Avatar
Original message was deleted or could not be loaded.
Missing the interesting part where you construct the class
Avatar
is ur source code closed?
18:53
well in that case i wont help, not that i was doing before anyway
18:54
whats stopping u from uploading to git
Avatar
Avatar
Ravie
at least for me personally it's much better to understand things in my own ways rather than being fed some information and methods, and I learn fast so I guess there is something to it
An experienced programmer learning their 6th language is very different to someone learning their first
Avatar
6th? weak numbers
Avatar
Avatar
Ryozuki
6th? weak numbers
ryo with 53 known languages and 7 upcoming
Avatar
and my own
18:55
edlang
Avatar
Original message was deleted or could not be loaded.
Yeah maybe it's best you put all of it up on github, it's ve easier
18:55
It'd be*
Avatar
yeah 7 was about your own languages
18:56
nvm
18:56
actually i can add llvm-ir to the list of languages i gguess
Avatar
ryozoozkis getting pro
Avatar
its a language itself
18:56
imagine programming in it tho
18:56
SSA pain
18:56
In compiler design, static single assignment form (often abbreviated as SSA form or simply SSA) is a property of an intermediate representation (IR) that requires each variable to be assigned exactly once and defined before it is used. Existing variables in the original IR are split into versions, new variables typically indicated by the origina...
18:56
@Jupstar ✪ program in ssa form
Avatar
Avatar
Learath2
An experienced programmer learning their 6th language is very different to someone learning their first
well an experienced programmer is learning the syntax more than programming
Avatar
super saiyan all
Avatar
Avatar
Ravie
well an experienced programmer is learning the syntax more than programming
fake
Avatar
u learn about lifetimes in rust
18:58
well obviously if u dont learn a boring language like java
18:58
i had a dejavu rn
Avatar
Avatar
Jupstar ✪
do u need to use it?
its the industry standard for IR to be in SSA form
18:58
it allows for lot of optimizations
Avatar
Phi function time
Avatar
Compiler optimization algorithms that are either enabled or strongly enhanced by the use of SSA include: Constant propagation – conversion of computations from runtime to compile time, e.g. treat the instruction a=3*4+5; as if it were a=17; Value range propagation[6] – precompute the potential ranges a calculation could be, allowing for the creation of branch predictions in advance Sparse conditional constant propagation – range-check some values, allowing tests to predict the most likely branch Dead-code elimination – remove code that will have no effect on the results Global value numbering – replace duplicate calculations producing the same result Partial-redundancy elimination – removing duplicate calculations previously performed in some branches of the program Strength reduction – replacing expensive operations by less expensive but equivalent ones, e.g. replace integer multiply or divide by powers of 2 with the potentially less expensive shift left (for multiply) or shift right (for divide). Register allocation – optimize how the limited number of machine registers may be used for calculations
18:59
for example
Avatar
Avatar
Learath2
Phi function time
magick
Avatar
Avatar
Ryozuki
u learn about lifetimes in rust
you discover your inner self and achieve nirvana in rust
Avatar
@Jupstar ✪ llvm is perfection, it has an infinite number of registers kek
Avatar
Avatar
Ravie
you discover your inner self and achieve nirvana in rust
yes
19:02
@Jupstar ✪ > SPIR-V, the shading language standard for the Vulkan graphics API and kernel language for OpenCL compute API, is an SSA representation
19:02
The LLVM Compiler Infrastructure uses SSA form for all scalar register values (everything except memory) in its primary code representation. SSA form is only eliminated once register allocation occurs, late in the compile process (often at link time).
Avatar
fixes this

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 (especially base/) or added coverage to integration test
  • [ ] Considered possible null pointers and out of bounds array...
Avatar
Avatar
Ravie
well an experienced programmer is learning the syntax more than programming
really depends. when you learn a language that is similar to one you already know, like e.g. moving from java to C#, yes
20:01
but if the new language is from an entirely new paradigm, then no, it's not just learning syntax
20:01
even C/C++ to rust isn't "just learning syntax"
Avatar
@heinrich5991 true but you still have way less to learn than starting from 0
Avatar
a new post from one of the best bloggers https://ciechanow.ski/bicycle/
Interactive article explaining the physics of a bicycle.
Avatar
ffe3d26 fix start size of freezing flakes particles & vel of player death - Jupeyy 66df293 Merge #6478 - bors[bot]
Avatar
very extensive wow
Exported 180 message(s)