Internal velocity: Difference between revisions

Ellucinea (talk | contribs)
mNo edit summary
m introduced max base speed + miscellaneous edits
Line 2: Line 2:


== Overview ==
== Overview ==
IV is represented as a vector, with a direction and magnitude. The direction of the IV vector is the same (or very close) as the vehicle's facing direction in most circumstances. On outside-drift vehicles, the IV vector can deviate by up to ~45° from the facing direction during a drift.
IV is represented as a vector, with a direction and magnitude. The direction of the IV vector is the same (or very close) as the vehicle's facing direction in most circumstances. On outside-drift vehicles, the IV vector can deviate by up to ~45° from the facing direction during a drift, and even more during [[superhopping]].


The magnitude of the IV vector is limited by '''maximum speed'''. IV is the speed actually provided by the engine, and it cannot increase above the maximum speed value (or decrease below, if moving backwards). Max speed is capped at 120 u/f, and the sum of IV, EV, and moving road speed is capped at 120 u/f too.
The magnitude of the IV vector is limited by '''maximum speed'''. IV is the speed actually provided by the engine, and it cannot increase above the maximum speed value (or decrease below, if moving backwards). Max speed is capped at 120 u/f, and the sum of IV, EV, and moving road speed is capped at 120 u/f too. '''Maximum base speed''' refers to the max speed value without any modifiers.


IV determines if the vehicle can perform certain actions. [[Trick |Tricking]] and [[Drift |drifting]] require IV to be over 50% and 55% of maximum speed, respectively. If IV is below 30% of maximum speed, [[Wheelie | wheelies]] can be started but are canceled automatically. [[Stand-still miniturbo | Stand-still miniturbos]] can only be sustained if IV is within ±10 u/f, and the [[barrel roll]] state ends if IV exceeds ±15 u/f. [[EV#Leaning | Lean rotation]] values change depending if IV is above or below 5 u/f in absolute value.
IV determines if the vehicle can perform certain actions. [[Drift | Drifting]] requires IV to be over 55% of max base speed. If IV is below 30% of max base speed, [[Wheelie | wheelies]] can be started but are canceled automatically. [[Trick | Tricking]] requires the magnitude of IV to be over 50% of max base speed instead, making it possible to trick at high negative IV. [[Stand-still miniturbo | Stand-still miniturbos]] can only be sustained if IV is within ±10 u/f, and the [[barrel roll]] state ends if IV exceeds ±15 u/f. [[EV#Leaning | Lean rotation]] values change depending if IV is above or below 5 u/f in magnitude.


== Changes to internal velocity ==
== Changes to internal velocity ==


=== Increase ===
=== Increase ===
Holding A increases IV according to the vehicle's [[Statistic#Acceleration | acceleration stat]]. Acceleration is a function of the percentage of IV relative to max speed.
Holding A increases IV according to the vehicle's [[Statistic#Acceleration | acceleration stat]]. Acceleration is a function of the percentage of IV relative to current max speed, thus being in a wheelie or on offroad affects the vehicle's acceleration.


While driving backwards, reversing (holding B) increases negative IV by 2 u/f^2, up to -20 u/f.
While driving backwards, reversing (holding B) increases negative IV by 2 u/f^2, up to -20 u/f.


While a [[boost]] is active, a constant acceleration is applied to IV, so that the vehicle can reach its new maximum speed. The acceleration depends on the type of boost: 7 u/f^2 for mushrooms, 6 u/f^2 for [[trick]] boosts, 5 u/f^2 for boost panels, 3 u/f^2 for [[Miniturbo |miniturbos]], 0.7 u/f^2 for drafts. If multiple boost accelerations are active, they do not stack and only the biggest is applied (except for tricks which have priority).
While a [[boost]] is active, a constant acceleration is applied to IV, so that the vehicle can reach its new maximum speed. The acceleration depends on the type of boost: 7 u/f^2 for mushrooms, 6 u/f^2 for [[trick]] boosts, 5 u/f^2 for boost panels, 3 u/f^2 for [[Miniturbo | miniturbos]], 0.7 u/f^2 for drafts. If multiple boost accelerations are active, they do not stack and only the biggest is applied (except for tricks which have priority).


=== Decrease ===
=== Decrease ===
If both A and B are released, IV decays exponentially at a rate of 2% per frame.<br>
If both A and B are released, IV decays exponentially at a rate of 2% per frame.
Braking decreases IV, applying a constant acceleration of -1.5 u/f^2 starting on the 2nd brake frame.
 
Braking decreases IV, applying a constant acceleration of -1.5 u/f^2 starting on the 2nd brake frame. Braking for 1 frame only reduces IV very slightly, with the slowdown being stronger if the vehicle's last-stage acceleration is low and on steeper slopes (both up and down); this is useful to manipulate [[QM]].


If a vehicle has been airborne for over 5 frames, its IV begins decaying exponentially at a rate of 0.1% per frame, until it touches the ground again.
If a vehicle has been airborne for over 5 frames, its IV begins decaying exponentially at a rate of 0.1% per frame, until it touches the ground again.
Line 25: Line 26:
During a [[stand-still miniturbo]], IV decays exponentially at a rate of 20% per frame.
During a [[stand-still miniturbo]], IV decays exponentially at a rate of 20% per frame.


On manual drift, turning without a boost decreases IV. The slowdown is proportional to the magnitude of the horizontal stick input, but it is also a function of the acceleration, [[Statistic#Handling |handling]], top speed, and handling reactivity stats. This slowdown stacks with deceleration from releasing A+B or braking, so holding hard left/right while decelerating usually loses speed faster. [[Wheelie#Optimal wheelie turning |Optimal wheelie turning]] is the sequence of inputs which allows for the most turning in a wheelie without losing IV over time; it can be derived mathematically and changes for each character + bike combo.   
On manual drift, turning without a boost decreases IV. The slowdown is proportional to the magnitude of the horizontal stick input, but it is also a function of the acceleration, [[Statistic#Handling | handling]], top speed, and handling reactivity stats. This slowdown stacks with deceleration from releasing A+B or braking, so holding hard left/right while decelerating loses speed faster. [[Wheelie#Optimal wheelie turning | Optimal wheelie turning]] is the sequence of inputs which allows for the most turning in a wheelie without losing IV over time; it can be derived mathematically and changes for each character + bike combo.   


The waterfalls on [[DS Yoshi Falls]], and at the last turn of [[Koopa Cape]], are [[moving road]] which slows down the vehicle, by disabling boost acceleration and decreasing IV by 0.5% and 3.5% per frame respectively. Both effects are disabled if the vehicle has offroad immunity. Since the waterfalls are not offroad, they do not affect maximum speed.
The waterfalls on [[DS Yoshi Falls]], and at the last turn of [[Koopa Cape]], are [[moving road]] which slows down the vehicle, by disabling boost acceleration and decreasing IV by 0.5% and 3.5% per frame respectively. Both effects are prevented if the vehicle has offroad immunity. Since the waterfalls are not offroad, they do not affect maximum speed.


At sufficiently high IV, the cones on [[Daisy Circuit]] are knocked away and decrease IV by 18% upon collision. At low IV, the cones are simply pushed around and do not affect IV.
At sufficiently high IV, the cones on [[Daisy Circuit]] are knocked away and decrease IV by 18% upon collision. At low IV, the cones are simply pushed around and do not affect IV.
Line 33: Line 34:
=== Other ===
=== Other ===


[[Wallclip |Hitting a wall]] updates the IV direction to match the horizontal (XZ) facing direction. If the vehicle has been airborne for 5 frames or more, then IV matches the vertical facing direction too.
[[Wallclip | Hitting a wall]] updates the IV direction to match the horizontal (XZ) facing direction. If the vehicle has been airborne for 5 frames or more, then IV matches the vertical facing direction too.


EV can be converted to IV. EV is either (almost) perpendicular to the facing direction, or purely vertical while airborne in the case of gravity; if the facing angle changes such that EV is partially parallel to it, the projection of EV on the facing unit vector is converted to IV.
EV can be converted to IV. EV is either (almost) perpendicular to the facing direction, or purely vertical while airborne in the case of gravity; if the facing angle changes such that EV is partially parallel to it, the projection of EV on the facing unit vector is converted to IV.
Line 40: Line 41:


== Maximum speed ==
== Maximum speed ==
Maximum speed acts as the limit of IV; if the vehicle's IV were to increase over max speed, it is set equal to the max speed instead. The value of maximum speed is affected by the [[Statistics#Speed |top speed]] stat, ranging from 75.00 to 86.13 u/f.<br>
Maximum speed acts as the limit of IV; if the vehicle's IV were to increase over max speed, it is set equal to the max speed instead. The value of maximum speed is affected by the [[Statistics#Speed | top speed]] stat, ranging from 75.00 to 86.13 u/f.<br>
Maximum speed is a positive value, but it limits both positive and negative IV. If IV is negative, its absolute value can't increase above maximum speed.
Maximum speed is a positive value, but it limits both positive and negative IV. If IV is negative, its absolute value can't increase above maximum speed.


Line 51: Line 52:
=== Decrease ===
=== Decrease ===


When a boost or wheelie ends, maximum speed does not immediately jump to a lower value; it decreases at a constant rate of 3 u/f^2, bringing IV down with it, until it reaches the regular top speed value. Deceleration from multiple sources does not stack; for instance, bikes can drop the wheelie while decelerating from a boost, without any penalty to their max speed.
When a boost or wheelie ends, maximum speed does not immediately jump to a lower value; it decreases at a constant rate of 3 u/f^2, bringing IV down with it, until it reaches the regular top speed value. Deceleration from multiple sources does not stack; for instance, bikes can drop the wheelie while decelerating from a boost, without any penalty to their max speed. This is known as '''deceleration stacking'''.


Touching offroad works similarly; as long as at least one hitbox is colliding with offroad, maximum speed decreases by 3 u/f^2, until reaching max offroad speed. This value depends on the offroad type, and is a function of the speed and [[Statistics#Offroad | offroad]] stats. This means that clipping offroad for N frames only reduces max speed by 3N. Offroad deceleration also doesn't stack with wheelie and boost deceleration.
Touching offroad works similarly; as long as at least one hitbox is colliding with offroad, maximum speed decreases by 3 u/f^2, until reaching max offroad speed. This value depends on the offroad type, and is a function of the speed and [[Statistics#Offroad | offroad]] stats. This means that clipping offroad for N frames only reduces max speed by 3N. Offroad deceleration also doesn't stack with wheelie and boost deceleration.
Line 67: Line 68:
After 4 frames, IV and max speed are at 100.60 and 103.56 u/f respectively, so the Spear has not slowed down yet. On the next frame, max speed would decrease to 100.56 u/f, and so would IV; but if the Spear stops touching offroad, then max speed jumps to 115.56 u/f again, and IV continues increasing. As a result, the Spear is able to drive over offroad for 4 frames without speed loss, because it is accelerating from the boost.
After 4 frames, IV and max speed are at 100.60 and 103.56 u/f respectively, so the Spear has not slowed down yet. On the next frame, max speed would decrease to 100.56 u/f, and so would IV; but if the Spear stops touching offroad, then max speed jumps to 115.56 u/f again, and IV continues increasing. As a result, the Spear is able to drive over offroad for 4 frames without speed loss, because it is accelerating from the boost.


Another less common application is [[Automatic drift#Rewheelies |rewheelies]] for automatic. Starting a wheelie after a drift increases max speed by 15%, while IV slowly matches it. Dropping the wheelie by holding ±6/±7 for 16 frames decreases max speed by 3 u/f^2, but IV is still much lower, so the bike is able to turn tighter for a few frames without losing speed. This can be looped to improve the bike's turning out of a drift without affecting its IV.
Another less common application is [[Automatic drift#Rewheelies | rewheelies]] for automatic. Starting a wheelie after a drift increases max speed by 15%, while IV slowly matches it. Dropping the wheelie by holding ±6/±7 for 16 frames decreases max speed by 3 u/f^2, but IV is still much lower, so the bike is able to turn tighter for a few frames without losing speed. This can be looped to improve the bike's turning out of a drift without affecting its IV.