Movement/zh: Difference between revisions

From DDraceNetwork
No edit summary
(Created page with "按住左右移动时会无视摩檫力,因此高速前进的时候摩擦减速可能比按住反方向移动键更多,因为按住按键减速是固定值,但是摩檫减速会因速度增加而增大,从而大于这个固定值。")
Line 40: Line 40:




<div lang="en" dir="ltr" class="mw-content-ltr">
按住左右移动时会无视摩檫力,因此高速前进的时候摩擦减速可能比按住反方向移动键更多,因为按住按键减速是固定值,但是摩檫减速会因速度增加而增大,从而大于这个固定值。
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.
</div>




<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Advanced"></span>
== Advanced ==
== 进阶特性 ==
</div>





Revision as of 03:36, 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)


水平速度变化

  • 在松开所有按键的情况下:
    • 地面减速公式:每游戏刻减半velocity.x = velocity.x * 0.5
    • 空中减速公式:每游戏刻减少 5%velocity.x = velocity.x * 0.95
  • 按下速度相反的方向键:
    • 地面转向公式:每游戏刻减少 2 个单位,直到变成10个单位的反向速度。
    • 空中转向公式:每游戏刻减少 1.5 个单位,直到变成5个单位的反向速度。
  • 按住左或者右(默认为{keypress|A}{keypress|D})的情况下:
    • 地面加速公式:每游戏刻增加 2 个单位,速度上限为 10。
    • 空中加速公式:每游戏刻增加 1.5 个单位,速度上限为 5。


按住左右移动时会无视摩檫力,因此高速前进的时候摩擦减速可能比按住反方向移动键更多,因为按住按键减速是固定值,但是摩檫减速会因速度增加而增大,从而大于这个固定值。


进阶特性

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.