Movement: Difference between revisions

"Remove LangNavBox"
Prepared the page for translation
Line 1: Line 1:
<languages/>
<translate>
</translate>
{{Stub}}
{{Stub}}
<translate>


Movement is one of the core aspects of Teeworlds and DDrace.
Movement is one of the core aspects of Teeworlds and DDrace.


== Basics ==
== Basics ==


=== Gravity ===
=== Gravity ===
Every tick the acceleration of 0.5 is added to the y velocity (downwards) due to gravity.
Every tick the acceleration of 0.5 is added to the y velocity (downwards) due to gravity.


=== Jumping ===
=== Jumping ===
Ground jumping sets a tee's y velocity to -13.2, scaled by a value.
Ground jumping sets a tee's y velocity to -13.2, scaled by a value.


Line 14: Line 23:


Jumping will ''set'' the y velocity, cancelling out any previous upwards or downwards velocity. This is very useful in scenarios where you need to halt large vertical impulses.
Jumping will ''set'' the y velocity, cancelling out any previous upwards or downwards velocity. This is very useful in scenarios where you need to halt large vertical impulses.
</translate>
{{Todo|Find the bps value or scaled coefficient for these values (same with the horizontal movement, these values are not in bps)}}
{{Todo|Find the bps value or scaled coefficient for these values (same with the horizontal movement, these values are not in bps)}}
<translate>


=== Horizontal Movement: ===
=== Horizontal Movement: ===
* Pressing nothing:
* Pressing nothing:
** Ground: Every tick <syntaxhighlight lang="c++" inline="">velocity.x = velocity.x * 0.5</syntaxhighlight>
** Ground: Every tick <syntaxhighlight lang="c++" inline="">velocity.x = velocity.x * 0.5</syntaxhighlight>
Line 29: Line 42:


Friction is ignored when holding down a key. So, at high velocities, pressing nothing will slow a tee down faster than moving in the opposite direction, as the friction will have an exponential slowdown compared to the <code>a/d</code> linear slowdown.
Friction is ignored when holding down a key. So, at high velocities, pressing nothing will slow a tee down faster than moving in the opposite direction, as the friction will have an exponential slowdown compared to the <code>a/d</code> linear slowdown.


== Advanced ==
== Advanced ==


=== Max Speed ===
=== Max Speed ===
Max speed: 6000 Sub-tiles/Tick (+speedup in one tick, e.g. gravity, jetpack, explosion).
Max speed: 6000 Sub-tiles/Tick (+speedup in one tick, e.g. gravity, jetpack, explosion).


Line 42: Line 58:
The speed is rounded down to a precision of <math>\frac{1}{256}</math> every tick. This is causing the tee to stop moving horizontal when having too much speed.
The speed is rounded down to a precision of <math>\frac{1}{256}</math> every tick. This is causing the tee to stop moving horizontal when having too much speed.


</translate>
{{Todo|* convert sub-tiles/tick into tiles/sec * find max vel und real max vel (from where would a constant function fit) * find speed, where the tee stops moving * write about ramp speed, and add diagram}}
{{Todo|* convert sub-tiles/tick into tiles/sec * find max vel und real max vel (from where would a constant function fit) * find speed, where the tee stops moving * write about ramp speed, and add diagram}}
<translate>


=== Corner Skimming ===
=== Corner Skimming ===
A tee is considered on the ground only due to its position and distance to the ground - it does not require the tee to have downwards velocity. So, it is possible for a tee to be "grounded" while traveling upwards, as long as the tee skims the corner of a tile.  
A tee is considered on the ground only due to its position and distance to the ground - it does not require the tee to have downwards velocity. So, it is possible for a tee to be "grounded" while traveling upwards, as long as the tee skims the corner of a tile.  


Line 54: Line 74:


Corner skimming is not often intentionally used in map parts (except for maps such as [https://ddnet.org/maps/Short-32-And-32-Precise-32-7/ Short and Precise 7]), but can be used in short speedruns as small optimizations.
Corner skimming is not often intentionally used in map parts (except for maps such as [https://ddnet.org/maps/Short-32-And-32-Precise-32-7/ Short and Precise 7]), but can be used in short speedruns as small optimizations.
</translate>
{{Todo|add gif}}
{{Todo|add gif}}
<translate>


=== Elevated Jump ===
=== Elevated Jump ===
A ground jump can be performed even if the tee is a few subunits above the ground.  
A ground jump can be performed even if the tee is a few subunits above the ground.  
[[Category:Game-Mechanic]]
[[Category:Game-Mechanic]]
</translate>