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-05-11 00:00:00Z and 2022-05-12 00:00:00Z
Avatar
I like the new HUD. I sometimes did parts harder, because I forgot I have endless jump. Is there also an indicator for strong / week hook? That's depending on every tee right?, so migh not be suitable for hud (edited)
Avatar
might be cool to have an indicator pop up while you're hooking someone
02:09
so that it only shows then and not all the time
Avatar
Avatar
cauldron
I like the new HUD. I sometimes did parts harder, because I forgot I have endless jump. Is there also an indicator for strong / week hook? That's depending on every tee right?, so migh not be suitable for hud (edited)
ᶰ°Konͧsti 2022-05-11 04:19:46Z
There is, Forgot the command but search in f1 for something with nameplates strong
💡 1
06:50
@Learath2
06:50
TOOBASED
Avatar
[quakenet] ChillerDragon BOT 2022-05-11 06:57:40Z
@Jupstar ✪ pls fix #5086 mac build
06:57
omg ddnet bot where
06:57
fixes #4785 @ChillerDragon test pls, bcs i cannot reprod Checklist Tested the change ingame Provided screenshots if it is a visual change Tested in combination with possibly related configurati...
Avatar
[quakenet] ChillerDragon BOT 2022-05-11 09:07:40Z
What happend to server chat messages? I saw some weird commit about it
09:08
I assume "chatresp" is a magic string
09:08
Fixes #5052. The problem seems to be that there are two different concepts tangled up in console/logging. One is actual logging as in other programs. The other is "responses to the user o...
09:08
ah yea
09:08
hrmpf
Avatar
Avatar
cauldron
I like the new HUD. I sometimes did parts harder, because I forgot I have endless jump. Is there also an indicator for strong / week hook? That's depending on every tee right?, so migh not be suitable for hud (edited)
you mean a new strong week indicator, in addition to the old one that already exists above the tees head?
Avatar
ImJustAskingDude 2022-05-11 09:25:52Z
lovely devs, can you please tell me what happened to the ddnet client over the last like 2 months, I have gone from being able to connect to any ddnet server and connect my dummy on any of them no problem, to having to connect to most of the ddnet servers like 5-10 times before the server actually decides to let me in, and even when I log in, I cannot connect my dummy - it seems completely random, and there are no logs I can see to verify what might be happening - any ideas ?
09:26
are these code related, or some measures against ddosing ?
Avatar
Avatar
ImJustAskingDude
are these code related, or some measures against ddosing ?
you can test old clients, just download them form https://ddnet.tw/downloads/ for example DDNet 15.6.2 ... This probably is more likely related to ddos, I also noticed that I can not connect to servers in the last few days/weeks. Probably your connection request gets dropped while ddos, and maybe the client does not try to resend the request. (edited)
Avatar
ImJustAskingDude 2022-05-11 09:33:29Z
What is interesting, is that when I finally connect, there are no issues with ping on the server, and other people are able to connect their dummies
09:34
but that always been the case with ddos I guess, for whatever reason some people can still move fairly ok, while others are lagging all around
Avatar
can really depend of many things
Avatar
ImJustAskingDude 2022-05-11 09:37:52Z
any way to help you guys with those ddos attacks ?
Avatar
About https://github.com/ddnet/ddnet/pull/5085 what do you think, should I rename hud.png to ddnet.png or ddrace.png I will change also the asset tab name accordingly. The Idea was to include also new textures we use in our game into that png, for features that are not vanilla (like the new shields), but allow vanilla to extend their game.png so we can still merge their PR that changes the game.png because of added vanilla features.
Avatar
Avatar
ImJustAskingDude
any way to help you guys with those ddos attacks ?
pray for kinder people that do not need to ddos so we have peace in teeworlds
Avatar
ImJustAskingDude 2022-05-11 09:41:13Z
tough
Avatar
Avatar
c0d3d3v
for example at https://youtu.be/gPTVj-s3pgc?t=260 4:20 endless jumps are active
You could change the timer as well and make it more speedrun friendly
Avatar
Avatar
Brokecdx-
You could change the timer as well and make it more speedrun friendly
tell me more, what do you mean with "more speedrun friendly" (edited)
Avatar
Milliseconds
Avatar
Avatar
Brokecdx-
Milliseconds
This is probably not as easy as it sounds. We could display milliseconds, but you'd be disappointed if they didn't match your actual finish time, wouldn't you? I think that there is a problem with the client time is not perfectly in sync with the server ticks... so they would not match perfectly. Also it would mean to change the font size so we have enough space if you want to display ms
Avatar
Ah I see (edited)
Avatar
Avatar
c0d3d3v
you mean a new strong week indicator, in addition to the old one that already exists above the tees head?
ahh, didn't know that, 🤐 (edited)
Avatar
Is it possible to download the builds that the CI makes or are they deleted directly?
Avatar
Run actions/upload-artifact@v1 Uploading artifact 'ddnet-windows-latest' from 'D:\a\ddnet\ddnet\release\artifacts' for run #21808 Uploading 1 files File upload complete. Uploaded '44447819' bytes from 'D:\a\ddnet\ddnet\release\artifacts' to server Associated artifact ddnet-windows-latest (16537689) with run #21808 xD to what server are the artifacts uploaded and is it the executable?
Avatar
Ah I have found them
Avatar
Avatar
c0d3d3v
This is probably not as easy as it sounds. We could display milliseconds, but you'd be disappointed if they didn't match your actual finish time, wouldn't you? I think that there is a problem with the client time is not perfectly in sync with the server ticks... so they would not match perfectly. Also it would mean to change the font size so we have enough space if you want to display ms
I find this really interesting. Sometimes trivial things are the hard things. I remember also this about youtube view count, that it got stuck on viral videos for some reason, after publishing.
Avatar
does anyone know how do the eyes move in teeworlds
15:49
like how it's implemented
15:50
cause they go in a circle
Avatar
is that the answer to your question?
15:51
no, not really
Avatar
i think he's asking where in the code is the eye movement handled maybe
Avatar
or just an explanation in plain english
Avatar
DDraceNetwork, a cooperative racing mod of Teeworlds - ddnet/render.cpp at 490704b54344089bd1fb28d859d7398b4e8a0c0f · ddnet/ddnet
Avatar
im trying to recreate the effect with javascript and i dont know how to start
Avatar
@Alexander ^
Avatar
thank you very much
Avatar
Avatar
Jupstar ✪
@Alexander ^
can you explain the code a bit since im not really familiar with c++
15:55
like how does it offset it
Avatar
well its pretty much not c++ related code xD
15:55
basesize = 64 emote == blink means the small eyes eye seperation = the gap between both eyes (edited)
15:56
direction = cursor direction normalized from the mid of the tee
15:56
rest is math
Avatar
okay so im interested in that last line
15:56
direction.x would be what
15:56
mouse position?
Avatar
x = 1 mouse to right
15:57
x = -1 mouse to left
Avatar
yeah the coords
15:57
also one more question
Avatar
y = 1 either up or down, have to test, tw sometimes flips the coordinates
Avatar
what does vec2 mean
Avatar
2d vector
Avatar
nice
Avatar
basically {x, y}
Avatar
thats all, thank you very much
Avatar
Also, the semantic versioning fanboys finally won: the next SDL release is 2.24.0, not 2.0.24, and will carry on to 2.26.0 after that (unless we have an emergency patch of 2.24.1 first).
17:12
lmao
17:12
is that you?
17:12
XD
Avatar
yes, nice finally
Avatar
@Jupstar ✪ is Direction.x and Direction.y min and max values -1 and 1?
Avatar
yes
17:15
normalized
17:15
so they are never both 1
Avatar
cant find the code for that though
Avatar
but it says direction
17:16
directions are always normalized
Avatar
how do they get normalized
Avatar
else it could also be named position
17:17
well with normalize()? xd
17:17
if u dont know what that is, its math
Avatar
sorry if im asking dumb questions, im trying to understand it so i could rewrite it in javascript
Avatar
u divice all components by the length of the vector
17:18
x *= 1/sqrt(x*x + y*y)
17:18
same for y
Avatar
shit, this is really complicated for my small brain
Avatar
its ez just think in geometric algebra
Avatar
just think in what now
17:21
im not as smart as you think I am
Avatar
well can u image the length of a vector=
17:21
its basically how long the arrow is
Avatar
i understand that
Avatar
if u divide all components by that length, u basically get a value inside a 1 big circle
17:22
no matter how your vector looks like(if its non zero)
17:22
the length will be 1
17:23
of the new vector
17:23
so you can basically draw a circle around it
17:23
and u want a circle
17:23
bcs thats how the eyes rotate
17:23
if u divide a 1 dimensional number its the same
17:23
1/1 = 1 2/2 = 1 (edited)
17:23
its basically the same for 2d values
Avatar
im just gonna give up doing it the teeworlds way and try to do it another way
Avatar
lmao
17:25
lol they have js code
Avatar
Avatar
Alexander
how do they get normalized
do you know what a normalized vector is in the first place?
17:26
you gotta know things in order to understand them
Avatar
i dont really understand why its using vectors in the first place
Avatar
bcs its a 2d game
17:27
so u need a 2d number
17:27
in 3d u use 3d numbers
Avatar
so basically coordinates?
Avatar
yes
17:27
coordinates are numbers 1d coordinate is just plain numbers
17:27
2d coordinates is a 2d number
Avatar
a normalized vector is one whose length is 1
Avatar
yes imagine the number is 1 away from 0
Avatar
ohhhhh
Avatar
Math.sqrt(x^2 + y^2) = length
Avatar
basically like a hookline in tw can represent a vector, yes?
Avatar
yes
17:29
if ur tee is 0
17:29
and u dont move xd
17:30
but not a normalized vector
17:30
bcs the hookline is the length of the hook
17:30
not 1
Avatar
a normalized vector can also include values greater then abs(-1) no?
Avatar
Avatar
fokkonaut
a normalized vector can also include values greater then abs(-1) no?
why should it
17:32
normalized = length 1 from 0
Avatar
only edge case is vector(0, 0)
17:32
then u broke math
17:32
and have a blackhole
🕳️ 1
Avatar
(0,0) is forbidden as target direction in ddnet, in multiple locations xD can happen probably but you should not worry to much about it
Avatar
yes, happened before
17:33
i fixed all NaNs i could find
17:34
problem with computers if ofc the limited range
17:34
0 is not the same as 0 in math
17:34
thats also why 1/0 is infinity in computer science
Avatar
you want to fix one more NaN? I have a very famous one for you
Avatar
its just a value VERY VERY close to 0
Avatar
its all fun and games until the tee looks into your soul like this
Avatar
these dark eyes eat your soul
Avatar
Avatar
Jupstar ✪
thats also why 1/0 is infinity in computer science
maths undefined behaviour
Avatar
btw thats a render
17:36
In mathematics, particularly in set theory, the aleph numbers are a sequence of numbers used to represent the cardinality (or size) of infinite sets that can be well-ordered. They were introduced by the mathematician Georg Cantor and are named after the symbol he used to denote them, the Hebrew letter aleph ( ℵ ...
Avatar
Avatar
c0d3d3v
you want to fix one more NaN? I have a very famous one for you
tell me which xd
17:37
shotgun bug ?
Avatar
xD yes
Avatar
^^
Avatar
I already debugged it with UBSan ... its easy to find
Avatar
heinrich has to fix it, he is used to getting hate for breaking physics
Avatar
can't be fixed
17:37
i like the shotgun bug
Avatar
could just set the int to INT_MAX when legnth of the pos is 0
17:38
then its at least not UB XD
Avatar
purposly set behavior
Avatar
deen said we should keep the physics for the shotgun bug, so you just have to define the behaviour instead of undifiend NaN
Avatar
"its a feature"
Avatar
i wonder if there is atleast 1 run where the server was affected by a cosmic ray
17:39
and it gave an advantage
17:39
we gotta fix the universe
Avatar
pepe_speedpepe_speedpepe_speedpepe_speedpepe_speedpepe_speed (edited)
Avatar
gotta make the server triple redundant
Avatar
weeeee
reeeeeeeeeeee 3
Avatar
who is deleting stuff
sorry 1
17:42
aPES3_SusPolice
pepeH 2
Avatar
Avatar
Ryozuki
lol they have js code
Avatar
@Ryozuki "Born too late to explore the world, born too early to explore the universe." feelscryman
Avatar
close but no cigar
Avatar
it should be a normalized vector
17:44
it is until you point in the center
17:45
in tw it just sets it to angle 0
Avatar
@Alexander how old are you?
Avatar
why ask?
Avatar
to help you understand things
17:49
as i think you mix programming vectors and mathematical vectors
Avatar
im 19
Avatar
did you have any algebra course yet?
17:50
wait you mean in school?
Avatar
yeah I did
Avatar
so you know what a mathematical vector is?
Avatar
yeah
17:51
its like a line that has an intensity (length) and coordinates
Avatar
yup, so it is used to describe position and movement in a 2D plane
17:52
normalized vectors are vectors whose length is equal to 1
17:53
in general, you use them just to get direction angle so that when you apply an operation with another vector, the new length is equal to the other vector length
Avatar
i think i understand now
Avatar
you're 19, so maybe you'll have basic algebra course next year
17:56
depends on your studies and country
Avatar
im finishing school
17:56
this year
Avatar
highschool? i think i learnt vectors in highschool, but more advanced stuff in 1st year university
Avatar
learned vectors 4 years ago
18:01
or 3
Avatar
Highschools tend to give a very surface form of knowledge especially lacking in intuition, atleast in my country
Avatar
they teached it well here
Avatar
Avatar
Learath2
Highschools tend to give a very surface form of knowledge especially lacking in intuition, atleast in my country
yeah, i kinda agree
18:05
not like they have a choice though
Avatar
Wait, you got taught math in high school? 😄 We only learned the exact steps to input into the calculator to get the result. I learned more in my first hour of university math than the previous 3 years.
Avatar
you cant expect teenagers to have a profund understanding of these things as often, it is unfortunately not linked to real life application
18:07
the real problem, at least in math in France is off-ground learning
18:07
people don't get what it's used for
Avatar
Avatar
deen
Wait, you got taught math in high school? 😄 We only learned the exact steps to input into the calculator to get the result. I learned more in my first hour of university math than the previous 3 years.
lol
18:13
i even did matrices in high school
18:13
and solved equation systems
18:13
with 3 variables
18:13
etc
Avatar
i did equation system too in highschool, but matrices were in first year university
Avatar
are tee eyes going in a circle or an ellipse
18:20
cause i feel like its an ellipse
18:20
what i mean by that is that the max y offset is not the same as the max x offset
Avatar
Avatar
deen
Wait, you got taught math in high school? 😄 We only learned the exact steps to input into the calculator to get the result. I learned more in my first hour of university math than the previous 3 years.
We weren't allowed calculators, so we learned some math 😄
18:30
Still just mostly filling things into equations
Avatar
math starts where your imagination ends
Avatar
[quakenet] ChillerDragon BOT 2022-05-11 18:54:01Z
Its impressive how many 500s github throws seems like they never will fix that
Avatar
Avatar
Jupstar ✪
math starts where your imagination ends
nice quote
21:04
915a27d Use dynamically allocated memory for the CacheChunk - Jupeyy 3011be2 Merge #5086 - bors[bot]
Avatar
Hey guys, can i ask a programming question here? Tried programming discords, but havent been able to get any solution so far 😦 Its a java question
Avatar
Avatar
Saiborg
Hey guys, can i ask a programming question here? Tried programming discords, but havent been able to get any solution so far 😦 Its a java question
Avatar
Thanks 🙂 So basically i have a problem with the split function in a for loop. I want it to be overwritten each itteration, but its not working. The first iteration is working fine, but the second iteration the array returns null
21:11
21:12
the code isnt finished yet, but yeah i want to solve this issue first
Avatar
can you explain what you want to solve
21:12
by reading the file
Avatar
The file contains text like "MEMBER:Margaret Hamilton:margaret@nasa.gov:lkd432"... i want create members out of that text file
Avatar
fixes #5054

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-addresss...
Avatar
first, why are you using an array instead of a arraylist
21:13
since you clearly grow the array
21:13
an ArrayList does that for you
21:15
it has a handy add() method
Avatar
you should be using hasNextLine instead of hasNext when you fetch the line using nextLine
Avatar
Yep, i actually tried that from the start, but i wasnt sure how to add stuff to it directly. I think the probelm i got was when i wanted to do something like "members.get(1).setUsername"... not sure if that was the issue but it was something along those lines.. thats why i ended up using arrays
21:16
was probably my fault, but i went with something i knew better xD
Avatar
but its way worse
21:16
you should:
21:16
change the for loop for a while with the hasnextline
Avatar
Avatar
Robyt3
you should be using hasNextLine instead of hasNext when you fetch the line using nextLine
True, my bad... I just copied what my teacher told me
Avatar
use a arraylist and add stuff to it
21:17
and probably understand what a reference is
Avatar
Avatar
Ryozuki
and probably understand what a reference is
I was thinking of reference being a problem as well... So what i wanted to do instead was to create a 2d array instead. But when i went to the programming discord, people said that overwriting should work in a single array as well
Avatar
List members = new ArrayList(); while(scanner.hasNextLine()) { String line = scanner.nextLine(); // if + split members.add(new Member(.....)); } // here members has all the members now
21:19
forget about 2d arrays
21:19
what u want to do is extremly simple and ur overcomplicating it
Avatar
hmm alright thanks xD Its the first time im doing i/o in java so im probably doing exactly that. Overcomplicating it. But even with a arraylist i will need an array to split
21:20
so i guess i will come back to the same question?
Avatar
to split what?
Avatar
The split method always returns an array yeah
Avatar
to split the line for every ":"
Avatar
but that doesn't affect the list of members
Avatar
ah ye i was talking about the members
Avatar
so each line is like this "MEMBER:Margaret Hamilton:margaret@nasa.gov:lkd432"
Avatar
you should completly remove the expand() its plain wrong way to do it
Avatar
I want to add each section between the ":" to a seperate variable in member
Avatar
Avatar
Ryozuki
you should completly remove the expand() its plain wrong way to do it
yeah, if i use an arraylist i wont be needing it 🙂
Avatar
you can create the member first and then add it to the list
Avatar
But the split function will still be needed it think
21:22
i*
Avatar
Member member; if(x) { member = new Member(...); } else { member = new Member(...) } members.add(member);
21:24
yeah the split
Avatar
Yeah, but i need to load members from the file itself... So if a line is "MEMBER:Margaret Hamilton:margaret@nasa.gov:lkd432" Then Margaret Hamilton will be the username, margaret@nasa.gov will be the members email, and lkf432 will need to be the userID
21:25
So im pretty sure i need to run a loop even with an arraylist and use a split function with a array
21:25
and that is basically the problem i have right now
21:25
Sorry if im missing something obvious here... i know im a n00b
Avatar
you just need to put together the code now
21:26
you can also use jshell to try stuff out
21:26
Avatar
Avatar
Robyt3
Click to see attachment 🖼️
Yeah my first itteration works fine like you just described.. the problem is when i want itterate over the the same array again. It returns null
Avatar
can a line contain more than one member?
21:28
It can contain either a member, or their boats... but each on seperate lines
Avatar
You could uncomment the println to check if you even get each line in the loop
Avatar
Avatar
Robyt3
You could uncomment the println to check if you even get each line in the loop
yeah, the str returns each line fine... but if would put sysout(num) under the split, it will return "null" the second iteration
Avatar
num should be a local variable as well
21:31
you only use it locally once to it's best to avoid any global effects
Avatar
It was actually a local variable when i encountered the problem. So i tried to set it outside of the for loop, but the problem still exists 😦
21:33
Also, i really appreciate all the help guys. You are awesome ❤️
Avatar
Have you applied all the changes from above? Can you share your code again?
Avatar
I am currently changing it 🙂 Just give me a few min... also if i use arraylist, can i still iterate through it with "i"?
Avatar
The split method should never return null
Avatar
i cant do members.add(i) = new member
21:35
oh wait
Avatar
you don't need the i, you can add at the end of the list
Avatar
thats stupid lol
21:35
yeah
21:35
sorry im stupdi xD
21:39
21:40
Guys i love you so much! Its working now 😄 I have no idea why num was returning null before, but atleast its working now xD If you know what might have been wrong previously please let me know 🙂
Avatar
Nice. I don't think the split method can return null at all, so maybe you put the println(num) somewhere where split was not called yet.
Avatar
The first open-source release of GPU kernel modules for the Linux community help improve NVIDIA GPU driver quality and security.
21:43
@Jupstar ✪ lol
Avatar
is this related to the nvidia leaks?
Avatar
Avatar
Robyt3
Nice. I don't think the split method can return null at all, so maybe you put the println(num) somewhere where split was not called yet.
iirc i had it right under String[] num = str.split(":");.... But maybe my memory is betraying me xD Well it works anyways now, so big thanks 🙂
Avatar
Avatar
Ryozuki
No
Big thanks to you as well ❤️
21:59
first prs are real chillerdragon style prs
21:59
"fix typo"
Avatar
to be contributor
21:59
xd
Avatar
The first open-source release of GPU kernel modules for the Linux community help improve NVIDIA GPU driver quality and security.
22:21
@Ryozuki ah
22:21
u first xD
22:22
BASEDHALT
Avatar
Is there a way to know when the current map is done loading?
Avatar
hum client side, i think the different components get their "onConnecting" or sth like that method called
Avatar
I'm trying to get access to tile data for rendering things but if I do it while the map is still loading it crashes, maybe there is a better way? CMapItemLayerTilemap *pTMap = (CMapItemLayerTilemap *)pLayer; CTile *pTiles = (CTile *)GameClient()->Layers()->Map()->GetData(pTMap->m_Data); (edited)
Exported 329 message(s)