Paragliders

[Open Assets] Paragliders 1.0.3

I made sure my file(s) follow the Submissions Guidelines
  1. Yes
Presented to you by JugadorXEI, minenice, Fayt, Tiniest Turtles and Mr.Logan...

Paragliders!
PRES.png

Paragliders are a whole new mechanic, tightly integrated into Kart's mechanics, that allows players to use paragliders to reach new heights and verticality never seen before in Kart! However, instead of being a balance addendum to the base game, they are instead added by mappers themselves, acting as a possible gimmick or even simply as a cool set-piece.

kart0415.gif
kart0416.gif

(As seen in Wandering Falls, by Diggle)

Gameplay features​

  • Paragliding players behave as if they were grounded while floating, meaning that they accelerate, and they can use Sneakers and Rocket Sneakers unlike before too, to allow for even more interesting paths and shortcuts.
  • Players are given a turn-rate while paragliding, dictated by their handling - the more handling, the better!
  • It's possible to hold up or down (Aim Forward and Backward respectively) to either get to the ground as soon as possible, or to flutter upwards, gaining an extra pinch of height!
  • And if all fails, hold BRAKE to let go to the paraglider, dropping you to the ground!
  • It's possible to invert your controls using paraglider_invert off/on, in luafiles/paraglider.cfg. If the file doesn't exist, it will be created for you.
  • Wanna use Paragliders anywhere? Toggle paraglider_debug_deployanywhere on, and bind CUSTOM3 to a button - it will allow you to deploy a paraglider anywhere, which is helpful for testing and for fun!

    kart0418.gif
    kart0419.gif

Mapper features​

  • The script, visuals and sounds are all safe to pack into your levels and level packs - it's 100% conflict-proof.
  • It's possible to set up paraglider FoF triggers and removers, and it's possible to change their settings on the fly too.
  • Setting up paragliders that can't be let go, delays before being able to let go of the paraglider, and changing these settings later using FoF triggers are all available.
  • For FoF paraglider removers and changers, a unique sound will be played, which can be changed at your leisure.
  • There is a lot of interoperability with the already-existing base game mechanics - springs, speed pads and wind sectors and FoFs are all fair game!
  • Examples are also available, in case there's confusion about how everything works, as well as signs to help indicate paraglider spots.

3D Model​

If you wish for the Paraglider to use a 3D model, download PAGL_MD3.7z, and add its contents into the mdls/ folder inside your SRB2Kart folder. Then, open mdls.dat using a text editor, and add the following at the end of the file: PAGL PAGL/PAGL.md3 3.0 0.0.

Afterwards, you'll be seeing the paraglider in its full polygonal glory!

kart0452.gif

Documentation​

  • My dedicated server's console is getting spammed with configuration file creation messages, what's going on?
    • The user who is running Kart may not have write permissions to the luafiles folder, meaning paraglider.cfg can't be created. To fix this in a Linux dedicated, run chmod 775 luafiles, or create the file manually using touch paraglider.cfg within the luafiles folder (normally within ~/.srb2kart). This is rectified in 1.0.1.
Note: If the Paraglider pk3 is added directly as a resource in Zone Builder, it will throw a Lua error. It's safe to ignore and the script operates normally otherwise.

How to add glider triggers​

  1. Create a FoF.
    1. The FoF sector needs to have sector special 64 (Trigger Line Ex. (Anywhere in Sector)).
    2. The FoF linedef needs to be intangible. Linedefs 220 - 224 should work for this purpose.
    3. Within the FoF control sector, another linedef needs to be of type 443 (Call Lua Function). The front side upper and middle textures should have PARAGLID and ENABLE respectively.
      instructions.png
    4. Within the FoF control sector, another linedef needs to be 301 (Each Time). This is so the trigger always works with every player.
    5. Make sure the Each Time linedef and the control sector share the same tag.
This should result in players getting paragliders, so long as they're in the air and within the intangible FoF.

How to add glider removers​

The setup is the same as described with glider triggers, but instead of using PARAGLID ENABLE, you use PARAGLID REMOVE.
This removes paragliders immediately to prevent cheesing and plays a unique sound ("S3KD2S").
The sound can be changed by setting the linedef's backside texture to a sound name, e.g. "S3KBA".

How to set glider settings on the go through triggers​

The setup is the same as described with glider triggers, but instead of using PARAGLID ENABLE, you use PARAGLID OPTIONS.
This allows to change previously-set settings on PARAGLID ENABLE triggers without having to have players redeploy.
For example, you can make a section that disallows players from letting go, and then use this trigger to allow letting go in a safe area.
In addition, like glider removers, it plays a unique sound ("S224"), that can be changed by setting the linedef's backside texture to a sound name.

Parameters​

Linedef SettingFunctionDescription
[13] No Knuckles FlagPARAGLID ENABLEIf set, the player's paraglider will deploy instantly, instead of waiting out the time before it is possible to deploy.
[12] No Tails FlagPARAGLID ENABLE
PARAGLID OPTIONS
If set, the player will not be able to let go of their paraglider by holding Brake.
Frontside Texture X OffsetPARAGLID ENABLE
PARAGLID OPTIONS
Sets a delay, in tics, before the player can let go of their paraglider.
Backside Texture Texture NamePARAGLID REMOVE
PARAGLID OPTIONS
Sets the sound name that will be played when a player's paraglider gets removed, or their options change, respectively. Defaults to S3KD2S and S224, respectively.

Check the example map (which will be MAP01) for examples on how to put triggers in levels, and see how they work and behave with Kart's existing mechanics. Make sure to load the Paraglider addon as well if you do so!
Here, playerMo = player.mo

Variables​

State Control​

Variable NameDescription
playerMo.willParaglide (bool)Timer that increases until it reaches PG_STARTWINGTIMER.
When done, this variable will be set to zero, while playerMo.paragliding will be set to true.
playerMo.paragliding (bool)When set to true, the paragliding logic is enabled for this player.

Gameplay​

Variable NameDescription
playerMo.letGoGliderTimer (int)Timer used when a player is holding Brake (or overcharging with Acrobatics) while paragliding, increasing by one per tic up until LETGOGLIDERTIMER (which is TICRATE).
playerMo.allowedToLetGoOfGlider (bool)Controls if players can hold brake to let go of the glider.
It will be true if it's the case, false otherwise.
playerMo.ticsUntilLettingGoOfGlider (tic_t)Controls when a player will be able to let go of the paraglider through the set delay.
This will be leveltime + delay set, and the actual leveltime will be compared to, in order to know this.
playerMo.springInfluence (int)Timer that ticks up during the spring state, used when we want to enable gliding logic again.
When it reaches SPRINGINFLUENCETIMER, and the player falls down, this is set to zero.
It will also be set to zero if a spring is touched.
playerMo.storedGlideMomz (fixed_t)The momentum stored while paragliding, often obtained by going down or using an item.
playerMo.targetFallRt (fixed_t)The fall speed value of the player while paragliding.
playerMo.startFallVel (fixed_t)When a paraglider is deployed, this stores the player's initial momz they had before the deploy to be applied during the paraglider physics.
playerMo.glideFinBuffer (tic_t)Dictates "coyote time" - for how long the player can be on the ground with a paraglider before the paraglider goes away. Capped to PG_COYOTETIMETICS (5 tics)

Controls​

Variable NameDescription
playerMo.glideVerticalMovement (int)It directs if the vertical movement should be upwards or downwards. Capped to FRACUNIT and -FRACUNIT by logic.
player.invertParaglider (int)Handles vertical input.
It will be 1 for normal controls, and -1 for inverted controls.

Internals​

Variable NameDescription
playerMo.paraglideMobj (mobj_t)Points to the player's paraglider mobj.
player.holdingItemBTN (bool)Checks if the player is holding the item button.

Visuals and Sounds​

Variable NameDescription
playerMo.visonlyStoredStates (int)Indicates the visual status of the paraglider afterimages.
From -1 (none) to 2 (highest possible).
playerMo.wooshSoundCD (int)A cooldown that gets set when the player moves up with enough momentum.
It initiates the "woosh" sound when the player goes up.

Functions​

Anything not listed here should not be overridden or used, for the sake of the addon's stability.

Function NameDescription
jglider.isMobjValidPlayer(mobj_t)Simple check to know if the player and their mobj is valid.
jglider.FindSoundByName(string)Tries to find an sfx_ constant by name.
jglider.GetSoundOrFreeslotFromString(string)Uses FindSoundByName -- if it returns nil, then the sound name is freeslotted and this reference is passed by the function.
jglider.spawnParagliderWithStartup(mobj_t, boolean (useDefaults)) Designed to be used for player mobjs.
Spawns a paraglider on the player with the associated paraglider startup.
Set useDefaults to true to have the function set allowedToLetGoOfGlider and ticUntilLettingGoOfGlider to default values. (This is normally what you might want for interop, if needed.)
jglider.createParaglider(mobj_t)Designed to be used for player mobjs.
Creates a paraglider to mobj_t's position, mimicking various of its properties.
jglider.initParaglider(mobj_t)Opens up the glider with the corresponding logic.
Depending on the logic, playerMo.paragliding will need to be set to true.
jglider.resetGliderStuff(mobj_t)Designed to be used for player mobjs.
Resets various paraglider-related variables.
Used when a player falls down or gets hit.
jglider.resetGliderValues(mobj_t)Designed to be used for player mobjs.
Resets paraglider-related variables.
Internally used on deploy and when the paraglider is let go.
jglider.getTurnRateGlider(player_t)Returns the turn rate of the player's glider, based on their weight stat.

Credits & Special Thanks​

Made By:
  • JugadorXEI: Lead programmer.
  • minenice: Support programmer - laid a lot of groundwork reworking the physics and implementing extra useful features.
  • Fayt: Artist - created the flats and midtextures used to indicate Paraglider jumps.
  • Tiniest Turtles: Artist - created many of the sprites for the Paraglider.
  • Mr. Logan: (Concept) Artist - Drafted and created the groundwork for the first Paraglider sprites and how they should look.

Special Thanks:
  • Diggle: one of the Paragliders' first adopters ever since the first release candidates.
  • Mustard and Mizu: helped test the Paragliders in early release candidates.
  • AquaMonkey: encouraged me to finish this script for once and for all. Would probably have never been finished without their encouragement.
  • Marsh: Provided helpful feedback regarding visuals.
  • Also many thanks to everyone who helped test in Aqua's Karthouse's test servers!

Enjoy, and let me know if there's any questions, issues or concerns!
Author
JugadorXEI
Downloads
4,246
Views
11,111
First release
Last update

More resources from JugadorXEI

Share this resource

Latest updates

  1. 1.0.3

    Fixed infinite flight when the paraglider was removed early (fixes a Lua error). The paraglider...
  2. 1.0.2

    Config: Fixed a bug where higher versions of the configuration module would not override the...
  3. 1.0.1

    Config: Fixed a bug where, if the luafiles folder is set to read-only, or if paraglider.cfg...

Latest reviews

Fantastic! I'd wish mappers now be able to recreate mk 7, 8 and tour tracks with this marvelous tool, but id wish to see a proper tag or label to make searching maps/track packs with this implemented

So far I've found some releases making use of it!
Huge props for the team to make, polish and publish this and these works for us!

https://mb.srb2.org/addons/sxips-booster-port-course-pass.4999/
https://mb.srb2.org/addons/dig-pack.2308/
https://mb.srb2.org/addons/mustard-gas-pack-v1-1.2297/
https://mb.srb2.org/addons/cgs-smug-pack.4606/
Upvote 0
If you turn DeployAnywhere on and add Acrobatics, it can be...

So.
Fricking.
Broken.

And I love it.
Upvote 0
Great and fun mod! I really hope more people take notice of this and add it to some maps! It can create very interesting situations, and brand new shortcuts! Easy to control, setup, and enjoy! Thank you and great job!
Upvote 1
This is a amazing Mod but I very confused how do I set on the "deploy anytime" option on?
JugadorXEI
JugadorXEI
You need to toggle on the developer console (using the button above TAB, which changes depending on your type of keyboard), and either in-game or in the main menu screen, press this button. With the addon loaded, write "paraglider_debug_deployanywhere on". Then bind "Custom Action 3" in the Control Options to a key or button in your controller. More details about the console here: https://wiki.srb2.org/wiki/Console
Upvote 0
Ah yes, I remember SRB2 Kart *7*! Jokes aside, this addition is extremely cool! The amount of new levels of shortcuts and heights you can possibly achieve with these is numerous! They're also simple to control, so you'll get the hang of you in the 2nd, or possibly even 1st try. Plus, as mentioned before, they also give me Mario Kart 7 Nostalgia, which is what I live for.
Upvote 1
Welcome to releases!
Upvote 1
Back
Top