Nonrecursive Movement Formulas: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(deleted numeric approximations)
(deleted examples)
Line 1: Line 1:
__NOTOC__
__NOTOC__
Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive formulas 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 formulas 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.






Line 9: Line 7:
* <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: t=12 on flat ground, see '''Jump Duration''')
*<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°...)




== Vertical Movement (jump) [1.8] ==
== Vertical Movement (jump) [1.8] ==
Vertical speed after jumping (<math>t \geq 6</math>)
Vertical speed after jumping (<math>t \geq 6</math>)

{| class="wikitable"
!<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>

|}

Relative height after jumping (<math>t \geq 6</math>)
Relative height after jumping (<math>t \geq 6</math>)

{| class="wikitable"
!<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>

|}


For <math display="inline">t<6</math>, see below.
For <math display="inline">t<6</math>, see below.
Line 28: Line 27:
== Vertical Movement (jump) [1.9+] ==
== Vertical Movement (jump) [1.9+] ==
Vertical speed after jumping (<math>t \geq 1</math>)
Vertical speed after jumping (<math>t \geq 1</math>)

{| class="wikitable"
!<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>

|}


Relative height after jumping (<math>t \geq 0</math>)
Relative height after jumping (<math>t \geq 0</math>)

{| class="wikitable"
!<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 43: Line 42:


Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)

{| class="wikitable"
!<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>

|}

Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)

{| class="wikitable"
!<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>

|}


'''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.
Line 58: Line 58:


Horizontal speed after sprintjumping (<math>t \geq 2</math>)
Horizontal speed after sprintjumping (<math>t \geq 2</math>)

{| class="wikitable"
!<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>

|}

Sprintjump distance (<math>t \geq 2</math>)
Sprintjump distance (<math>t \geq 2</math>)

{| class="wikitable"
!<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 70: Line 71:
== Advanced Formulas ==
== Advanced Formulas ==
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>).

:<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>


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
{| class="wikitable"
!<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>
|}


== Examples ==

*<math>Y_{rel}(60) </math> gives the relative height of the player 3 seconds (60 ticks) after jumping.
*<math>\textrm{Dist}(0,12)</math> gives the jump distance on flat ground with no initial speed.
*<math>\textrm{Dist}( V_H(0,12) ,9)</math> gives the distance of a +1 jump with one sprintjump of flat momentum as initial speed.
*<math>\textrm{Dist}(V^{10}_H(0,2), 12) </math> gives the jump distance with 10 sprintjumps of momentum under a trapdoor-headhitter.

Revision as of 19:54, 30 August 2020

Since arithmetico-geometric sequences have explicit formulas, we can build non-recursive formulas 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: t=12 on flat ground, see Jump Duration)
  • 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