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-02-09 00:00:00Z and 2023-02-10 00:00:00Z
Avatar
Me: trying to learn opengl My brain: But it's 3:20 AM Also my brain: write this in #developer
Avatar
What's your project
Avatar
Avatar
Ryozuki
Click to see original message
Avatar
That's quite the bootylicious thumbnail. My eyes refuse to render the legs of that bug in your link preview
Avatar
i gotta look bootylicious up lol
Avatar
am I a pervert?
Avatar
oh i see
07:41
lel
07:41
i guess its hard to see the legs at first? id kxd
Avatar
Yep, after taking a few steps away from the monitor I can't unsee it
07:43
im a certified pervert
justatest 1
Avatar
ChillerDragon BOT 2023-02-09 08:47:51Z
xd
Avatar
Is dragger_beam the class that contains the logic for the shotgun? https://github.com/ddnet/ddnet/blob/master/src/game/server/entities/dragger_beam.cpp Edit: Ah no. Those are the turrets. The reasoning behind me wanting to look at the code is to explain Shotgunfly for the wiki. I assume the shotgun accelerates the tees' velocity. And if it doesn't have any, it pulls it to the direction the beam came from. Meaning the dummy bumping into the dragger and a well-timed shotgun shot from the dragger to the roof (so it hits the dragger right after the bump from the dummy) allows the dragger to stay in the air. (edited)
Avatar
the edits make it hard to read, maybe just send more messages :)
Avatar
maybe don't use better discord :)
09:42
jk
Avatar
I use the normal discord client
Avatar
yea but how would the edits make it unreadable
09:42
i thought you used the bd plugin that shows you all edits made (history) (edited)
Avatar
the way that the sg interacts with the tee is explained on the shotgun page, maybe you can have a look
Avatar
which indeed decreases readability
Avatar
nah its just that it gets reformatted and I have to seach for any changes in the text I already read
Avatar
yea I just appended to the end
09:44
so if you continue to read where you stopped, it continues normally
09:44
guess that is hard if the horizontal word position changes as well (which it shouldn't do?)
Avatar
Avatar
Patiga
the way that the sg interacts with the tee is explained on the shotgun page, maybe you can have a look
but that is a good suggestion
Avatar
ah it isn't described in as much detail as I thought, the last paragraph here is important https://wiki.ddnet.org/wiki/Shotgun#Advanced_Behaviour
Avatar
yea but isn't it the same
09:47
pulling you to the direction it came from -> getting you to its origin/reflection point (edited)
Avatar
there is a slight difference, which gets more important the close you are to the origin
Avatar
strength?
09:49
just a factor
09:49
doesn't change the definition
Avatar
that is the reason why you can gain speed while walking by shooting the sg to the bottom-right
Avatar
ah that
Avatar
the amount of speed that the sg gives you is constant, buf it the pull-direction points into a wall some of that momentum is lost of course
Avatar
would be easier to just read the code
09:51
but that stuff is coded nested af
Avatar
not sure how much it effects sg fly, it might make you slow done less depending on how you aim
09:52
i mean you can watch it in slowmotion
09:52
timestamp is set
Avatar
what do you want to figure out in the code?
Avatar
calculation of the pull
09:53
then I could put that into the sg page as well technically
09:53
but it is more important for the understanding (for myself) (edited)
Avatar
ah, I thought that the direction would be enough
09:54
the strength would also fit into the sg article, that would be nice :)
Avatar
nah key factor here is that the dummy bumps you (and the shotgun accelerates your velocity created by that bump, i want to know the formula for that acceleration) (edited)
👍 1
09:54
otherwise you can't stay with the shotgun in the air by yourself
Avatar
calculating how much speed the bump gives you will be hard to calculate
Avatar
that's not the goal
09:56
you couldn't calculate it because it won't be constant but I could at least then explain why it works based on facts (edited)
Avatar
sounds nice, good luck :)
Avatar
"good luck". I expected the dev here to help! xd
09:58
i don't know where to find the code for that
Avatar
well hard to help if you don't give questions, you seemed satisfied ^^
Avatar
based on the code I found it creates a negative explosion, questionmark. ah nevermind that is an OR. still grenade. still don't know where shotgun logic happens. (edited)
Avatar
Avatar
Patiga
well hard to help if you don't give questions, you seemed satisfied ^^
what's the formula the game or server uses to change the position of the tee shot by a shotgun beam
10:03
got it. prediction. entities. laser.cpp.
Avatar
ah, then you were faster than me, I also haven't seen or touched that part of the code yet
Avatar
yea see. it is pure acceleration. if(!g_Config.m_SvOldLaser) { if(m_PrevPos != HitPos) { Temp = pHit->Core()->m_Vel + normalize(m_PrevPos - HitPos) * Strength; pHit->Core()->m_Vel = ClampVel(pHit->m_MoveRestrictions, Temp); } else { pHit->Core()->m_Vel = StackedLaserShotgunBugSpeed; } } (edited)
Avatar
nice, as expected
Avatar
Original message was deleted or could not be loaded.
sorry for hijacking your question that could be solved using google. bump.
10:16
you'd think I would get banned for spamming
Avatar
Avatar
default
sorry for hijacking your question that could be solved using google. bump.
if you didnt know you can solve everything with internet
Avatar
yea but if you are too tired to ask google the proper questions, try out ChatGPT (edited)
10:17
but oh well, you said your country isn't supported
Avatar
oh wow
10:17
imagine crying about this and not helping
10:17
just ignore it then
Avatar
you picked it up as toxic
10:18
i just advertise that ai because it is hilariously useful
Avatar
why would people even ask here anything if everything can be solved with google and ai
Avatar
to ask questions like I did
10:19
because that stuff isn't documented anywhere but hidden in the code
Avatar
oh well, fuck me then
Avatar
wait I help you out
Avatar
next time i will ask before asking
Avatar
but I don't understand your question
Avatar
Avatar
MilkeeyCat
next time i will ask before asking
don't ask to ask
Avatar
I think you didn't pick up on @MilkeeyCat's sarcasm there
Avatar
but i wont know will it be a good enough question to ask here
Avatar
Avatar
Patiga
I think you didn't pick up on @MilkeeyCat's sarcasm there
if it was sarcasm he probably wouldn't have deleted the question
10:22
if it is sarcasm, I am impressed by your acting
Avatar
@MilkeeyCat I don't think there is any problem with your questions here. figuring stuff out on your own is also important ofc, but using the shortcut of a chat is very much okay when you feel like it
Avatar
Avatar
Patiga
@MilkeeyCat I don't think there is any problem with your questions here. figuring stuff out on your own is also important ofc, but using the shortcut of a chat is very much okay when you feel like it
bro i just even didnt know how to google it
Avatar
well then asking here is the best thing you can do :)
Avatar
Avatar
MilkeeyCat
bro i just even didnt know how to google it
i didn't understand your question either
10:23
you gave us an image
10:23
and a cryptic prompt (edited)
Avatar
anyways that was too bad question im so sorry, i will never happen again
Avatar
better be!
10:24
did you show us the whole table
Avatar
@default I assumed they deleted that message because you (probably accidentally) made them feel bad with "sorry for hijacking your question that could be solved using google"
Avatar
Avatar
default
did you show us the whole table
you had 4 rows of permission flags (4 columns) @MilkeeyCat (edited)
10:25
and you said you wanted only one row
10:25
how do we know which row you want
Avatar
just forget it dude i will google it
Avatar
that's what I didn't get
10:26
guess we will never know which row you wanted
Avatar
chillerdragon BOT 2023-02-09 10:33:09Z
Can someone explain how snap items work :) im trying to manually create a character snap item with no data (mem zerod) and then debug dump the snap to verify id and type are set correctly but i do not get the expected type back
10:33
CSnapshotBuilder Builder; Builder.Init(); const int ObjCharSize = 88; const int CharID = 0; void *pObj = Builder.NewItem(NETOBJTYPE_CHARACTER, CharID, ObjCharSize); mem_zero(pObj, ObjCharSize); CSnapshot SnapDestPlaceHolder; Builder.Finish(&SnapDestPlaceHolder); dbg_msg("snap_trans", "<<<<< DUMP START >>>>>>>>>>>>"); SnapDestPlaceHolder.DebugDump(); dbg_msg("snap_trans", "<<<<< DUMP END >>>>>>>>>>>>");
10:33
the id 0 worked and the mem zero on the data
10:33
but the type is 0
10:34
so i wondered where its looking up the type and printed a bunch of memory addresses and it seems to lookup the type in the data memory
10:35
in NewItem i printed the items memory address when its being added 2023-02-09 11:31:00 I new_item: pObj=0x7ffcddb38410 set type and id to (9 << 16) | 0 == 589824
10:35
in the CSnapshotItem::ID() getter i printed where its looking up the id [item] &m_TypeAndID = 0x7ffcddb38414
10:36
the way i understand this is that the actual item starts at 0x7ffcddb38410 and in the first 4 bytes m_TypeAndID is located. But later when dumping the items and asking for its id it somehow seems to look at 0x7ffcddb38414 which is 4 bytes off
10:37
what did i not understand?
Avatar
How do u type as a bot?
Avatar
ChillerDragon BOT 2023-02-09 10:41:08Z
yea nvm i mean type and id share the 4 bytes so id doesnt work either i tested with another id than 0
10:41
not that it makes much more sense now
Avatar
chillerdragon BOT 2023-02-09 10:43:51Z
protocol7::CNetObj_Character Char; mem_zero(&Char, ObjCharSize); Char.m_X = 1; Char.m_Y = 1; mem_copy(pObj, &Char, ObjCharSize);setting data works wonderfully
10:44
oh wait now it set type and id too?! xd
10:44
wait is the mem zero bad?
10:45
sorry for rubber ducking on a whole channel
10:45
ok this worksmem_zero(&Char, ObjCharSize); mem_copy(pObj, &Char, ObjCharSize);where this also zeros the type and id?mem_zero(pObj, ObjCharSize);
10:47
oh but this also works? xd mem_zero(&Char, ObjCharSize); mem_copy(pObj, &Char, ObjCharSize); mem_zero(pObj, ObjCharSize);ub?
Avatar
Wtf u even doin
10:55
Use Char = {} That initializes it
10:55
Copying structs works with normal assignment
10:56
Just cast your type if the implementation gives u the size of the struct as memory anyway
Avatar
chillerdragon BOT 2023-02-09 11:00:53Z
fixed it with asan :) CSnapshotBuilder Builder; Builder.Init(); const int ObjCharSize = 88; const int CharID = 22; void *pObj = Builder.NewItem(NETOBJTYPE_CHARACTER, CharID, ObjCharSize); mem_zero(pObj, ObjCharSize); unsigned char aTmpBuffer3[CSnapshot::MAX_SIZE]; CSnapshot *pTmpBuffer3 = (CSnapshot *)aTmpBuffer3; Builder.Finish(pTmpBuffer3); dbg_msg("snap_trans", "<<<<< DUMP START >>>>>>>>>>>>"); pTmpBuffer3->DebugDump(); dbg_msg("snap_trans", "<<<<< DUMP END >>>>>>>>>>>>");seems like the builder doesnt like writing into some simple CSnapshot on the stack
11:01
still no idea what im doing
Avatar
I hope u don't work on 0.7 stuff
Avatar
ChillerDragon BOT 2023-02-09 11:03:31Z
i do
Avatar
Shit
Avatar
ChillerDragon BOT 2023-02-09 11:04:09Z
i would prefer not to but nobodi else doin it ._.
Avatar
Before u use 0.7 way of doing whatever. Make it better
Avatar
ChillerDragon BOT 2023-02-09 11:04:49Z
?
11:04
make what better
Avatar
What are u working on
Avatar
ChillerDragon BOT 2023-02-09 11:05:12Z
translating snap items
Avatar
Make a better system
Avatar
ChillerDragon BOT 2023-02-09 11:05:24Z
??
Avatar
There is no value in this
Avatar
ChillerDragon BOT 2023-02-09 11:05:45Z
in what
Avatar
Adding more 0.7 bloat
Avatar
ChillerDragon BOT 2023-02-09 11:06:12Z
the value is being able to join 0.7 servers with ddnet client
Avatar
Sounds completely useless
11:06
And bloat
Avatar
ChillerDragon BOT 2023-02-09 11:06:35Z
does not sound useless to me
Avatar
Then please don't pr it to ddnet
Avatar
ChillerDragon BOT 2023-02-09 11:06:58Z
and as suggested by lerato and heinrich i try to keep the bloat minimal by keeping most 0.6 code untouched
11:07
thats the whole point
Avatar
It's a regression to have 0.7 dependencies
Avatar
ChillerDragon BOT 2023-02-09 11:07:14Z
if you want to make it cleaner than me pls go ahead
11:07
because of two protocols?
Avatar
Better work on next gen networking packet stuff
Avatar
ChillerDragon BOT 2023-02-09 11:07:49Z
sounds useless to me
Avatar
Avatar
ChillerDragon
because of two protocols?
Firstly that and secondly because it basically has the same problems as 0.6
11:08
It fixed 2-3 issues that's it
11:08
No value
Avatar
ChillerDragon BOT 2023-02-09 11:08:45Z
the value is compability
Avatar
Vanilla is also dead
11:08
Compatibility to what?
Avatar
ChillerDragon BOT 2023-02-09 11:09:02Z
to teeworlds
Avatar
To windows 1995?
Avatar
ChillerDragon BOT 2023-02-09 11:09:17Z
windows 1995 is 0.6
11:09
:p
Avatar
Teeworlds is dead bro
11:09
Oy is afk since one year
11:09
He wasn't convinced dropping maintenance
Avatar
ChillerDragon BOT 2023-02-09 11:09:53Z
makes it even more sad ddnet cant catch up with it
Avatar
He clearly is not interested in tw survival
Avatar
ChillerDragon BOT 2023-02-09 11:10:05Z
he is not
11:10
he publicly stated that
Avatar
See. So let this die. It hurts my feelings
11:10
That an evil person like Oy exists
👍 1
Avatar
ChillerDragon BOT 2023-02-09 11:10:52Z
im not doing it for oy
11:10
im doing it for my self
Avatar
U are a necromancer
Avatar
ChillerDragon BOT 2023-02-09 11:12:04Z
The practice of supposedly communicating with the spirits of the dead in order to predict the future.
11:14
i wonder how people wrote c/c++ code without ubsan/asan its literally impossible to debug and none of the things make sense
11:15
insert ryo rust comment here
Avatar
debug using brain > ubsan/asan
Avatar
ChillerDragon BOT 2023-02-09 11:15:24Z
ok mr brain
Avatar
ChillerDragon BOT 2023-02-09 11:16:26Z
🧠
Avatar
U could say the same about logic errors. You can break down the bug until u find the reason
Avatar
Also in cpp stop using stuff like mem zero. U really rarely need it
11:17
Maybe if u want to fill a buffer of data or smth
Avatar
insert angry noby here
Avatar
Noby is next level coder
11:18
He is allowed
Avatar
ChillerDragon BOT 2023-02-09 11:18:13Z
how do you break down things if it breaks in random places :D
Avatar
he's just allowed cuz his brain has all the synapses to comprehend what he is writing there
11:18
wonder where they all come from 🥦
Avatar
In single threaded programs it should not be"random"
11:19
But since u work on network related stuff. Maybe print the packets, when they arrive and what it current state was
Avatar
ChillerDragon BOT 2023-02-09 11:20:00Z
oh trust me i did
Avatar
what exactly is breaking
Avatar
Then u see which state was updated and get a feeling for the program flow
Avatar
ChillerDragon BOT 2023-02-09 11:20:14Z
show me any binary dump and i see tee positions
11:21
notin is breaking rn suprisigly cuz asan catched all random bugs
Avatar
slaps chillerdragon
Avatar
ChillerDragon BOT 2023-02-09 11:21:15Z
but they were in such unexpected places in code i wrote like months ago
11:21
u
Avatar
question
Avatar
ChillerDragon BOT 2023-02-09 11:21:41Z
wot
Avatar
how can asan catch random bugs if it runs on a computer which doesnt know about randomness
11:21
🧌
11:22
troll
Avatar
ChillerDragon BOT 2023-02-09 11:22:03Z
it detects randomness using blockchain and AI
Avatar
discord troll
11:22
blockchain? where is eirk
11:22
erik
Avatar
ChillerDragon BOT 2023-02-09 11:22:26Z
xd
Avatar
chiller btw ddnet++ gametype is DDraceNetwork not DDNet++
Avatar
ChillerDragon BOT 2023-02-09 11:23:23Z
yea
Avatar
just that one guy hosting ddpp fixed it i believe
Avatar
ChillerDragon BOT 2023-02-09 11:23:35Z
yea
Avatar
ChillerDragon BOT 2023-02-09 11:23:40Z
after i told him how :D
Avatar
rofl
Avatar
ChillerDragon BOT 2023-02-09 11:23:53Z
i dont remeber why i didnt change it
11:23
i think because it doesnt cut off well
Avatar
lazyness
11:24
better than DDraceNetwork
Avatar
ChillerDragon BOT 2023-02-09 11:24:07Z
iirc it becomes ddnet+
11:24
and F-DDrace becomes F-DDrac
Avatar
ChillerDragon BOT 2023-02-09 11:24:19Z
could name it DDraceNetwork++
Avatar
we should really make the gametype field a little bigger
11:24
1 character :troll-1:
11:24
troll
Avatar
ChillerDragon BOT 2023-02-09 11:24:50Z
lul
Avatar
ok 2
11:25
I hate Java
Avatar
ChillerDragon BOT 2023-02-09 11:25:27Z
xXxiDDRace128++xXx
Avatar
C++ so much better
11:25
omg
11:25
u forgot the underscores between the x's and text
Avatar
ChillerDragon BOT 2023-02-09 11:26:00Z
sori
Avatar
ChillerDragon BOT 2023-02-09 11:26:08Z
uwu
Avatar
ChillerDragon BOT 2023-02-09 11:26:12Z
ok i go bak to snaps
Avatar
snapchat user
Avatar
ChillerDragon BOT 2023-02-09 11:33:51Z
@heinrich5991 okay given a 0.7 CSnapshot i should be able to generate a new 0.6 CSnapshot not sure tho where to store it and who allocates memory for it and who frees it the whole snapshot storage prev/current/alt is not making much sense to me
Avatar
the snapshots are not changed
11:34
Just the data gets sorted in 0.7
Avatar
ChillerDragon BOT 2023-02-09 11:34:47Z
yea that much i got
11:35
you mean not changed by the client after receive right?
11:35
but on receive they are stored in some CHolder
Avatar
No, there is no difference
Avatar
ChillerDragon BOT 2023-02-09 11:35:27Z
and then freed in the Purge
Avatar
The altsnap is the one the client uses
Avatar
ChillerDragon BOT 2023-02-09 11:37:30Z
i was thinking about adding a new CSnapshot *m_pTransSnap here that holds the snap that was translated from 0.7 to 0.6 https://github.com/ddnet/ddnet/blob/911bd0e69a8fee9b02f0cea26d50ecc2f000bc3c/src/engine/shared/snapshot.h#L123
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
cant you put the translated data into the altsnap and use it like that
11:38
I wouldnt put extra stuff in it, just translate everything on the layer before
Avatar
ChillerDragon BOT 2023-02-09 11:38:35Z
yea maybe but then i still do not know how to manage memory allocation
11:39
but keeping the raw 0.7 snap is nice for diffing new deltas
Avatar
the server also doesnt keep the untranslated 0.7 packets.
Avatar
ChillerDragon BOT 2023-02-09 11:39:36Z
the server also doesnt have to unpack snaps ._.
Avatar
Avatar
ChillerDragon
but keeping the raw 0.7 snap is nice for diffing new deltas
shouldnt be a problem
11:40
if you always translate everything u should get a diff aswell
Avatar
ChillerDragon BOT 2023-02-09 11:41:47Z
yea thats what i thought too in the beginning but i like heinrichs idea better now of going over a full snap and translating it
11:42
seems less intrusive
Avatar
true
Avatar
Avatar
Jupstar ✪
What's your project
Just trying to learn opengl to help develop deeworlds https://github.com/gotroyb127/deeworlds
teeworlds-like 3D game. Contribute to gotroyb127/deeworlds development by creating an account on GitHub.
Avatar
ChillerDragon BOT 2023-02-09 12:25:41Z
okay i think i got the memory stuff worked out at least asan is not bitching
12:25
first proof of concept of a full snap translation
12:26
this was recorded with a ddnet client on a 0.7 server
12:26
all translation of the character snap item happens in snapshot.cpp the gameclient.cpp is untouched and thinks its on a 0.6 server
Avatar
Avatar
Mr.Gh0s7
Just trying to learn opengl to help develop deeworlds https://github.com/gotroyb127/deeworlds
Epic
Avatar
Avatar
Jupstar ✪
Epic
it's only zogtib's work atm but he's occupied with making a text editor kek. Previously he was occupied with implementing a build system kek. In the future he might be occupied with something else kek (edited)
12:42
It is under development so don't expect anything yet. kek more like It's not
Avatar
Educational project
13:04
does this remove bors need?
Avatar
F-DDrac
Avatar
ddrac
Avatar
Avatar
Ryozuki
does this remove bors need?
I would say so. I never understood why bors needed to be a separate tool, that is basic functionality
Avatar
bors secretly on the internal github repo bors r-
Avatar
thanks for your contribution
Avatar
hi what speed should internet be for ddnet server
Avatar
~50kbps
19:53
should be enough xd
19:53
if u have problems, then its most probably your ping is unstable
19:53
and not the internet speed
Avatar
40kbps per player approximately
Exported 293 message(s)