Miniturbo: Difference between revisions

Created page with "The '''miniturbo''', or '''mini-turbo''' is a speed boost technique present in every Mario Kart game. == Overview == When performing a drift, assuming you are using manual transmission, a miniturbo will charge up after a certain period of time, and when you release the drift, you will get a boost from this miniturbo. Miniturbos charge at different rates depending on the joystick direction held during the drift. Although the GCN joystick has an input range from 0 to 255..."
 
Ellucinea (talk | contribs)
m double luke's rule for karts
 
(7 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The '''miniturbo''', or '''mini-turbo''' is a speed boost technique present in every Mario Kart game.
:''Not to be confused with [[Stand-still miniturbo]].''
The '''miniturbo''', or '''mini-turbo''' / '''MT''' is a speed boost technique present in ''[[Mario Kart Wii]]''. Miniturbos can only be performed on manual transmission; they are disabled for [[automatic drift]].


== Overview ==
== Overview ==
When performing a drift, assuming you are using manual transmission, a miniturbo will charge up after a certain period of time, and when you release the drift, you will get a boost from this miniturbo. Miniturbos charge at different rates depending on the joystick direction held during the drift. Although the GCN joystick has an input range from 0 to 255 on both axes, all inputs are simplified and reduced down to an input range from 0 to 14 on both axes. These are also referred to as -7 to +7 to ease understanding even more. Miniturbo charge is a numerical value that counts upwards from 0. If you are performing a right drift, any input from -7 to +2 will increase that value an increment of 2 every frame, and any input from +3 to +7 will increase that value an increment of 5 every frame. Conversely, if you are performing a left drift, any input from +7 to -2 will increase that value an increment of 2 every frame, and any input from -3 to -7 will increase that value an increment of 5 every frame.
Miniturbos charge over time while drifting, with an integer value tracking progress (the '''miniturbo charge'''). After a miniturbo is charged, ending the drift triggers a brief speed boost, adding 20% to maximum [[IV]]. There are two tiers of miniturbos in Mario Kart Wii: a standard miniturbo, displayed by blue sparks at the rear wheel(s), and a '''super miniturbo''' / '''SMT''', displayed by orange sparks. Super miniturbos are only available to karts.


== Types ==
The rate of charge of a miniturbo depends on the horizontal stick input held during the drift. There are 15 possible horizontal stick inputs, ranging from -7 to +7. For inputs between +3 and +7 during a right drift, or -3 to -7 during a left drift, the miniturbo charge increases by 5 each frame. Otherwise, the miniturbo charge increases by 2 each frame.
There are three types of miniturbos in [[Mario Kart Wii]]:


=== Standard Miniturbo ===
Standard miniturbos can be released from the frame ''after'' the charge is ''strictly greater'' than 270. Therefore, miniturbos take anywhere between 55 and 136 frames to charge. On karts, the super miniturbo's progress is tracked by a separate charge value that starts increasing once the first charge value exceeds 270; the SMT is charged when its charge value exceeds 300, which takes between 61 and 151 additional frames. Small blue and orange sparks appear when the charge values reach 150 and 180, respectively, but they are purely cosmetic.
These is the most common type of miniturbo. It is charged when miniturbo charge reaches 271, and is possible on both bikes and karts. Upon reaching 148 charge, blue sparks begin appearing at the back of the bike.


=== Super Miniturbo ===
The boost length depends on the [[Statistic#Miniturbo | miniturbo statistic]], affected by both vehicle and character choice. Standard miniturbos can be as short as 15 frames (Jetsetter + Waluigi, Bowser, King Boo, or Funky Kong) and as long as 48 frames (Bullet Bike + Koopa Troopa or Dry Bones). Super miniturbos are always three times as long as a standard miniturbo; the length ranges from 45 to 141 (Mini Beast + Koopa Troopa or Dry Bones).
This miniturbo is only possible on karts. It is charged when miniturbo charge reaches 571. The player may be tempted to release the miniturbo after a standard miniturbo is charged, but should they continue to hold the drift, orange sparks will appear, indicating a longer miniturbo.


=== Standstill Miniturbo ===
== Techniques ==
This miniturbo can be charged by holding accelerate and brake (A and B) simultaneously when [[Internal velocity | IV]] is between -10 and 10.
On bikes, miniturbos are used after nearly every turn to quickly accelerate from drift speed to max wheelie speed. Miniturbos replace the bike's regular (slow) acceleration with a constant 3 u/f^2 acceleration while they're active, making it effortless to reach max speed in a miniturbo. This is an important reason why manual transmission is almost always better than automatic; due to the lack of miniturbos, auto bikes have to slowly accelerate up to wheelie speed out of every turn.


== Softdrift ==
=== Softdrift ===
:''Main article: [[Drift#Softdrift]]
As mentioned earlier, the charge rate is the same for all inputs between +3 and +7 during a right drift. Therefore, holding +3 gives a much wider drift trajectory than holding +7 would, without delaying the miniturbo release at all.


== Luke's Rule ==
=== Luke's rule ===
Reference Campbell's sheet here
Recall earlier that (standard) miniturbos can be released when the charge value is strictly greater than 270. In a right drift, holding +3 to +7 for 54 frames gives a charge value of exactly 270, but the miniturbo is not considered charged until the next frame (and can first be released frame after). Replacing one frame with a +2 to -7 input decreases the charge of 267, which allows for a wider drift without delaying the miniturbo charge.
 
This off-by-one oddity is known as '''Luke's rule'''. While the most common use case is described above, it can be useful for mixed drifts too. Depending on how many countersteer inputs have been performed, sometimes one countersteer input can be added without delaying the miniturbo, while others it will delay the miniturbo charge by one frame. In particular, Luke's rule applies if the number of countersteer frames in the drift is 0 or 2 mod 5.<ref>[https://docs.google.com/spreadsheets/d/1GFpKnkULNgec2HIKeK1HCcDSgQ37BknheY3tzoTl5vY/edit?gid=0#gid=0 Google Sheets]</ref>
 
Luke's rule can be used twice when charging super miniturbos: once while the initial charge value increases to 270, and once more while the second charge value increases to 300.


== Relevant code ==
== Relevant code ==
For Vabold.
<syntaxhighlight lang="cpp" line="1">
// TODO: context, comments
// NOTE: This has not been confirmed to match yet, but is at least functionally equivalent
void Kart::KartMove::calcMtCharge() {
    if (mDriftState >= 3) {
        return;
    }
 
    KartState *state = mAccessor->getState();
    if (state->mFlags & ONLINE_REMOTE) {
        return;
    }
 
    addMtCharge(1, mMtCharge, BASE_MT_CHARGE, MAX_MT_CHARGE);
    addMtCharge(2, mSmtCharge, BASE_SMT_CHARGE, MAX_SMT_CHARGE);
}
 
bool Kart::KartMove::addMtCharge(s32 driftState, s16 &mtCharge, s16 baseMtCharge, s16 maxMtCharge) {
    bool charged = false;
    if (mDriftState == driftState) {
        mtCharge += baseMtCharge;
        addExtraMtCharge(mtCharge, EXTRA_MT_CHARGE, NO_EXTRA_MT_CHARGE, BONUS_CHARGE_STICK_THRESHOLD);
        if (checkMtCharge(mtCharge, maxMtCharge)) {
            charged = true;
            ++mDriftState;
        }
    }
    return charged;
}
 
void Kart::KartMove::addExtraMtCharge(s16 &mtCharge, s16 left, s16 right, f32 bonusStickChargeThreshold) const {
    s16 leftTurningBonus = left;
    s16 rightTurningBonus = right;
    if (mHopStickX == -1) {
        leftTurningBonus = right;
        rightTurningBonus = left;
    }
 
    f32 stickX = mAccessor->getState()->getStickX();
    if (stickX < -bonusStickChargeThreshold) {
        mtCharge += leftTurningBonus;
    } else if (stickX > bonusStickChargeThreshold) {
        mtCharge += rightTurningBonus;
    }
}
 
// This function is never seen anywhere in the binary
// However, it's heavily speculated to exist due to the assembly instructions
inline bool Kart::KartMove::checkMtCharge(s16 &mtCharge, s16 maxMtCharge) {
    if (maxMtCharge < mtCharge) {
        mtCharge = maxMtCharge;
        return true;
    }
    return false;
}
</syntaxhighlight>
 
== References ==
<references/>