Advanced Flying Techniques
This is a page for compiling information about various advanced techniques for cape flight. For the most part they are not needed for vanilla speedruns, but can be useful for some hacks or TASing. This page is currently UNDER CONSTRUCTION.
Contents
Speed Management
While Mario is accelerating forward normally (walking, running, swimming, etc.) his speed typically increases by 1.5 subpixels/frame (hereafter "units") each frame (with the remainder saved as "subspeed" for calculating future speeds). On the other hand, while Mario is cape flying, his speed increases by 4 units/frame. Mario's cape speed is capped at 48, leading to a speed oscillation pattern which repeats as 48, 47, 51, 50, 49 while speed is capped and forward is held. Once forward is released, speed is conserved as long as Mario remains airborne (effectively indefinitely).
Maximizing Speed
If your goal is merely to reach the highest possible speed, then this video explains the basics of recognizing flight speeds between 51 and 47:
Video: How to Optimize Mario's Flight Speed Source: dotsarecool |
Being able to recognize speeds (or at least 51 speed) is a critical skill for top level speedruns. Once you are skilled at it, there are some more advanced techniques which can help you to reach 51 speed more quickly.
Optimal Tapping
If you have identified your current speed, the number of frames you need to hold right can be determined easily as SPEED - 46. Holding forward for an extra 5 frames can be helpful as well.
Speed | Tap Forward |
---|---|
47 | 1 (or 6) |
48 | 2 (or 7) |
49 | 3 (or 8) |
50 | 4 (or 9) |
One special case is 1-frame tapping. Tapping forward for a single frame can be done by flicking the d-pad very quickly, and with practice can be done fairly consistently. This allows correcting 47 speed immediately, but is not helpful for speeds between 48 and 50.
4-Frame Tapping
A simpler alternative to optimal tapping. If you have identified that Mario's current speed is not 51, you can guarantee increasing speed by tapping forward for exactly 4 frames. This will have the overall effect of increasing speed by 1 unit, so e.g. 47 will become 48. Mastering this is significantly easier than mastering optimal tapping since the number of frames to press right is the same every time.
By the same principle, if you have identified that Mario's speed is between 47 and 49, a 3 frame forward tap will always increase your speed by 2 units. Beware though, doing this at 50 speed will instead set you to 47. A 5 frame tap will not change Mario's final speed. Thus, a 4 frame tap is actually more lenient than one might expect; overshooting by a frame is always fine, and undershooting by a frame is fine as long as you are below 50 speed.
Initial Speed Optimization
Until Mario enters cape flight state, his speed oscillation pattern is *generally* that of p-speed running, namely 48, 47, 49, 48, 47. This will not be the case if Mario enters flight before reaching capped p-speed or (by using the takeoff meter) without full p-meter, but in a majority of cases it does apply.
This oscillation pattern can be exploited to increase your chance of getting an initial 51 speed. Because your speed the frame you enter cape flight is always between 47 and 49, the number of frames of cape flight before you reach 51 speed the first time is always between 1 and 3. There is a 40% chance for 1 or 2 frames and a 20% chance for 3 frames assuming your p-speed oscillation is random. Releasing right after 4 or 5 frames of cape flight will never give 51 speed. (Of course, you can also hold forward for an extra 5 frames, and the eventual result is the same, which may or may not be easier to time.)
To make use of this technique, you need to have a sense of exactly when Mario will enter cape flight. This is not as difficult as it might sound. Assuming you just press and hold B for the initial takeoff, he cape descent framerule gives a large amount of leeway for when to release B to stop ascending and begin cape flight on the same frame. For an experienced runner, getting the correct cape descent framerule for an initial takeoff is already a useful skill and one that most people learn without even trying to.
With this knowledge, one can take several approaches. If you always release forward after 3 frames, your initial flight speed will be between 49 and 51, better than random (though there is only a 20% chance of 51). If your goal is just to maximize the chance of getting initial 51 speed (e.g. for an IL speedrun), then releasing right after 1 or 2 frames gives a 40% chance each of getting initial 51 speed. Releasing after 2 frames is often especially good, because if you don't get initial 51 speed, you get 50 speed (40% chance), with only a 20% chance of getting 47. Either of these 2 techniques gives an average initial speed of 49.8, significantly higher than what you would expect from a uniformly random initial speed (49) that you would get if you did not do anything to try to optimize initial speed.
Also, note that the cape descent framerule and p-speed oscillation tend to help, rather than hurt, your ability to control Mario's initial speed in a controlled environment like the beginning of a level. In many cases, getting the initial 51 speed does not require a consistent initial B press frame; there is usually a 2-3 frame window for the initial B press where the correct frame to release forward after entering cape flight does not change. As a result, while one might think that getting consistent initial 51 speed is double frame perfect, in most cases it actually only requires one frame-perfect input, the one to release forward, which is relative to the time since the start of the level and so can be timed using visual or music cues. This is obviously the fastest option, but can only be used reliably in levels where you can completely control Mario's movement from the beginning of the level, such as simple flyover levels like Vanilla Secret 2.
Managing Low Speeds
In speedruns it is rarely helpful to go at low speeds (the most common application being to recover from major mistakes), but in difficult cape hacks it is a necessary skill.
Losing Speed Quickly
Often, one wants to go from having a high flight speed to a low one quickly. The easiest way to do so is by tapping B while holding backward on the d-pad to reduce speed by 6 units per B press. The B button can be pressed any number of times, and so long as Mario is not travelling with a backward speed of more than 7 units. It is useful to plan exactly how many B taps will be done rather than just guessing. If Mario is initially travelling at 51 speed, mashing B 8 times in quick succession will result in 3 speed. With that said, if you only know that Mario's speed is in the oscillation range (that is, between 47 and 51), 8 B taps will sometimes lead to 0 or -1 speed if the initial speed was 47 or 48. Instead, many players will prefer in some circumstances to do 7 B taps to get a speed in the range of 5-9, and then more carefully adjust their speed from there through B taps and forward taps.
With this technique, the speed that one can mash the B button directly determines how quickly Mario's speed can be eliminated. For this reason, it is important to choose a controller grip which allows B to be mashed while holding X or Y. Clawing the X button with your index finger is a good idea, at which point the B button can be mashed with the thumb. While possible, it is difficult to adjust the right hand controller grip in the middle of flight, so always clawing X while flying is advisable.
An alternative method of using cape spins to reduce speed is described below in the cape spin section, but for several reasons B tapping tends to be the better option in normal cases.
Speed Mod 2 and Mod 4
One of the most dreaded situations during cape flight is getting 0 speed without expecting it. 0 speed takes a significant amount of time to distinguish from 1/-1 speed (up to 16 frames plus reaction time), and at exactly 0, attempting to catch air will generally lead to Mario stalling, which can be difficult to recover from. In many cases, 1 speed is the most desirable speed, while 0 is deadly. With a bit of effort and understanding, one can preempt this. This can also be used in niche situations where exact speeds are desirable, and understanding it will help in determining exact speeds more quickly.
Note that, so long as Mario's speed is not capped (over 47), B is not used, and Mario doesn't collide with any walls or enemies which change speed, his speed can only change by a multiple of 4 units. Hence, given a particular known speed, the only final speeds after any number of frames in which none of the exceptions above are mentioned are those that are the same mod 4. This is true regardless of turn-arounds and d-pad inputs. For instance, with an initial speed of 1 unit rightward, it is possible for Mario to change speed to 9 units rightward or 3 units leftward, but never to any even speed or to e.g. 7 units rightward. This means that to avoid 0 speed, all one needs to do is make sure to have a speed which is 1, 2, or 3 mod 4 but not 0 mod 4.
In practice though, usually some amount of B-tapping is also needed while flying at low speed (at least outside of yoshi fly). Each B tap reduces Mario's speed by 6, so long as it is not more than 7 units backwards on the frame B is pressed. Since 6 is 2 mod 4, this means that after some number of (uncapped) B taps, the speed will no longer be consistent mod 4, but will be consistent mod 2. In particular, if Mario initially has an odd speed, his speed will remain odd, and hence will never hit exactly 0.
This may make it seem like B-tapping is slightly detrimental, but in fact with care it can be used to manipulate speed mod 2 and mod 4. If Mario is at the backward speed cap (8 units or more), instead of reducing speed by 6 units, Mario's forward speed increases by 1 unit. One can shift from an even speed to an odd one using this fact. The number of B taps needed to change the parity of Mario's speed is listed in this table (were negative denotes a speed opposite the direction of motion):
Speed | B taps to flip speed parity |
---|---|
-8 or lower | 1 |
-7 to -2 | 2 |
-1 to 4 | 3 |
5 to 10 | 4 |
In particular, if your goal is to go from an even speed to an odd one, as soon as Mario reaches a negative (not 0) speed, it always requires exactly 2 B taps to adjust the speed parity.
If you want to control Mario's speed mod 4 rather than just mod 2, the same table initially applies, but after the correct number of B taps is done, additional B taps will increase speed mod 4 by 1 until the speed reaches -7, at which point it will drop to -13 again. Knowing this one can work out the number of B taps required to get the desired speed mod 4.
While this may seem like a lot of work to avoid 0 speed, the key here is that everything here only has to be done once, after which Mario can fly and change speeds for an indefinite amount of time with better knowledge and without risk of 0 speed unless and until one of the conditions above is violated (at which point it will need to be manipulated again).
Flying in Place/Backwards
Gaining Height
Aircatch Timing
Normal Aircatch
Quick Aircatch
Big Air
Takeoff Meter Assisted Big Air
Quick Dive
Generally, when holding forward to do a divebomb, Mario's flight phase (which is visually depicted by the angle of the cape in Mario's animation) increases by 1 every 8 frames, and a divebomb requires a flight phase of 6, the highest. (Technically, it requires at least the second frame on which Mario's flight phase is 6.)
If one instead mashes forward, each forward press advances the flight phase by 1. With reasonably good mashing, it is possible to get to the requisite flight phase 6 faster than only holding forward. This is particularly useful in confined spaces such as low ceilings or thin shafts where a normal divebomb would not work.
Multiple Aircatch
Preserving Flight
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.
Pipe/Door Fly
While speed and p-meter are both reset when Mario goes through a screen transition from a pipe/door, takeoff meter is preserved. So long as Mario begins the takeoff meter before the transition and then quickly gets airborne and starts falling, he can immediately enter flight. This is extremely useful in speedruns because it allows one to accelerate to full speed with the faster cape acceleration and without needing to first build p-meter.
Cannon Fly
Trajectory Locking
Typically, when one does a doorfly, the goal is to press B after gaining control of Mario to begin flying. During this time, one usually also holds forward on the d-pad. However, if consistency is crucial in the particular flight path, this has a disadvantage that pressing B later will mean flying later, so it becomes necessary to try to press B as quickly as possible after gaining control of Mario.
Instead, if one holds Down as well as forward at the beginning of the room, Mario will remain stationary until B is pressed. This removes the dependence on the particular frame where B is pressed, allowing for a more consistent flight trajectory. If B is pressed on the first frame, this method is just as fast as not pressing down. Otherwise, it is slower, but the tradeoff can be worth it in particular cases. '
For instance, it can be applied in Donut Secret House room 2 to make it easier to hit the ? block. See this video, but note that this strategy is not actually applied here even though it would be reasonable to do so.
Video: Donut Secret House Normal Exit Source: ThirdLavaDolphin |
Improved P-speed
One application of these techniques is to allow for building p-meter while moving forward slightly faster than usual from rest. In order to build p-meter, Mario must have speed at least 35 units. Ordinarily this would require about 23 frames before one can begin (the precise number may depend on how Mario enters the level e.g. if by a horizontal pipe and if the -1 trick is used), after which Mario will spend 56 frames to build full p-meter. During this time, his average speed never exceeds 37 units.
Instead, if Mario first does a pipe/door fly, he can reach the maximum speed of 51 units with cape acceleration without building p-meter at all. This speed can be carried until he touches the ground, at which point p-meter can immediately start building. Furthermore, the speed remains above the maximum running speed of 37 units for a time, decreasing by only 1 unit/frame until it reaches the oscillation range. Ideally, one should hold neutral on the d-pad until the frame Mario lands, at which point forward should be pressed.
This technique can be used in RTA speedruns in (for example) Donut Secret House room 2. This application is somewhat irregular because the available runway to regain p-speed is barely long enough, and so (at least in the example below), Mario needs to begin slowing down before landing to ensure getting p-speed in time to clear the enemies.
Video: Donut Secret House Normal Exit Source: ThirdLavaDolphin |
A much more precise application, which requires flying for only a very brief time to get speed but still build p-meter quickly, is used in the current 11 exit TAS in room 5 of Front Door, where p-meter must be rebuilt to allow Mario to gain flight and cape cancel several additional times.
Video: 11 exit ("warps") TAS Source: BrunoVisnadi & Amaraticando |
To be clear, this method is slower (on flat ground) than simply running forward if the sole goal is to get full p-meter as quickly as possible. However, if p-speed is only required eventually, and may be delayed by a few frames, then a greater distance can be covered by this method in the interim, which results in an overall timesave.
Takeoff Meter
Climbing Vines/Nets
P-Balloon
If Mario collects a p-balloon while in flight, he can retain flight throughout the p-balloon and resume flying immediately after it ends. It is not even necessary to continue to hold X/Y during the balloon timer. Big air can also be preserved through a p-balloon. Note that, while p-meter is preserved during the p-balloon timer, takeoff meter is not. It is thus not possible to start flying after a p-balloon ends without taking off again.
If Mario touches the ground while the p-balloon is running, he will immediately lose flight status, and cannot regain it even if there is still takeoff meter remaining. If Mario gets hit during the p-balloon, he will cape cancel and get invulnerability frames, but the p-balloon will remain active. This will, however, make him lose flight status and begin to spin as usual. When exiting the p-balloon, if he has not yet touched the ground, he will be spinning. In fact, the spinning state is also active during the balloon itself, though without any animation.
Because Mario is flying during the p-balloon, it is also possible to divebomb while the balloon is active and cause an earthquake. However, under normal circumstances Mario can't get enough downward momentum during the p-balloon to trigger the earthquake. Thus, usually one must conserve downward momentum from a divebomb while collecting the p-balloon, and then immediately hit the ground, for this to work. In very contrived situations it is possible to get enough downward speed through other means. Naturally, doing this will also end the flight status since Mario touches the ground.
Cape Spin Techniques
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.
Turning Around
Throwing Held Items
While flying, the game only normally checks if X/Y is held (so that Mario keeps flying) on frames where Mario's flight phase can change. (There are other situations when this is checked but this is the basic principle.) The phase is indicated by the angle of Mario in the flying animation while Mario is not holding an item. (It can also be seen while holding an item if one looks specifically at the cape's position.) If neither left nor right are pressed on the d-pad, this flight phase can change only every 8 frames. Consequently, between phase checks, there is a 7 frame window in which X/Y can be released and regrabbed, which will result in a held item being thrown.
The easiest way to do this in practice is to tap backwards to initiate a cape-pump, and then immediately release and regrab X/Y. This approach guarantees having a sizable window for the regrab. If an item absolutely must be thrown at other points in flight, one needs to react to the timing of the phase changes.
Doing this will also result in a cape-spin since X/Y is regrabbed. This could be problematic in certain situations; for instance, if one is dropping a shell, the spinning cape may hit the shell as it is dropped, potentially resulting in Mario re-catching the shell. As usual, the cape-spin will also result in Mario facing an unpredictable direction. The timing described above of throwing an item immediately after beginning a cape-pump tends to give the most time to react to which direction Mario faces, which is another reason to prefer this timing over other possible ones.
Pause-buffered Throw
It is possible to throw items and maintain flight without a cape-spin. To do this, rather than releasing and then immediately regrabbing X/Y, release X/Y and then immediately pause by pressing Start. Then press and hold X/Y before unpausing. On the frame that the game unpauses, X/Y will be registered as held, but not pressed, so Mario will not spin but will keep flying (assuming the conditions above are still met).
Of course, this works for any X/Y press which you want to avoid cape-spinning. Other methods of freezing the game apart from pausing in principle also work, but the only one which is likely to be practical without elaborate setup is a Yoshi hatching animation. (Note that a lag frame does not work for this purpose; input is not registered on lag frames at all, so an X/Y press would count as pressing rather than only holding on the next active frame.)
Speed Manipulation
During a cape-spin, the direction Mario faces switches every 4 frames. While Mario is facing left, if left is held, he will accelerate at the normal 4 units/frame to the left as long as speed is not capped. While facing right, Mario's speed will not change. Similarly if right is held, he will accelerate while facing right and conserve speed while facing left.
Based on this, during a cape spin, the player can effectively adjust Mario's speed in either direction by holding that direction, without the use of B tapping. On average, the acceleration for this is 2 units/frame since Mario spends half of the time facing each direction. Additionally, because forward is effectively only held for 4 frames at a time, this prevents Mario from beginning a divebomb, instead descending in a relatively slow and controlled manner.
While this technique is powerful and relatively easy, it has some serious issues which the player must be prepared for. Most obviously, the final direction Mario faces is not consistent, so the player must be ready for either outcome. A less obvious issue is that, while this technique is fairly useful for manipulating *speed*, it is much less consistent for controlling Mario's *position*. The initial timing of Mario's acceleration is inconsistent. Depending on this, Mario's final horizontal position can vary by a tile or more even when the final speed is the same. Finally, the ending speed is only truly consistent if the direction is held for a multiple of 8 frames. If not, in the worst case (4 mod 8 frames), the final speed can vary by up to 16 units.
Adding B-tapping
Note that this can also be combined with B tapping, which increases the average acceleration. For instance, consider a frame where right is being held and B is pressed. If Mario happens to face right, he will get the usual 4 unit increase in speed, and the B press has no effect. If, on the other hand, he faces left, his rightward speed will increase by 6 *so long as* he is not yet at the negative speed cap for B tapping--that is, so long as he is either moving left, has 0 speed, or is moving right with a speed no more than 7 units. If Mario is moving right at more than 7 units, instead his speed will decrease by 1 (which is clearly counterproductive).
Because of the negative speed cap, the B presses are only really useful while Mario is trying to decelerate, not accelerate. For that reason, if one is going to press (or more practically, mash) B at all, it should usually be done at the beginning of the cape-spin. Of course, if the player is proficient enough at mashing B, they can decelerate Mario without a cape-spin at all. Ultimately, cape-spinning with b-tapping is mostly useful when it is crucial that Mario decelerate extremely quickly. With perfect 30 Hz B mashing (as an obviously unrealistic extreme case), B tapping alone allows an average deceleration of 3 units/frame. Cape spinning alone allows for an average deceleration of 2 units/frame. Combining the two allows for 3.5 units/frame deceleration, faster than either individually. If a more reasonable (still relatively fast) mashing rate of 12 Hz is assumed, B-tapping alone only gives an average 1.2 units/frame, while combining cape-spinning and B-tapping gives 2.6 units/frame.
Of course, controlling this is even more difficult than without B-tapping, and the inputs are awkward to do on a controller, so it is a good idea to use this method sparingly.
Low Aircatch
Yoshi Fly
Starting a Yoshifly
To start a Yoshifly, all one needs to do in principle is be in flight and mount Yoshi; no special tricks are required. In practice though, one usually mounts Yoshi while he is on the ground, and touching the ground will end the flight (possibly causing a belly-slide or divebomb). The challenge in beginning a Yoshifly is to mount Yoshi in such a way that you can avoid having him touch the ground.
It is impractical to try to time an aircatch exactly as Mario mounts Yoshi and avoid touching the ground. Instead, one usually relies on one of the situational methods described below.
Ceiling Dismount
Yoshi Grab
Baby Yoshi Feed
Basic Movement
Catching Air
Tongue Technique
Non-tongue Technique
Miscellaneous Techniques
Sticky Fly
Without Big Air
Camera Unlocking
Ordinarily, while flying, once the takeoff meter depletes the camera will not scroll up vertically. Under certain circumstances this can be alleviated either temporarily or permanently. Cape hacks often patch the game to allow the camera to scroll up while flying where relevant but several vanilla methods to overcome this limitation also exist.
While climbing up a net or vine, the camera can scroll upward if Mario is high enough on screen. Flight can be preserved while climbing, so this provides a temporary way to scroll the camera as high as the vine.
If Mario initiates flight by getting a large bounce on a portable springboard with enough takeoff meter remaining to begin flying, a flag is set which allows the camera to scroll freely during the flight, as if the spring bounce was still active. This flag persists as long as Mario does not touch the ground. Hence this gives a method to permanently unlock the camera during flight, but it must be done at the beginning of a flight. Because the takeoff meter only lasts 80 frames, a bit of setup makes this easier to achieve, either by jumping onto a spring at a higher altitude than Mario's initial position (so less falling time is required) or by hitting a ceiling when bouncing off the springboard. Wall springs do not work for this purpose (this should be confirmed).
Once Mario is already in flight, the only known way of permanently unlocking the camera is to first mount Yoshi, and then while Yoshiflying, get a large bounce on a pink triangle sprite by holding B. This sets the same flag as above, but does not count as touching the ground, so Mario remains in flight. After this, there is no need to remain on Yoshi; Mario can dismount by pressing A and will keep flying and now the camera can scroll up.