Nonrecursive Movement Formulas: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Prepared the page for translation)
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:1-->
__NOTOC__
__NOTOC__
Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive functions to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.
Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive functions to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.




<!--T:2-->
'''Definitions:'''
'''Definitions:'''


<!--T:3-->
* <math display="inline">v_0</math> is the player's initial speed (speed on <math>t_0</math>, before jumping)
* <math display="inline">v_0</math> is the player's initial speed (speed on <math>t_0</math>, before jumping)
* <math display="inline">t</math> is the number of ticks considered (ex: t=12 on flat ground, see '''Jump Duration''')
* <math display="inline">t</math> is the number of ticks considered (ex: the jump duration on flat ground is t=12, see [[Special:MyLanguage/Tiers|Tiers]])
* <math display="inline">J</math> is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
* <math display="inline">J</math> is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
* <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°...)
* <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°...)
Line 14: Line 17:




== Vertical Movement (jump) [1.8] ==
== Vertical Movement (jump) [1.8] == <!--T:4-->


<!--T:5-->
Vertical speed after jumping (<math>t \geq 6</math>)
Vertical speed after jumping (<math>t \geq 6</math>)


<!--T:6-->
:<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>




<!--T:7-->
Relative height after jumping (<math>t \geq 6</math>)
Relative height after jumping (<math>t \geq 6</math>)


<!--T:8-->
:<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>
:<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>




<!--T:9-->
For <math display="inline">t<6</math>, see below.
For <math display="inline">t<6</math>, see below.






== Vertical Movement (jump) [1.9+] ==
== Vertical Movement (jump) [1.9+] == <!--T:10-->


<!--T:11-->
Vertical speed after jumping (<math>t \geq 1</math>)
Vertical speed after jumping (<math>t \geq 1</math>)


<!--T:12-->
:<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>




<!--T:13-->
Relative height after jumping (<math>t \geq 0</math>)
Relative height after jumping (<math>t \geq 0</math>)


<!--T:14-->
:<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>


Line 45: Line 57:




== Horizontal Movement (instant jump) ==
== Horizontal Movement (instant jump) == <!--T:15-->


<!--T:16-->
Assuming the player was airborne before jumping.
Assuming the player was airborne before jumping.


<!--T:17-->
Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)


<!--T:18-->
:<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>




<!--T:19-->
Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)


<!--T:20-->
:<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>




<!--T:21-->
'''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.
'''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.






== Horizontal Movement (delayed jump) ==
== Horizontal Movement (delayed jump) == <!--T:22-->


<!--T:23-->
Assuming the player is on ground before jumping (at least 1 tick since landing).
Assuming the player is on ground before jumping (at least 1 tick since landing).


<!--T:24-->
Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)


<!--T:25-->
:<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>




<!--T:26-->
Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)


<!--T:27-->
:<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>


Line 80: Line 103:




== Advanced Formulas ==
== Advanced Formulas == <!--T:28-->


<!--T:29-->
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>).
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>).


<!--T:30-->
:<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>


<!--T:31-->
If the first sprintjump is delayed, multiply <math display="inline">v_0</math> by 0.6
If the first sprintjump is delayed, multiply <math display="inline">v_0</math> by 0.6
</translate>
</translate>

Latest revision as of 11:03, 29 June 2022

Other languages:

Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive functions to calculate simple but useful results, such as the height of the player on any given tick, or the distance of a jump in terms of the initial speed and duration.


Definitions:

  • is the player's initial speed (speed on , before jumping)
  • is the number of ticks considered (ex: the jump duration on flat ground is t=12, see Tiers)
  • is the "jump bonus" (0.3274 for sprintjump, 0.291924 for strafed sprintjump, 0.1 for 45° no-sprint jump...)
  • is the movement multiplier after jumping (1.3 for 45° sprint, 1.274 for normal sprint, 1.0 for no-sprint 45°...)


Vertical Movement (jump) [1.8]

Vertical speed after jumping ()


Relative height after jumping ()


For , see below.


Vertical Movement (jump) [1.9+]

Vertical speed after jumping ()


Relative height after jumping ()



Horizontal Movement (instant jump)

Assuming the player was airborne before jumping.

Horizontal speed after sprintjumping ()


Sprintjump distance ()


Note: These formulas are accurate for most values of , 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.


Horizontal Movement (delayed jump)

Assuming the player is on ground before jumping (at least 1 tick since landing).

Horizontal speed after sprintjumping ()


Sprintjump distance ()



Advanced Formulas

Horizontal speed after consecutive sprintjumps on a momentum of period (, ).

If the first sprintjump is delayed, multiply by 0.6