Movement/uk: Difference between revisions
Created page with "Стрибок "встановлює" швидкість y, скасовуючи будь-яку попередню швидкість вгору або вниз. Це дуже корисно в сценаріях, де потрібно зупинити великий вертикальний імпульс." |
Created page with "== Горизонтальний рух ==" |
||
Line 26: | Line 26: | ||
< | <span id="Horizontal_Movement:"></span> | ||
== | == Горизонтальний рух == | ||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> |
Revision as of 18:04, 27 August 2023
Рух - один із основних аспектів Teeworlds і DDrace.
Основи
Гравітація
Кожний тік до швидкості y (вниз) додається прискорення 0,5, викликане гравітацією.
Стрибки
Стрибки на землю встановлюють швидкість y тии на -13,2, збільшену на значення.
Стрибок у повітря (подвійний стрибок) встановлює швидкість y тройника на -12,0, збільшену на значення.
Стрибок "встановлює" швидкість y, скасовуючи будь-яку попередню швидкість вгору або вниз. Це дуже корисно в сценаріях, де потрібно зупинити великий вертикальний імпульс.
Горизонтальний рух
- Pressing nothing:
- Ground: Every tick
velocity.x = velocity.x * 0.5
- Air: Every tick
velocity.x = velocity.x * 0.95
- Ground: Every tick
- Pressing key in opposite direction:
- Ground: Every tick the horizontal velocity decreases by 2 until 10 in the opposite direction is reached
- Air: Every tick the horizontal velocity decreases by 1.5 until 5 in the opposite direction is reached
- Horizontal speed up by pressing a or d:
- Ground: Every tick the horizontal velocity increases by 2 until 10 is reached
- Air: Every tick the horizontal velocity increases by 1.5 until 5 is reached\
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 a/d
linear slowdown.
Advanced
Max Speed
Max speed: 6000 Sub-tiles/Tick (+speedup in one tick, e.g. gravity, jetpack, explosion).
src/game/gamecore.cpp
(before calculating new position from velocity):if(length(m_Vel) > 6000)
m_Vel = normalize(m_Vel) * 6000;
The speed is rounded down to a precision of every tick. This is causing the tee to stop moving horizontal when having too much speed.
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.
Corner skimming:
- allows a tee to refresh its double-jump (useful when skipping maps such as Impetuous).
- can apply ground acceleration and max speed to a tee for a short amount of time (assuming the tee's horizontal midair speed is less than the maximum ground speed prior to corner skimming)
Corner skimming is not often intentionally used in map parts (except for maps such as Short and Precise 7), but can be used in short speedruns as small optimizations.
Elevated Jump
A ground jump can be performed even if the tee is a few subunits above the ground.