Resource icon

[Reusable] Kart Slipstream / Drafting

This adds Mario Kart styled Slipstreaming/Drafting to SRB2Kart!

Draft (follow) behind another racer to gain a tiny speed boost and gain small grey speed lines.
Do this for long enough, and you'll charge a full Slipstream, resulting in a boost to your top speed, and character skin colored speed lines.

The attached gifs explain better than words can, so take a look!

A common Slipstream slingshot:
View attachment 14591
But watch out, following other players can be dangerous. Risk vs. reward:
View attachment 14592

Mechanics to be aware of:
- The default angle tolerance is 10 degrees. This means the person in front of you can be at most 10 degrees off from your heading for drafting to occur.
- Slipstream mostly increases your speed, but not acceleration. This means acceleration characters tend to make better use of it.
- Pre-Slipstream drafting gives a small speed boost scaled by speed stat to help acceleration characters with tailing speed characters. It scales from 15% at 1 speed to 0% at 9 speed.
- The full Slipstream speedboost is 50% (sneaker) for a speed 1 character and 25% (miniturbo) for a speed 9 character. Other speed stats fall linearly between. This may seem powerful, but since the acceleration boost (10%) is minimal it takes a second to kick in, and is less instant than a sneaker or miniturbo, which boost your acceleration a lot.
- You can't charge Slipstream while either racer is ghosting or airborne, or while you are drifting.

Almost all aspects of this script can be tweaked.
Full cvar list, with defaults:
- slipstream_enabled, on: Turns the whole script on/off
- slipstream_colorized, on: makes the full slipstream colored with skin color. Off will make the full lines grey like the small ones. not a netvar.
- slipstream_reminder, on: A chat reminder of the mechanic, not a netvar.
- slipstream_maxdistance, 1500: Max distance between you and another racer for valid slipstreaming. In Fracunits.
- slipstream_t2chargedist, 1050: At less than this distance you charge a full slipstream twice as fast. In Fracunits.
- slipstream_t3chargedist, 400: At less than this distance you charge a full slipstream thrice as fast. In Fracunits.
- slipstream_maxangle, ANG10: Angle from your heading any racer must be for valid slipstreaming, expressed as a fixed number.
- slipstream_chargetoboost, 122: How much drafting time is required to charge a full slipstream. 1 per tic at max distance.
- slipstream_boosttime, 70: How long the Slipstream boost lasts after you're no longer drafting, -1 per tic.
- slipstream_minimumspeed. 32: The minimum speed in FracUnits/Tic that both you and your opponent must be going for drafting to occur.
- slipstream_maxspeedboostpercent, 50: The speed boost a speed 1 character gets when Slipstreaming.
- slipstream_minspeedboostpercent, 25: The speed boost a speed 9 (or higher) character gets when Slipstreaming.
- slipstream_accelboostpercent, 10: The acceleration boost all characters get when Slipstreaming.
- slipstream_maxdraftspeedboostpercent, 15: The speed boost a speed 1 character gets for drafting.
- slipstream_mindraftspeedboostpercent, 0: The speed boost a speed 9 (or higher) character gets for drafting.

I originally modeled this after Mario Kart Wii, before tethering in Kart was announced. Any similarities to the tethering teaser are coincidental.
Thanks to Purpsky, who helped me test this in the later stages, and DarkyBenji, who recorded the nice gifs you see here.
  • BlazeSlipstream.gif
    BlazeSlipstream.gif
    6.9 MB · Views: 131
  • LilicSlipstreamJawz.gif
    LilicSlipstreamJawz.gif
    2.7 MB · Views: 124
  • Slipstream03.gif
    Slipstream03.gif
    7.2 MB · Views: 84
  • Slipstream04.gif
    Slipstream04.gif
    6.3 MB · Views: 124
  • Cool!
Reactions: Lonsfor
Author
Ashnal
Views
566
First release
Last update
Rating
0.00 star(s) 0 ratings

Share this resource

Top