Guild icon
Teeworlds
discord.gg/teeworlds / development
For discussions around the development of the official Teeworlds
Between 2020-09-29 00:00:00Z and 2020-09-30 00:00:00Z
Avatar
On water physics (what is possible with tune zones, I've used 5 tune zone types on this map each with a different gravity) (edited)
Avatar
Looks sorta off, it's like the tee can't decide it's density 😄
Avatar
uh, I could remake my gravity mod with tune zones 😮
11:46
I had a problem there, that the floating point precision wasn't good enough and some physics calculations needed to be doubles, because orbit dynamics are just error prone
Avatar
@Assa are you the author of watermod?
12:01
I have been inspired by that.
12:02
Looks sorta off, it's like the tee can't decide it's density 😄
@Learath2 there are streams of underground water and streams of falling water. Have you noticed that?
Avatar
I've used total of 5 tune zones to create it. Would for you that feel less off and consistent with only one tune zone with gravity=-0.2?
12:04
On that map there have to be horizontal streams too, but that cannot be achieved with tune zones alone as we don't have a vector for gravity.
Avatar
@Assa are you the author of watermod?
@Deleted User no?
Avatar
I am not sure why there is a question mark 😄
Avatar
On that map there have to be horizontal streams too, but that cannot be achieved with tune zones alone as we don't have a vector for gravity.
@Deleted User we have? (0, -0.5) usually
Avatar
can't set the x component though
12:09
via tunes
Avatar
I mean vector and scalar forces as in physics.
12:09
Yeah, thanks @heinrich5991 that's it.
Avatar
Wait for 0.8 😏
12:10
I am sure a code wizard will make it great
Avatar
i always mix up horizontal and vertical forces ...
Avatar
Gravity is vec2(0, x) actually in game. So you cannot give a horisontal momentum to objetcs with it.
12:11
But also friction seems to be opposite: it's not working for vertical movement at all.
Avatar
The velramp also only applies to horizontal velocity iirc
Avatar
Yeah, found it out a hard way 😄
Avatar
you're changing the code anyway, right?
12:13
why not add a horizontal gravity tune?
Avatar
@Deleted User the separate streams weren't too obvious, except for the large waterfall. Still seems a little off to me, it's that large oscillating motion inside the water that throws me off
Avatar
pls don't add a vertical gravity, add maybe a different variable but don't call it gravity
Avatar
a gravity direction tune?
Avatar
why not add a horizontal gravity tune?
and a vertical friction please
12:15
@Assa you're right it should not be called gravity I think. Though I can imagine an object with magnetic force in game.
12:16
Magnet would be cool to have
Avatar
I was considering experimenting with a more traditional drag force, but in the end I decided against it. The physics of teeworlds are it's most successful part
12:16
The physics just feel right
Avatar
it's that large oscillating motion inside the water that throws me off
Yeah, I don't have vertical friction to reduce this effect. Tried to add surface zone with a lower gravity value but tile is too big to dampen anything.
Avatar
The physics just feel right
@Learath2 mostly, except hook and player collisions
Avatar
Honestly? The hook feels amazing
Avatar
*player hook
Avatar
It's completely unreal but you just feel so powerful using it
Avatar
They're not magic. Those are 2rn level quadratic equations. They're not holy cow.
Avatar
As in hooking other players? What's wrong with that?
Avatar
strong hook/week hook shenanigans for example
Avatar
The complexity of the math doesn't matter at all. It's about the feeling
Avatar
Sure we could add effect to physics leaving most of gameplay the same.
12:18
It's not altering reality it's changin one hacks for another, more eloquent.
Avatar
@Assa weak/strong is more an effect of the physics being applied inconsistently/naively. If you apply it equally to everyone, it'd be gone
Avatar
@Learath2 feeling can be preserved with the right coefficients and rules.
12:18
but will give an opportunity to expand the thing
12:19
you can make tune_zone 0 values as usual
Avatar
then it feels like the hook targets a bigger playerhitbox then the collision box, but this might be intended
Avatar
zero vertical friction and no horizontal drag
12:19
it's not that everything will fall apart (edited)
Avatar
With the options you propose yeah, we can simulate this behaviour. I was looking into a much more realistic application of friction
Avatar
friction formula is still very simple
12:20
how more realistic you wanted it to be?
12:20
it's still quadratic isn't it?
Avatar
I still don't get how the order/type of the equation matters at all
👌 1
Avatar
me neither 😄 I just know what is linear and what's second order. And that's all I need for a game physics
Avatar
Currently we apply drag only on one axis. I wanted to apply it to the velocity vector of the tee. With a single coefficient, that way you can't really simulate the old behaviour
12:22
but it would feel more "real"
Avatar
I see
Avatar
I'd be very careful about changing those mechanics
Avatar
so you just neglect vertical component of a drag, or just add it to horizontal rn?
Avatar
@Stiopa exactly why I decided against touching it at all, the physics already feel great to me
12:23
@Deleted User currently, there is no vertical drag at all
12:23
drag is only applied to the x component of your velocity
Avatar
but hook drag is fully vector?
Avatar
Well, different uses of the word "drag", no?
Avatar
ah maybe
12:24
but I get the second meaning too
Avatar
When you hook someone you "drag" them towards yourself. Air "drag" is the force that counters your movement in air (edited)
Avatar
just when you drag a character in angle of 45' you're giving him vertical and horizontal... momentum, right?
12:25
*drag a character with a hook
12:25
Air "drag" is the force that counters your movement in air
a friction, right?
12:26
I don't recall tune name I think. I should be named air_drag right
12:26
(which is horizontal_air_friction in fact)
Avatar
Yeah, air friction in that sense
12:27
Yep, when you "drag" someone with your hook, you are pulling them exactly in your direction
Avatar
I like current teeworld physics feel. But that doesn't means that current behavior could not be precisely replicated with a slithly more advanced formulas.
12:29
That's my point
12:31
For example, adding a vertical air friction with a default valiue of 0 is the same as having vertical air friction of 0.01 and gravity of 0.49
12:31
nothing will be changed
12:35
but you don't have to change even default gravity as you can set for zone 0 (default one) air_vertical_friction to 0 and it will be same as before.
Avatar
Tunes \o/
Avatar
is the autumn theme done?
Avatar
there will be autumn theme? :o
Avatar
next time I will put it in ||
20:07
:D
Avatar
top secret
Exported 90 message(s)