Movement/zh: Difference between revisions

From DDraceNetwork
Darkh (talk | contribs)
Created page with "跳跃是直接将玩家竖直速度'''设置'''为某个值,无视原有的速度。这个特性在用于取消原有的巨大速度时很有效。"
Darkh (talk | contribs)
Created page with "=== 水平移动 ==="
Line 26: Line 26:




<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Horizontal_Movement:"></span>
=== Horizontal Movement: ===
=== 水平移动 ===
</div>


<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 03:13, 28 July 2023

此條目仍需進行內容補充,您可以幫助我們編輯和修訂以擴充其內容。

基本移動是 Teeworlds 和 DDrace 的核心操作方式之一。


基礎信息

重力

處於默認重力下的玩家會在豎直方向 Y 軸每遊戲刻增加 0.5 的向下速度。


跳躍

地面跳躍將玩家的豎直速度設置為-13.2 單位。

空中跳躍(二段跳)將玩家的豎直速度設置為-12.0 單位。

跳躍是直接將玩家豎直速度設置為某個值,無視原有的速度。這個特性在用於取消原有的巨大速度時很有效。

待辦: Find the bps value or scaled coefficient for these values (same with the horizontal movement, these values are not in bps)


水平移動

  • Pressing nothing:
    • Ground: Every tick velocity.x = velocity.x * 0.5
    • Air: Every tick velocity.x = velocity.x * 0.95
  • 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;
This is the bottleneck in vertical movement. In horizontal movement a 「ramp」-Value is multiplied to the horizontal speed. Causing the tee to slow down and stop when getting too fast. This is most commonly observed in speed ups.

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.

待辦: * 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


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.

待辦: add gif

Elevated Jump

A ground jump can be performed even if the tee is a few subunits above the ground.