Iwerlipse: Difference between revisions

Jump to navigation Jump to search
No change in size ,  16 October 2025
m
change headings to sentence casing
m (add info about SM64 Lua Redux integration)
m (change headings to sentence casing)
Line 27: Line 27:
In terms of total distance acquired along some direction, forward velocity is thus more effective over long periods of time, where it has time to accelerate to large values, whereas sideways speed is more effective over short periods of time. Optimal straining over many frames then involves straining mostly along the forwards direction to build up a large forward velocity, and then towards the end of the trajectory, transitioning into sideways straining to exploit the large sideways displacement obtainable in a single frame.
In terms of total distance acquired along some direction, forward velocity is thus more effective over long periods of time, where it has time to accelerate to large values, whereas sideways speed is more effective over short periods of time. Optimal straining over many frames then involves straining mostly along the forwards direction to build up a large forward velocity, and then towards the end of the trajectory, transitioning into sideways straining to exploit the large sideways displacement obtainable in a single frame.


==Update Equations==
==Update equations==


When Mario is in the air and cannot turn, the function <code>update_air_without_turn</code> is responsible for updating Mario's velocity variables from one frame, <math>t-1</math>, to the next, <math>t</math>. Without loss of generality, we can choose coordinates so that Mario's facing angle is zero. In other words, he is facing along the <math>z</math>-axis, while his sideways speed is directed along the <math>x</math>-axis. Mario's forward velocity, <math>v_t</math>, and position coordinates <math>z_t</math> and <math>x_t</math> are then updated via
When Mario is in the air and cannot turn, the function <code>update_air_without_turn</code> is responsible for updating Mario's velocity variables from one frame, <math>t-1</math>, to the next, <math>t</math>. Without loss of generality, we can choose coordinates so that Mario's facing angle is zero. In other words, he is facing along the <math>z</math>-axis, while his sideways speed is directed along the <math>x</math>-axis. Mario's forward velocity, <math>v_t</math>, and position coordinates <math>z_t</math> and <math>x_t</math> are then updated via
Line 66: Line 66:
Notice that, since forward straining produces an acceleration that is not reset between frames, earlier frames have a stronger effect on the final <math>z</math> position than later frames. The effective strength is <math>1.5(T+1-t)</math>, i.e. 1.5 multiplied by the number of frames remaining (including the current frame), since the forward velocity gained on one frame produces a displacement also on all remaining frames.
Notice that, since forward straining produces an acceleration that is not reset between frames, earlier frames have a stronger effect on the final <math>z</math> position than later frames. The effective strength is <math>1.5(T+1-t)</math>, i.e. 1.5 multiplied by the number of frames remaining (including the current frame), since the forward velocity gained on one frame produces a displacement also on all remaining frames.


==Arctan Straining Proof==
==Arctan straining proof==


The displacement vector after <math>T</math> frames is
The displacement vector after <math>T</math> frames is
Line 103: Line 103:
Since <math>\tan(x) = \tan(x\pm180^\circ)</math>, this equation has two solutions for <math>\phi_t</math> which are given above.
Since <math>\tan(x) = \tan(x\pm180^\circ)</math>, this equation has two solutions for <math>\phi_t</math> which are given above.


== Iwerlipse Equations ==
== Iwerlipse equations ==


By writing <math>\sin(\phi_t)</math> and <math>\cos(\phi_t)</math> in terms of <math>\tan(\phi_t)</math>, and using the optimal straining relation, we obtain exact expressions for the boundary of the Iwerlipse after <math>T</math> frames:
By writing <math>\sin(\phi_t)</math> and <math>\cos(\phi_t)</math> in terms of <math>\tan(\phi_t)</math>, and using the optimal straining relation, we obtain exact expressions for the boundary of the Iwerlipse after <math>T</math> frames:
Line 146: Line 146:
Unlike the integral approximation, this expression never converges to the exact result — there is always some small error.
Unlike the integral approximation, this expression never converges to the exact result — there is always some small error.


== Quarterstep Penalty ==
== Quarterstep penalty ==


If <math>q \in {0,1,2,3}</math> quartersteps are lost on the final frame,
If <math>q \in {0,1,2,3}</math> quartersteps are lost on the final frame,
Line 219: Line 219:
sm64expert adds arctan straining to [https://github.com/mupen64/SM64LuaRedux SM64 Lua Redux].
sm64expert adds arctan straining to [https://github.com/mupen64/SM64LuaRedux SM64 Lua Redux].


==See Also==
==See also==
[[Straining]]
[[Straining]]


477

edits

Navigation menu