Nonrecursive Movement Formulas/zh: Difference between revisions
Content added Content deleted
(Created page with "非递归公式") |
No edit summary |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
__NOTOC__ |
__NOTOC__ |
||
由于算术几何序列有明确的公式,我们可以建立非递归函数来计算简单但有用的结果,例如在任一 |
由于算术几何序列有明确的公式,我们可以建立非递归函数来计算简单但有用的结果,例如在任一刻上玩家的高度,或者在初始速度与持续时间的基础上计算跳跃的距离。 |
||
'''定义:''' |
'''定义:''' |
||
* <math display="inline">v_0</math> 是玩家的初始速度(跳跃之前,<math>t_0</math> 时的速度) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
* <math display="inline"> |
* <math display="inline">t</math> 是计入的刻数(例如:平地跳跃的持续时间是 t=12,参见[[Special:MyLanguage/Tiers| Tiers ]]) |
||
* <math display="inline">J</math> 是“跳跃增益”(疾跑跳跃为 0.3274,斜疾跑跳跃为 0.291924,45°无疾跑跳跃为 1.0……) |
|||
* <math display="inline">t</math> is the number of ticks considered (ex: t=12 on flat ground, see '''Jump Duration''') |
|||
* <math display="inline"> |
* <math display="inline">M</math> 是跳跃后的移动乘数(45°斜疾跑为 1.3,正常疾跑为 1.274,无疾跑45°为 1.0……) |
||
* <math display="inline">M</math> is the movement multiplier after jumping (1.3 for 45° sprint, 1.274 for normal sprint, 1.0 for no-sprint 45°...) |
|||
</div> |
|||
<span id="Vertical_Movement_(jump)_[1.8]"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== |
== 垂直运动(跳跃)[1.8] == |
||
</div> |
|||
跳跃后的垂直速度(<math>t \geq 6</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Vertical speed after jumping (<math>t \geq 6</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{V}_Y(t) = 4 \times 0.98^{t-5} - 3.92</math> |
:<math display="inline">\textrm{V}_Y(t) = 4 \times 0.98^{t-5} - 3.92</math> |
||
</div> |
|||
跳跃后的相对高度(<math>t \geq 6</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Relative height after jumping (<math>t \geq 6</math>) |
|||
</div> |
|||
:<math display="inline">\text{Y}_{rel}(t) = \underset{\text{跳 跃 最 高 点}}{\underbrace{197.4 - 217 \times 0.98^5}} + 200 (0.98-0.98^{t-4}) - 3.92 (t-5)</math> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{Y}_{rel}(t) = \underset{\textrm{jump peak}}{\underbrace{197.4 - 217 \times 0.98^5}} + 200 (0.98-0.98^{t-4}) - 3.92 (t-5)</math> |
|||
</div> |
|||
对于 <math display="inline">t<6</math> 的情况,见下文。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
For <math display="inline">t<6</math>, see below. |
|||
</div> |
|||
<span id="Vertical_Movement_(jump)_[1.9+]"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== |
== 垂直运动(跳跃)[1.9+] == |
||
</div> |
|||
跳跃后的垂直速度(<math>t \geq 1</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Vertical speed after jumping (<math>t \geq 1</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{V}_Y(t) = 0.42 \times 0.98^{t-1} + 4 \times 0.98^t - 3.92</math> |
:<math display="inline">\textrm{V}_Y(t) = 0.42 \times 0.98^{t-1} + 4 \times 0.98^t - 3.92</math> |
||
</div> |
|||
跳跃后的相对高度(<math>t \geq 0</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Relative height after jumping (<math>t \geq 0</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{Y}_{rel}(t) = 217 \times (1 - 0.98^t) - 3.92 t</math> |
:<math display="inline">\textrm{Y}_{rel}(t) = 217 \times (1 - 0.98^t) - 3.92 t</math> |
||
</div> |
|||
Line 68: | Line 46: | ||
<span id="Horizontal_Movement_(instant_jump)"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== 水平运动(落地跳跃) == |
|||
== Horizontal Movement (instant jump) == |
|||
</div> |
|||
假设玩家在跳跃前已经在空中。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Assuming the player was airborne before jumping. |
|||
</div> |
|||
疾跑跳跃后的水平速度(<math>t \geq 2</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Horizontal speed after sprintjumping (<math>t \geq 2</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{V}_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
:<math display="inline">\textrm{V}_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
||
</div> |
|||
疾跑跳跃距离(<math>t \geq 2</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Sprintjump distance (<math>t \geq 2</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{Dist}(v_0,t) = 1.91 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
:<math display="inline">\textrm{Dist}(v_0,t) = 1.91 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
||
</div> |
|||
'''注意:'''这些公式对于大多数 <math>v_0</math> 的值来说都是准确的,但是一些负值会在某个时间点触发速度阈值并重置玩家速度,从而使这些公式不准确。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
'''Note:''' These formulas are accurate for most values of <math>v_0</math>, but some negative values can wind up activating the speed threshold and reset the player's speed at some point, thus rendering these formulas inaccurate. |
|||
</div> |
|||
<span id="Horizontal_Movement_(delayed_jump)"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== 水平运动(延后跳跃) == |
|||
== Horizontal Movement (delayed jump) == |
|||
</div> |
|||
假设玩家在跳跃前已经落地(至少在落地后的 1 刻起跳) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Assuming the player is on ground before jumping (at least 1 tick since landing). |
|||
</div> |
|||
疾跑跳跃的水平速度(<math>t \geq 2</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Horizontal speed after sprintjumping (<math>t \geq 2</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{V}^*_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( 0.6 v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
:<math display="inline">\textrm{V}^*_H(v_0,t) = \frac{0.02 M}{0.09} + 0.6 \times 0.91^t \times \left ( 0.6 v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
||
</div> |
|||
疾跑跳跃距离(<math>t \geq 2</math>) |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Sprintjump distance (<math>t \geq 2</math>) |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{Dist}^*(v_0,t) = 1.546 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( 0.6v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
:<math display="inline">\textrm{Dist}^*(v_0,t) = 1.546 v_0 + J + \frac{0.02 M}{0.09} (t-2) + \frac{0.6 \times 0.91^2}{0.09} \times (1 - 0.91^{t-2}) \times \left ( 0.6v_0 + \frac{J}{0.91} - \frac{0.02 M}{0.6 \times 0.91 \times 0.09} \right )</math> |
||
</div> |
|||
Line 129: | Line 83: | ||
<span id="Advanced_Formulas"></span> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
== |
== 进阶公式 == |
||
</div> |
|||
在周期为 <math display="inline">T</math> 的助跑上连续疾跑跳跃 <math>n</math> 次后的水平速度(<math>n \geq 0</math>,<math>T \geq 2</math>)。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
Horizontal speed after <math>n</math> consecutive sprintjumps on a momentum of period <math display="inline">T</math> (<math>n \geq 0</math>, <math>T \geq 2</math>). |
|||
</div> |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
:<math display="inline">\textrm{V}^{\,n}_H(v_0,T,n) = \left ( 0.6 \times 0.91^T \right )^n v_0 + \left ( 0.6 \times 0.91^{T-1} J + 0.02M \frac{1 - 0.91^{T-1}}{0.09} \right ) \frac{1- (0.6 \times 0.91^T)^n}{1 - 0.6 \times 0.91^T} </math> |
:<math display="inline">\textrm{V}^{\,n}_H(v_0,T,n) = \left ( 0.6 \times 0.91^T \right )^n v_0 + \left ( 0.6 \times 0.91^{T-1} J + 0.02M \frac{1 - 0.91^{T-1}}{0.09} \right ) \frac{1- (0.6 \times 0.91^T)^n}{1 - 0.6 \times 0.91^T} </math> |
||
</div> |
|||
如果第一次疾跑跳跃为 delay,则 <math display="inline">v_0</math> 乘以 0.6。 |
|||
<div lang="en" dir="ltr" class="mw-content-ltr"> |
|||
If the first sprintjump is delayed, multiply <math display="inline">v_0</math> by 0.6 |
|||
</div> |
Latest revision as of 12:35, 9 January 2024
由于算术几何序列有明确的公式,我们可以建立非递归函数来计算简单但有用的结果,例如在任一刻上玩家的高度,或者在初始速度与持续时间的基础上计算跳跃的距离。
定义:
- 是玩家的初始速度(跳跃之前, 时的速度)
- 是计入的刻数(例如:平地跳跃的持续时间是 t=12,参见 Tiers )
- 是“跳跃增益”(疾跑跳跃为 0.3274,斜疾跑跳跃为 0.291924,45°无疾跑跳跃为 1.0……)
- 是跳跃后的移动乘数(45°斜疾跑为 1.3,正常疾跑为 1.274,无疾跑45°为 1.0……)
垂直运动(跳跃)[1.8]
跳跃后的垂直速度()
跳跃后的相对高度()
对于 的情况,见下文。
垂直运动(跳跃)[1.9+]
跳跃后的垂直速度()
跳跃后的相对高度()
水平运动(落地跳跃)
假设玩家在跳跃前已经在空中。
疾跑跳跃后的水平速度()
疾跑跳跃距离()
注意:这些公式对于大多数 的值来说都是准确的,但是一些负值会在某个时间点触发速度阈值并重置玩家速度,从而使这些公式不准确。
水平运动(延后跳跃)
假设玩家在跳跃前已经落地(至少在落地后的 1 刻起跳)
疾跑跳跃的水平速度()
疾跑跳跃距离()
进阶公式
在周期为 的助跑上连续疾跑跳跃 次后的水平速度(,)。
如果第一次疾跑跳跃为 delay,则 乘以 0.6。