Guild icon
DDraceNetwork
DDraceNetwork / questions
For newcomers to ask questions and get help. Also check https://wiki.ddnet.org/wiki/FAQ
Between 2024-11-14 00:00 and 2024-11-15 00:00
Avatar
guys how to bind dummy triplefly without pistol
06:15
if i search wiki binds it doesnt help
Avatar
Avatar
Mirfay
guys how to bind dummy triplefly without pistol
bind mouse1 +toggle cl_dummy_hammer 1 0 and turn on copy
07:10
u have to hook when ur bot pressing mouse1 down tho - its hard
Avatar
Avatar
bencie
to left: .16, .31, .34 | to right: .63, .66, .81
also .62 (which is there visually in the coord display)
Avatar
Who knows where in the code gravity is rounded to 0 if the value is very small
Avatar
I'm guessing there is no explicit rounding. What is happening is that the effect of the gravity on the velocity is calculated for a single tick (20 ms), and the effect is so small that the float number stays the same since it can't resolve that small of a difference
10:02
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
Avatar
Avatar
Evelyn
Who knows where in the code gravity is rounded to 0 if the value is very small
I know, in fact, every tuning value gets rounded after 2 digits
12:22
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
12:22
(int)((Value)*100.0f)
Avatar
I touch my wiener 2024-11-14 12:59
WTH why 1 "tenge" just stalking me and ban in all maps? (edited)
13:00
i only join and alr kick
Avatar
Avatar
Gumba
bind mouse1 +toggle cl_dummy_hammer 1 0 and turn on copy
is there another way?
Avatar
Avatar
Assa
I know, in fact, every tuning value gets rounded after 2 digits
How will this change?
Avatar
@Evelyn I don't understand this question
13:29
If you set gravity to, for example, 0.001, gravity will be set to (int)(0.001 * 100) = (int)(0.1) = 0
Avatar
I want gravity NOT to be rounded
Avatar
you can't
13:31
or you need to change server code
Avatar
I want to change the server code then
Avatar
@Evelyn change behaviour of CTuneParam, set int m_Value to double m_Value and change behaviour of Set and Get function, good luck!
Avatar
Very interesting , but very unclear (
Avatar
What part do you now understand? C++, CTuneParam or what gravity has to do with it?
Avatar
Wait, I'm going to tell you what I want to do.
13:34
A wonderful man risu made a script in python, which allows you to output the necessary commands in tune to slow down / speed up the game, everything works great, but there is one drawback. At a deceleration of 4x or more , when reaching the peak height during a normal jump, the player stops falling for 0.5 seconds or more with each deceleration
13:35
I want to fix it, I think it has to do with gravity rounding
Avatar
is this a script which applies new tuning values every tick?
13:37
the way you use the tool is you run python speedtune.py <speed factor> [prefix] so for example python speedtune.py 0.5 tune would give you the commands for global tunes to set the speed to 0.5x
Avatar
Yeah I should fix the precision to 2 digits to match the game, instead of the 3 digits it's now...
Avatar
Avatar
risu
Yeah I should fix the precision to 2 digits to match the game, instead of the 3 digits it's now...
^this
Avatar
Either way, just this doesn't explain the player velocity sometimes getting dropped to zero while the internal velocity is still nonzero
13:39
Because the problem we're experiencing, for example at the apex of jumps, has the player stop close to the apex as the velocity gets close to zero, but then they start moving again as gravity is applied
13:41
the very slow up and down movement at the apex of the jump gets reduced to the player stopping slightly below the apex for the time it would've taken them to reach the apex and fall back down again
13:41
let me draw a picture
Avatar
I think I understand what you mean, I wonder if this is just visual
Avatar
basically this, green is what you'd expect, red is what you get
Avatar
I can not reproduce this
13:51
for me your settings with factor 0.5 work.
13:51
do you use smaller values?
13:52
0.125
13:52
Try
13:52
And 0.16
Avatar
tune gravity 0.008 <-- breaks
13:52
with 0.125 your gravity is basically 0
Avatar
Try gravity 0.01, even that breaks
13:53
I'm not expecting 0.125 factor to work
Avatar
0.5 * factor * factor = 0.01 <=> factor = sqrt(0.02) ~ 0.141
Avatar
tune ground_jump_impulse 1.6 tune gravity 0.01 this should be enough to replicate the obviously weird behaviour
Avatar
with so small settings the physics just break, I can now reproduce this
Avatar
thing is, this is noticeable even with much higher values when actually playing the game
Avatar
imagine the gravity setting having "steps", and with 0.5 you just have 12 steps
13:57
i am currently testing with 0.282 with 4 steps, it's still noticable
14:00
with 5 steps it's kinda okay, python speedtune.py 0.316 tune
14:01
I wouldn't go under it, the physics just miss the precision and then there are weird bugs with even smaller values
Avatar
Avatar
Assa
imagine the gravity setting having "steps", and with 0.5 you just have 12 steps
I've been looking at the code for a while now and I just don't see where these steps are introduced
Avatar
gravity is the smallest tuning, that's why you noticed it there first, all other physics are also effected
Avatar
Yeah we noticed issues when doing some drag sections even with a speed factor of 0.4
Avatar
Wait, how do I specify the number of percentages of people from the total number who must press f3 to make the vote happen
Avatar
additionally the playercore, which contains positions and velocities, is also send over the network. There is also some rounding happening: https://github.com/ddnet/ddnet/blob/4f53dd8048edd72967ddcde90c5e002995f918e4/src/game/gamecore.cpp#L602 Then there is what deen said, that you add such a small floating point number to the velocity, that it mostly doesn't change (edited)
Avatar
Well, is it possible to make sure that the vertical speed is not rounded off when jumping?
Avatar
Koll Potato 2024-11-14 14:12
its possible to code that
14:12
just rewrite the entire game
14:12
nouis
Avatar
So how do I encode it?
Avatar
Koll Potato 2024-11-14 14:16
ig u can just not round the value here
14:16
and then compile your server
Avatar
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
14:17
this line
14:17
just as i said
Avatar
Avatar
Koll Potato
ig u can just not round the value here
Where is it?
Avatar
Avatar
Assa
additionally the playercore, which contains positions and velocities, is also send over the network. There is also some rounding happening: https://github.com/ddnet/ddnet/blob/4f53dd8048edd72967ddcde90c5e002995f918e4/src/game/gamecore.cpp#L602 Then there is what deen said, that you add such a small floating point number to the velocity, that it mostly doesn't change (edited)
Koll Potato 2024-11-14 14:21
here
Avatar
And what should I do there? (I'm dumb)
Avatar
hey everyone why am i lagging on ger servers (instead of 30 ping i have 120-140) and how
Avatar
are you on get 10?
Avatar
doesnt fix
14:28
every ger server is doomed
14:28
i guess
Avatar
weird
Avatar
Avatar
Koll Potato
ig u can just not round the value here
oh hey thanks, this explains things velocities below 0.0039 just get set to zero
14:35
I don't really care if it works, 0.5 is already plenty slow for me, I just wanted to know why
Avatar
Avatar
risu
I don't really care if it works, 0.5 is already plenty slow for me, I just wanted to know why
But can you tell me how to remove this rounding, I need more than 2 on the server
Avatar
Avatar
Evelyn
But can you tell me how to remove this rounding, I need more than 2 on the server
It's a part of the game's networking, so you'd have to recompile both server and client to change it
Avatar
Avatar
risu
oh hey thanks, this explains things velocities below 0.0039 just get set to zero
Koll Potato 2024-11-14 14:50
@Assa linked it, I have only found the variable that corresponds to Y velocity which is probably used in jumps
Avatar
Avatar
Koll Potato
ig u can just not round the value here
m_VelY is int itself afair
Avatar
Avatar
Evelyn
But can you tell me how to remove this rounding, I need more than 2 on the server
you can't
15:11
you need to extend protocol then to support fixed point to use it ig
15:12
i don't remember if its sane to send floats over net as is xd
Avatar
And can I just change the value that is needed for rounding?
Avatar
is TASNET that works only on TAS servers bannable?
Avatar
is it possible to do this jump? (from tee to bullet) (edited)
Avatar
Not past tele I think, it'd be very close
Avatar
Avatar
Blender
is it possible to do this jump? (from tee to bullet) (edited)
nop
Avatar
Avatar
meloƞ
nop
100%? (edited)
Avatar
Open practice and find out greenthing
Avatar
98% sure
17:12
are you thinking about skipping it?
Avatar
i got stuck there and my friend went into next part leaving me alone (edited)
Avatar
ah gg
Avatar
I'd like to think Aoe made it this way cause he's a trolle
kek 1
Avatar
can anyone help me get better at ddnet
Avatar
Yep, tried ingame, couldn't do it. It's like perfectly too far to where you don't have the height required. Maybe TAS could do it, but my weak human brain couldn't find the perfect DJ to make it work I say it's impossible though, you just don't have the height (edited)
Avatar
Hello, this script outputs the commands I need to slow down/accelerate : from sys import argv as args try: factor = float(args[1]) except IndexError as e: print("Please supply a speed factor!") exit(1) except ValueError as e: print("Not a valid factor: " + args[1]) exit(1) prefix = "" if len(args) > 2: prefix = " ".join(args[2:]) inverse = 1 / factor square = factor * factor print(f"{prefix} ground_control_speed {10.0 * factor :.3f}") print(f"{prefix} ground_control_accel {2.0 * square :.3f}") print(f"{prefix} ground_friction {0.5 ** factor :.3f}") print(f"{prefix} ground_jump_impulse {13.2 * factor :.3f}") print(f"{prefix} air_jump_impulse {12.0 * factor :.3f}") print(f"{prefix} air_control_speed {5.0 * factor :.3f}") print(f"{prefix} air_control_accel {1.5 * square :.3f}") print(f"{prefix} air_friction {0.95 ** factor :.3f}") print(f"{prefix} hook_drag_accel {3.0 * square :.3f}") print(f"{prefix} hook_drag_speed {15.0 * factor :.3f}") print(f"{prefix} gravity {0.5 * square :.3f}") print(f"{prefix} velramp_start {550 * factor :.3f}") print(f"{prefix} velramp_range {2000 * factor :.3f}") But 1 there is 1 drawback, now I will describe which one.
Avatar
Here are the actions it does if I substitute 0.5 and tune (slowing down by 2 times): 1. ground_control_speed: Expression: 10.0 * factor Calculation: 10.0 * 0.5 = 5.000 Result: ground_control_speed 5.000 2. ground_control_accel: Expression: 2.0 * square, where square = factor * factor Calculation: 2.0 * (0.5 * 0.5) = 2.0 * 0.25 = 0.500 Result: ground_control_accel 0.500 3. ground_friction: Expression: 0.5 ** factor Calculation: 0.5 ** 0.5 ≈ 0.707 Result: ground_friction 0.707 4. ground_jump_impulse: Expression: 13.2 * factor Calculation: 13.2 * 0.5 = 6.600 Result: ground_jump_impulse 6.600 5. air_jump_impulse: Expression: 12.0 * factor Calculation: 12.0 * 0.5 = 6.000 Result: air_jump_impulse 6.000 6. air_control_speed: Expression: 5.0 * factor Calculation: 5.0 * 0.5 = 2.500 Result: air_control_speed 2.500 7. air_control_accel: Expression: 1.5 * square, where square = factor * factor Calculation: 1.5 * 0.25 = 0.375 Result: air_control_accel 0.375 8. air_friction: Expression: 0.95 ** factor Calculation: 0.95 ** 0.5 ≈ 0.975 Result: air_friction 0.975 9. hook_drag_accel: Expression: 3.0 * square, where square = factor * factor Calculation: 3.0 * 0.25 = 0.750 Result: hook_drag_accel 0.750 10. hook_drag_speed: Expression: 15.0 * factor Calculation: 15.0 * 0.5 = 7.500 Result: hook_drag_speed 7.500 11. gravity: Expression: 0.5 * square, where square = factor * factor Calculation: 0.5 * 0.25 = 0.125 Result: gravity 0.125 12. velramp_start: Expression: 550 * factor Calculation: 550 * 0.5 = 275.000 Result: velramp_start 275.000 13. velramp_range: Expression: 2000 * factor Calculation: 2000 * 0.5 = 1000.000 Result: velramp_range 1000.000
17:35
But if I specify a value less than 0.376 (a slowdown of 3.7. from the usual one). One effect is starting to show up
Avatar
why are you formatting this the way you're formatting it
⬆️ 1
17:36
please use a code block, or nothing at all. also please dont just dump random things in #questions, this is rather something for #off-topic or #developer
Avatar
The file has already been posted a number of times, you don't need to keep posting it
17:37
also you're reposting an older version
Avatar
I want to implement a normal slowdown more than 3 times. But rounding does not solve this. But maybe you can change the action that is being performed, for example, multiplication by 0. 5
Avatar
You can reduce the rounding done by the networking but that requires modifying both the server and client and you probably don't want that for your players There's no way to actually make this work through server side only aside from weird hacks
Avatar
But the server is running , which is fine with slowing down
17:45
They are using the code to do this
17:45
But I can't imagine how
Avatar
Avatar
flux
can anyone help me get better at ddnet
sure, but i wont do it rn. ill do it tomorrow (by some chance maybe)
Avatar
Avatar
Evelyn
They are using the code to do this
Contribute to Teero888/tune_calculator development by creating an account on GitHub.
Avatar
Avatar
Blender
is it possible to do this jump? (from tee to bullet) (edited)
Sadly not, I failed like that too one time...
Avatar
Avatar
Aoe
Sadly not, I failed like that too one time...
Sadly not its your map mate xd
Avatar
Ye bad mapper..
feelsbadman 1
Avatar
Anyone else having problems like this on fng? Dont know where to post this topic. Is this normal? There are a lot more micro lag spikes that aren’t visible at this resolution and frame rate, and many key inputs aren’t registering, which you also can’t see in the video. The actual experience is far worse, with about 1-2 lags per second. This issue seems particularly intense on FNG servers (probably because prediction margin helps in DDNet). Could anyone help me troubleshoot this? Is it possibly related to the client, or could it be due to the network path to the server?
Avatar
i think its something server side
20:01
i had an issue where i couldnt move at spawn and saw other people reporting something similar
20:01
also server seems to lag a lot when a player gets banned
Avatar
Avatar
Gumba
bind mouse1 +toggle cl_dummy_hammer 1 0 and turn on copy
what about going across not up?
Avatar
Avatar
Mirfay
what about going across not up?
always this bind, there is one other for getting a 3rd tee out of a deep hole, but it makes u collide easily, so not worth for 95% of situations
Avatar
why my cursor goes to the second monitor
Avatar
Avatar
ericc__._
why my cursor goes to the second monitor
by any chance you use borderless window instead of fullscreen?
21:45
idk if that works like that
21:46
as i am thinking
21:46
someone correct if wrong
Avatar
Currently there is no good way to apply these tunes to your map except putting them in manually.
you can so easily add them to a map with twmap:
  • twmap edit konvert map into directory structure
  • add your tunings to the mapsettings JSON file
  • convert map back I already did something like that for more complicated physics
22:35
you can discuss, if this is a "good way", also heinrich once told me, that you can add settings in a cfg file and simply import it into the map
Avatar
Avatar
Assa
you can discuss, if this is a "good way", also heinrich once told me, that you can add settings in a cfg file and simply import it into the map
doing this rn xd
👍 1
Avatar
Avatar
Evelyn
But I can't imagine how
They have probably performed some of the weird hacks that I'm talking about, they're not all that hard to program if you know what you're doing
Avatar
Avatar
Assa
you can discuss, if this is a "good way", also heinrich once told me, that you can add settings in a cfg file and simply import it into the map
go thank @Tater for this: https://teero888.github.io/tune_calculator/ (edited)
POGGIES 1
Avatar
omg ty
❤️ 1
23:50
i actually needed this for bombtag lol
Exported 141 message(s)
Timezone: UTC+0