https://smwspeedruns.com/api.php?action=feedcontributions&user=3rdLavaDolphin&feedformat=atomSuper Mario World Speedrunning Wiki - User contributions [en]2024-03-29T15:11:22ZUser contributionsMediaWiki 1.30.0https://smwspeedruns.com/index.php?title=File:Movement_chart.png&diff=3606File:Movement chart.png2020-08-26T12:48:03Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3586Advanced Flying Techniques2020-06-02T20:51:46Z<p>3rdLavaDolphin: /* Maximizing Speed */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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. <br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
The principles in this video can be helpful for recognizing other speeds. For instance, at 1 speed, the camera moves forward every 16 frames, the same as the jerking forward at 49 speed, while 3 speed corresponds to camera movements with the same frequency as the jerking at 51 speed. For speeds not near a multiple of 16, more experience watching the camera scroll carefully is necessary; for instance, 8, 24, and 40 speed all feel "smoother" than nearby speeds while still less smooth than 16, 32, or 48, due to the fact that the camera jerks every other frame (frequent enough that it does not feel "jerky" in the same way that e.g. 49 speed does). With enough practice and some knowledge an advanced player can determine their exact speed in potentially as few as 16 frames, though very few people are capable of doing so quickly for the entire range of relevant speeds from -13 to 51.<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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 in some scenarios e.g. when 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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
Cape-spinning while getting a big aircatch works differently from with a regular aircatch (which results in the low aircatch described above). Instead, if the capespin is done quickly enough, Mario will not have time during the big aircatch to accelerate to maximum upward speed. In this case, the big aircatch property is stored while Mario faces backward. During that time while he faces backward, he cannot accelerate upward, but he will maintain most of the upward velocity during the frames he faces backward. The overall result is that a greater vertical distance can be covered than normal. This allows Mario to navigate in certain tight spots while cape-flying, such as the gap near the keyhole in [[Star World 5]].<br />
<br />
In rare cases, when Mario ends the capespin facing backward, he may not have a chance to clear the big air flag. In this case, as soon as Mario begins to face forward again (either from changing direction or from accelerating above 0 speed) he will immediately start accelerating upward again. This is a double aircatch, and can be used to gain much more height than an ordinary big aircatch. Unfortunately, under normal circumstances it is not possible to get more than two aircatches this way. To store the big aircatch through a capespin Mario must begin the capespin with a relatively high downward velocity. It is possible to gain more height (called an infinite/perpetual/continuous aircatch; see below), but this requires using the B button to cancel forward momentum rather than a capespin.<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
If Mario aircatches with big air near a ceiling, he will hit the ceiling before reaching maximum upward velocity. In this case, the big air flag will not be cancelled and he will continue to ascend into the ceiling as long as he remains moving forward and backward on the d-pad (and X/Y) continue to be held. The overall result is that Mario will travel forward while "sticking" to the ceiling. The stickyfly can be maintained on both downward and upward sloped ceilings, but corners will sometimes kill Mario's speed depending on precise positioning. <br />
<br />
Speed can be adjusted by briefly releasing backward and tapping forward. This should be done quickly, but has enough frames of leeway that there is generally no risk of losing the stickyfly.<br />
<br />
Note that if the aircatch is initiated by pressing and holding X/Y with remaining takeoff meter, Mario will hit the ceiling normally and bounce off even with big air unless backward on the d-pad is also held; see for instance this example (note that left and right are alternated on the d-pad here to preserve as much horizontal speed as possible):<br />
<br />
{{youtubevideo|url=GuTJNOi0chQ|title=Vanilla Dome 3 example|source=ThirdLavaDolphin}}<br />
<br />
=== Without Big Air ===<br />
<br />
It is possible to stickyfly without having big air stored; however, it is much more precise. In practice, one needs to cut the corner of the ceiling as tightly as possible and the aircatch is generally frame-perfect. Mario should hit a positive upward speed and, on the same frame, hit the ceiling. Even with frame-perfect timing it may not always work if the precise subpixel positions don't work out. It will be much easier to begin this type of stickyfly if Mario can do so on a downward sloped ceiling, such as in the sublevel of [[Vanilla Dome 1]].<br />
<br />
It is extremely difficult (though possible) to adjust speed during this type of stickyfly.<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3585Advanced Flying Techniques2020-06-02T20:48:40Z<p>3rdLavaDolphin: /* Initial Speed Optimization */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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. T<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
he principles in this video can be helpful for recognizing other speeds. For instance, at 1 speed, the camera moves forward every 16 frames, the same as the jerking forward at 49 speed, while 3 speed corresponds to camera movements with the same frequency as the jerking at 51 speed. For speeds not near a multiple of 16, more experience watching the camera scroll carefully is necessary; for instance, 8, 24, and 40 speed all feel "smoother" than nearby speeds while still less smooth than 16, 32, or 48, due to the fact that the camera jerks every other frame (frequent enough that it does not feel "jerky" in the same way that e.g. 49 speed does). With enough practice and some knowledge an advanced player can determine their exact speed in potentially as few as 16 frames, though very few people are capable of doing so quickly for the entire range of relevant speeds from -13 to 51.<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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 in some scenarios e.g. when 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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
Cape-spinning while getting a big aircatch works differently from with a regular aircatch (which results in the low aircatch described above). Instead, if the capespin is done quickly enough, Mario will not have time during the big aircatch to accelerate to maximum upward speed. In this case, the big aircatch property is stored while Mario faces backward. During that time while he faces backward, he cannot accelerate upward, but he will maintain most of the upward velocity during the frames he faces backward. The overall result is that a greater vertical distance can be covered than normal. This allows Mario to navigate in certain tight spots while cape-flying, such as the gap near the keyhole in [[Star World 5]].<br />
<br />
In rare cases, when Mario ends the capespin facing backward, he may not have a chance to clear the big air flag. In this case, as soon as Mario begins to face forward again (either from changing direction or from accelerating above 0 speed) he will immediately start accelerating upward again. This is a double aircatch, and can be used to gain much more height than an ordinary big aircatch. Unfortunately, under normal circumstances it is not possible to get more than two aircatches this way. To store the big aircatch through a capespin Mario must begin the capespin with a relatively high downward velocity. It is possible to gain more height (called an infinite/perpetual/continuous aircatch; see below), but this requires using the B button to cancel forward momentum rather than a capespin.<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
If Mario aircatches with big air near a ceiling, he will hit the ceiling before reaching maximum upward velocity. In this case, the big air flag will not be cancelled and he will continue to ascend into the ceiling as long as he remains moving forward and backward on the d-pad (and X/Y) continue to be held. The overall result is that Mario will travel forward while "sticking" to the ceiling. The stickyfly can be maintained on both downward and upward sloped ceilings, but corners will sometimes kill Mario's speed depending on precise positioning. <br />
<br />
Speed can be adjusted by briefly releasing backward and tapping forward. This should be done quickly, but has enough frames of leeway that there is generally no risk of losing the stickyfly.<br />
<br />
Note that if the aircatch is initiated by pressing and holding X/Y with remaining takeoff meter, Mario will hit the ceiling normally and bounce off even with big air unless backward on the d-pad is also held; see for instance this example (note that left and right are alternated on the d-pad here to preserve as much horizontal speed as possible):<br />
<br />
{{youtubevideo|url=GuTJNOi0chQ|title=Vanilla Dome 3 example|source=ThirdLavaDolphin}}<br />
<br />
=== Without Big Air ===<br />
<br />
It is possible to stickyfly without having big air stored; however, it is much more precise. In practice, one needs to cut the corner of the ceiling as tightly as possible and the aircatch is generally frame-perfect. Mario should hit a positive upward speed and, on the same frame, hit the ceiling. Even with frame-perfect timing it may not always work if the precise subpixel positions don't work out. It will be much easier to begin this type of stickyfly if Mario can do so on a downward sloped ceiling, such as in the sublevel of [[Vanilla Dome 1]].<br />
<br />
It is extremely difficult (though possible) to adjust speed during this type of stickyfly.<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3584Advanced Flying Techniques2020-06-02T20:45:38Z<p>3rdLavaDolphin: /* Speed Management */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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. T<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
he principles in this video can be helpful for recognizing other speeds. For instance, at 1 speed, the camera moves forward every 16 frames, the same as the jerking forward at 49 speed, while 3 speed corresponds to camera movements with the same frequency as the jerking at 51 speed. For speeds not near a multiple of 16, more experience watching the camera scroll carefully is necessary; for instance, 8, 24, and 40 speed all feel "smoother" than nearby speeds while still less smooth than 16, 32, or 48, due to the fact that the camera jerks every other frame (frequent enough that it does not feel "jerky" in the same way that e.g. 49 speed does). With enough practice and some knowledge an advanced player can determine their exact speed in potentially as few as 16 frames, though very few people are capable of doing so quickly for the entire range of relevant speeds from -13 to 51.<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
Cape-spinning while getting a big aircatch works differently from with a regular aircatch (which results in the low aircatch described above). Instead, if the capespin is done quickly enough, Mario will not have time during the big aircatch to accelerate to maximum upward speed. In this case, the big aircatch property is stored while Mario faces backward. During that time while he faces backward, he cannot accelerate upward, but he will maintain most of the upward velocity during the frames he faces backward. The overall result is that a greater vertical distance can be covered than normal. This allows Mario to navigate in certain tight spots while cape-flying, such as the gap near the keyhole in [[Star World 5]].<br />
<br />
In rare cases, when Mario ends the capespin facing backward, he may not have a chance to clear the big air flag. In this case, as soon as Mario begins to face forward again (either from changing direction or from accelerating above 0 speed) he will immediately start accelerating upward again. This is a double aircatch, and can be used to gain much more height than an ordinary big aircatch. Unfortunately, under normal circumstances it is not possible to get more than two aircatches this way. To store the big aircatch through a capespin Mario must begin the capespin with a relatively high downward velocity. It is possible to gain more height (called an infinite/perpetual/continuous aircatch; see below), but this requires using the B button to cancel forward momentum rather than a capespin.<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
If Mario aircatches with big air near a ceiling, he will hit the ceiling before reaching maximum upward velocity. In this case, the big air flag will not be cancelled and he will continue to ascend into the ceiling as long as he remains moving forward and backward on the d-pad (and X/Y) continue to be held. The overall result is that Mario will travel forward while "sticking" to the ceiling. The stickyfly can be maintained on both downward and upward sloped ceilings, but corners will sometimes kill Mario's speed depending on precise positioning. <br />
<br />
Speed can be adjusted by briefly releasing backward and tapping forward. This should be done quickly, but has enough frames of leeway that there is generally no risk of losing the stickyfly.<br />
<br />
Note that if the aircatch is initiated by pressing and holding X/Y with remaining takeoff meter, Mario will hit the ceiling normally and bounce off even with big air unless backward on the d-pad is also held; see for instance this example (note that left and right are alternated on the d-pad here to preserve as much horizontal speed as possible):<br />
<br />
{{youtubevideo|url=GuTJNOi0chQ|title=Vanilla Dome 3 example|source=ThirdLavaDolphin}}<br />
<br />
=== Without Big Air ===<br />
<br />
It is possible to stickyfly without having big air stored; however, it is much more precise. In practice, one needs to cut the corner of the ceiling as tightly as possible and the aircatch is generally frame-perfect. Mario should hit a positive upward speed and, on the same frame, hit the ceiling. Even with frame-perfect timing it may not always work if the precise subpixel positions don't work out. It will be much easier to begin this type of stickyfly if Mario can do so on a downward sloped ceiling, such as in the sublevel of [[Vanilla Dome 1]].<br />
<br />
It is extremely difficult (though possible) to adjust speed during this type of stickyfly.<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Boss_Kill&diff=3503Boss Kill2020-03-04T09:51:01Z<p>3rdLavaDolphin: </p>
<hr />
<div>[[ボスキル|日本語はこちら]]<br />
<br />
Boss Kills are a special case of [[Unintended Sprite Spawning]] via the stun glitch. This page will cover the basic technical facts that make this glitch possible. In speedruns it is most commonly seen in [[Groovy]] and [[Cookie Mountain]]. A boss kill is also possible in [[Yoshi's Island 1]], though it does not save time, and tool-assisted runs can additionally do one in [[Valley of Bowser 4]] by using 2 instances of the stun glitch. Additionally, Reznor spawns (as well as many other instances of the stun glitch) are possible, and can be done in [[Awesome]] in 96 exit runs to save time, but successfully beating a level with one is somewhat more complicated though the basic principles are similar.<br />
<br />
The canonical, simplest example of a boss kill is in Groovy, as shown in this video. The steps behind this trick are explained in more detail below.<br />
<br />
{{youtubevideo|url=UWpmRUVo7is|title=Groovy Boss Kill|source=Sten}}<br />
<br />
===Double-Tongue Glitch===<br />
<br />
[[File:Double_tongue.gif|thumb|The double-tongue is successfully executed in Groovy]]<br />
<br />
The first step in this trick is to perform a double-tongue glitch. To do this, Yoshi needs to release his tongue on the same frame that the game freezes due to a powerup (or, in principle, powerdown) animation. To accomplish this, X or Y must be pressed on the same frame that a powerup is collected. Normally this requires frame-perfect timing of the X/Y press, however, if the powerup is falling toward Mario (such as the case of a fire flower dropped from reserve), an alternate method is also possible, by pressing Y (or X) and B on the same frame, while the powerup is just above Mario's head. This requires pressing both buttons on the same frame, but the timing window is much more lenient to get the double-tongue this way. With this alternative method, Mario will be airborne for much of the duration of the double-tongue, and so the relevant sprites must be positioned differently for it to work. If you do have a falling powerup but the jump method is not possible, a third option is to duck under the powerup, and release Down to un-duck on the same frame that X/Y is pressed to activate the tongue; this also eliminates the frame-perfect timing but the inputs can not be done as reliably as the jump method. In 96 exit speedruns (and other categories where applicable), only the jumping method is commonly used, and the other two methods are generally thought of as obsolete.<br />
<br />
As the name suggests, when a double-tongue is performed, Yoshi sticks his tongue out twice. The first tongue comes during the powerup animation, and the second after the first ends. To perform a stun glitch, the first tongue should grab a sprite which Yoshi can store in his mouth, such as a Koopa shell. This will make Yoshi's mouth full. The second tongue should touch a different sprite (not necessarily one Yoshi can normally hold in his mouth), and the sprite slot of that sprite must be set up carefully to make the rest of the glitch work. However, after the tongue grabs this second sprite, but before it enters Yoshi's mouth, Mario must be knocked off Yoshi, similar to in an eat-cancel glitch. This sequence of events causes the sprite slot of the second sprite to be stored in Yoshi's mouth, but the sprite itself is not in Yoshi's mouth. In this state where the two are desynchronized, Yoshi can spit the sprite out of his mouth, but the sprite can also freely walk around the level and interact with things; in particular, it can be despawned and a new sprite can be spawned in its slot.<br />
<br />
After the first tongue retracts fully, the first sprite is in Yoshi's mouth, and so this sprite is what determines what abilities Yoshi has. In particular, with a blue Yoshi and a shell of any color or a Yoshi of any color and a blue shell, Yoshi will get wings, as in Groovy in the video above. Once the second tongue retracts, this is updated to the new sprite which was hit by the second tongue, but that sprite is not actually in Yoshi's mouth. In the video, this again gives you wings. If that sprite despawns, Yoshi maintains his same abilities until a new sprite is spawned in its place (typically the sliding blue Koopa) at which point they are updated. With this in mind it is often possible to determine in real-time whether the boss kill will still be possible or has failed due to improper sprite slot management well before completing the full sequence of events.<br />
<br />
===Stunning a Sliding Blue Koopa===<br />
<br />
[[File:Stunned sliding blue koopa.png|thumb|This sprite is not the boss, it is the stunned sliding blue Koopa. The boss itself is invisible.]]<br />
<br />
For the boss kill glitch, the goal is to stun a sliding blue Koopa. Note that it must still be in its sliding animation or have just stood up; once the blue Koopa starts walking it is technically a different sprite and the boss kill is not possible. Conceptually, to do this, all that needs to be done is despawn the sprite that is in the sprite slot which is tied to Yoshi's mouth (the second sprite in the double-tongue glitch) by any means, and spawn a sliding blue Koopa in its place. At this point Yoshi can spit the sliding blue Koopa out of his mouth to put it in its stunned state at any time (until it stands up of course). <br />
<br />
However, doing this just gives us a stunned sliding blue Koopa, which is not very useful on its own. What is required to spawn a boss from the Koopa is to set its stun timer. The stun timer will then count down, and when it reaches 0, a new sprite will spawn out of the stunned sprite. This is an intended game mechanic which is used so that naked Koopas can jump out of their shells after Yoshi eats the shell and spits it back out, but the ability to stun almost any sprite in the game is obviously not intended and when other sprites' stun timers hit 0, many other sprites can be spawned. In the case of a sliding blue Koopa, the sprite that is spawned is a koopa kid boss (the same sprite is used for all Koopa kids apart from Wendy/Lemmy).<br />
<br />
Luckily, the game reuses the stun timer as the timer for how long to display the dust cloud after an enemy is killed by Yoshi or by Mario's spin jump. Jumping on the sliding blue Koopa before it is stunned lets the player set the timer to 1F (or 31 in decimal). From there, the player must spit the sliding blue Koopa out of Yoshi's mouth to put it in its stunned state before the timer hits 0. Once the timer does hit 0, the Koopa Kid boss will spawn from the stunned Koopa. In practice this maneuver is tricky, and if done incorrectly, the boss may hurt Mario while riding Yoshi or be killed by the stunned koopa sprite. Note that there are other ways to set the stun timer of the Koopa; in particular, it is also set on the frame the Koopa spawns, and this can be exploited for a faster (but more precise) boss kill method in Groovy:<br />
<br />
{{youtubevideo|url=YiVQDShdneY|title=Faster ending for GBK|source=MostlySMW}}<br />
<br />
===Defeating the Boss===<br />
<br />
The koopa kid boss's properties are determined by the room it is spawned in, and spawning one outside the normal boss rooms is not intended so it ends up somewhat glitchy. The boss has similar properties to Morton, Roy, and Ludwig. In particular, it can be defeated after 3 or more hits if the last hit is a jump, or 12 hits if fireballs are used. Note that after the boss is jumped on once, it teleports to an inaccessible location, meaning that jumps alone will not suffice; at least 2 fireballs are required. But unlike Morton, Roy, and Ludwig, the boss has a very long "animation" which it plays when it is killed via a jump. Because of this, 12 fireballs is actually generally a faster method than 2 fireballs and a jump to kill the invisible boss. <br />
<br />
To dispatch with the boss as quickly as possible, the player needs to get very close to the boss while mashing X and Y to shoot fireballs. Because of the interaction framerule for Mario's fireballs, if Mario stands too far away from the boss, the fireballs will each take 4 frames longer to reach their target, which adds up to quite a significant time loss. However, the boss can still hurt Mario and is invisible, so it is slightly risky to do this. Many runners will wait until a couple fireballs connect to get a good idea of the boss's location before closing in. Additionally, while the boss is spawned, it is crucial that Mario not move too far left or right or else Mario will get stuck and not be able to move horizontally. The specific conditions involve the camera position relative to screen boundaries, but as screen boundaries are not visible in the game itself, the limits need to be manually tested for any level where a boss kill is being done.<br />
<br />
For speedrunning purposes, it is also noteworthy that the boss kill will cause a longer fanfare to play than beating a level via a goal tape. The boss kill fanfare is approximately 1.68s longer, which is more than 2 in-game seconds. One should be careful to time strats correctly with this in mind. [http://dotsarecool.com/practice The Practice Cart] will automatically give the correct time including the fanfare (but it will ''not'' account for any powerup transitions during the fanfare).<br />
<br />
[[Category:Tricks & Glitches]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Boss_Kill&diff=3502Boss Kill2020-03-04T09:48:55Z<p>3rdLavaDolphin: </p>
<hr />
<div>[[日本語はこちら|ボスキル]]<br />
<br />
Boss Kills are a special case of [[Unintended Sprite Spawning]] via the stun glitch. This page will cover the basic technical facts that make this glitch possible. In speedruns it is most commonly seen in [[Groovy]] and [[Cookie Mountain]]. A boss kill is also possible in [[Yoshi's Island 1]], though it does not save time, and tool-assisted runs can additionally do one in [[Valley of Bowser 4]] by using 2 instances of the stun glitch. Additionally, Reznor spawns (as well as many other instances of the stun glitch) are possible, and can be done in [[Awesome]] in 96 exit runs to save time, but successfully beating a level with one is somewhat more complicated though the basic principles are similar.<br />
<br />
The canonical, simplest example of a boss kill is in Groovy, as shown in this video. The steps behind this trick are explained in more detail below.<br />
<br />
{{youtubevideo|url=UWpmRUVo7is|title=Groovy Boss Kill|source=Sten}}<br />
<br />
===Double-Tongue Glitch===<br />
<br />
[[File:Double_tongue.gif|thumb|The double-tongue is successfully executed in Groovy]]<br />
<br />
The first step in this trick is to perform a double-tongue glitch. To do this, Yoshi needs to release his tongue on the same frame that the game freezes due to a powerup (or, in principle, powerdown) animation. To accomplish this, X or Y must be pressed on the same frame that a powerup is collected. Normally this requires frame-perfect timing of the X/Y press, however, if the powerup is falling toward Mario (such as the case of a fire flower dropped from reserve), an alternate method is also possible, by pressing Y (or X) and B on the same frame, while the powerup is just above Mario's head. This requires pressing both buttons on the same frame, but the timing window is much more lenient to get the double-tongue this way. With this alternative method, Mario will be airborne for much of the duration of the double-tongue, and so the relevant sprites must be positioned differently for it to work. If you do have a falling powerup but the jump method is not possible, a third option is to duck under the powerup, and release Down to un-duck on the same frame that X/Y is pressed to activate the tongue; this also eliminates the frame-perfect timing but the inputs can not be done as reliably as the jump method. In 96 exit speedruns (and other categories where applicable), only the jumping method is commonly used, and the other two methods are generally thought of as obsolete.<br />
<br />
As the name suggests, when a double-tongue is performed, Yoshi sticks his tongue out twice. The first tongue comes during the powerup animation, and the second after the first ends. To perform a stun glitch, the first tongue should grab a sprite which Yoshi can store in his mouth, such as a Koopa shell. This will make Yoshi's mouth full. The second tongue should touch a different sprite (not necessarily one Yoshi can normally hold in his mouth), and the sprite slot of that sprite must be set up carefully to make the rest of the glitch work. However, after the tongue grabs this second sprite, but before it enters Yoshi's mouth, Mario must be knocked off Yoshi, similar to in an eat-cancel glitch. This sequence of events causes the sprite slot of the second sprite to be stored in Yoshi's mouth, but the sprite itself is not in Yoshi's mouth. In this state where the two are desynchronized, Yoshi can spit the sprite out of his mouth, but the sprite can also freely walk around the level and interact with things; in particular, it can be despawned and a new sprite can be spawned in its slot.<br />
<br />
After the first tongue retracts fully, the first sprite is in Yoshi's mouth, and so this sprite is what determines what abilities Yoshi has. In particular, with a blue Yoshi and a shell of any color or a Yoshi of any color and a blue shell, Yoshi will get wings, as in Groovy in the video above. Once the second tongue retracts, this is updated to the new sprite which was hit by the second tongue, but that sprite is not actually in Yoshi's mouth. In the video, this again gives you wings. If that sprite despawns, Yoshi maintains his same abilities until a new sprite is spawned in its place (typically the sliding blue Koopa) at which point they are updated. With this in mind it is often possible to determine in real-time whether the boss kill will still be possible or has failed due to improper sprite slot management well before completing the full sequence of events.<br />
<br />
===Stunning a Sliding Blue Koopa===<br />
<br />
[[File:Stunned sliding blue koopa.png|thumb|This sprite is not the boss, it is the stunned sliding blue Koopa. The boss itself is invisible.]]<br />
<br />
For the boss kill glitch, the goal is to stun a sliding blue Koopa. Note that it must still be in its sliding animation or have just stood up; once the blue Koopa starts walking it is technically a different sprite and the boss kill is not possible. Conceptually, to do this, all that needs to be done is despawn the sprite that is in the sprite slot which is tied to Yoshi's mouth (the second sprite in the double-tongue glitch) by any means, and spawn a sliding blue Koopa in its place. At this point Yoshi can spit the sliding blue Koopa out of his mouth to put it in its stunned state at any time (until it stands up of course). <br />
<br />
However, doing this just gives us a stunned sliding blue Koopa, which is not very useful on its own. What is required to spawn a boss from the Koopa is to set its stun timer. The stun timer will then count down, and when it reaches 0, a new sprite will spawn out of the stunned sprite. This is an intended game mechanic which is used so that naked Koopas can jump out of their shells after Yoshi eats the shell and spits it back out, but the ability to stun almost any sprite in the game is obviously not intended and when other sprites' stun timers hit 0, many other sprites can be spawned. In the case of a sliding blue Koopa, the sprite that is spawned is a koopa kid boss (the same sprite is used for all Koopa kids apart from Wendy/Lemmy).<br />
<br />
Luckily, the game reuses the stun timer as the timer for how long to display the dust cloud after an enemy is killed by Yoshi or by Mario's spin jump. Jumping on the sliding blue Koopa before it is stunned lets the player set the timer to 1F (or 31 in decimal). From there, the player must spit the sliding blue Koopa out of Yoshi's mouth to put it in its stunned state before the timer hits 0. Once the timer does hit 0, the Koopa Kid boss will spawn from the stunned Koopa. In practice this maneuver is tricky, and if done incorrectly, the boss may hurt Mario while riding Yoshi or be killed by the stunned koopa sprite. Note that there are other ways to set the stun timer of the Koopa; in particular, it is also set on the frame the Koopa spawns, and this can be exploited for a faster (but more precise) boss kill method in Groovy:<br />
<br />
{{youtubevideo|url=YiVQDShdneY|title=Faster ending for GBK|source=MostlySMW}}<br />
<br />
===Defeating the Boss===<br />
<br />
The koopa kid boss's properties are determined by the room it is spawned in, and spawning one outside the normal boss rooms is not intended so it ends up somewhat glitchy. The boss has similar properties to Morton, Roy, and Ludwig. In particular, it can be defeated after 3 or more hits if the last hit is a jump, or 12 hits if fireballs are used. Note that after the boss is jumped on once, it teleports to an inaccessible location, meaning that jumps alone will not suffice; at least 2 fireballs are required. But unlike Morton, Roy, and Ludwig, the boss has a very long "animation" which it plays when it is killed via a jump. Because of this, 12 fireballs is actually generally a faster method than 2 fireballs and a jump to kill the invisible boss. <br />
<br />
To dispatch with the boss as quickly as possible, the player needs to get very close to the boss while mashing X and Y to shoot fireballs. Because of the interaction framerule for Mario's fireballs, if Mario stands too far away from the boss, the fireballs will each take 4 frames longer to reach their target, which adds up to quite a significant time loss. However, the boss can still hurt Mario and is invisible, so it is slightly risky to do this. Many runners will wait until a couple fireballs connect to get a good idea of the boss's location before closing in. Additionally, while the boss is spawned, it is crucial that Mario not move too far left or right or else Mario will get stuck and not be able to move horizontally. The specific conditions involve the camera position relative to screen boundaries, but as screen boundaries are not visible in the game itself, the limits need to be manually tested for any level where a boss kill is being done.<br />
<br />
For speedrunning purposes, it is also noteworthy that the boss kill will cause a longer fanfare to play than beating a level via a goal tape. The boss kill fanfare is approximately 1.68s longer, which is more than 2 in-game seconds. One should be careful to time strats correctly with this in mind. [http://dotsarecool.com/practice The Practice Cart] will automatically give the correct time including the fanfare (but it will ''not'' account for any powerup transitions during the fanfare).<br />
<br />
[[Category:Tricks & Glitches]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Vanilla_Dome_3&diff=3497Vanilla Dome 32020-02-22T08:16:24Z<p>3rdLavaDolphin: /* Cape Categories */</p>
<hr />
<div>{{LevelStats<br />
|title=Vanilla Dome 3<br />
|image=[[File:VanillaDome3.png]]<br />
|96exit=333<br />
|95exit=313<br />
|allcastles=333<br />
|lunardragon=311<br />
|powerups=[[File:flower.png]] [[File:feather.png]] [[File:green.png]]<br />
|coinsmoons= [[File:dragoncoin.png]] [[File:moon.png]]<br />
|previous=Vanilla Dome 2<br />
|next=Vanilla Dome 4<br />
}}<br />
<br />
== Cape Categories ==<br />
=== First Half ===<br />
Rubbing up against the blue pipe makes Mario grip the steep slope when he runs down it. This consistently gives p-speed by the end of the second raft.<br />
{{VisualCue|[[File:Vd3 cue.png|200px]]|A faster alternative is to spin jump when crossing the line between the 3rd and 4th skull on the very first raft, which if done successfully, makes rubbing up the pipe unnecessary.}}<br />
<br />
==== Normal Flight====<br />
{{youtubevideo|url=AK_fxoebPlg|title=Vanilla Dome 3 First Half - Cape (Normal Flight)|source=Sten}}<br />
<br />
==== Faster ====<br />
<br />
There are several optimizations here compared to above, which are described in the YouTube video description.<br />
<br />
{{youtubevideo|url=jno69jGYiSg|title=VD3 Room 1 (Cape) - Easy 272|source=ThirdLavaDolphin}}<br />
<br />
==== Yolo Fly ====<br />
This strat is very tricky, and only saves about 1.2 seconds.<br />
{{youtubevideo|url=6lDz5i5ABbY|title=Vanilla Dome 3 First Half - Cape (Yolo Fly)|source=Lui}}<br />
<br />
=== Second Half ===<br />
In All Castles, red blocks will not be active, so it is possible to spinfly and hit the yoshi block from the side.<br />
==== Normal Flight ====<br />
Try to avoid touching the walls when flying around on yoshi as it is possible to wall clip and lose p-speed.<br />
{{youtubevideo|url=o8JtBxS1gds|title=Vanilla Dome 3 Second Half - Normal Flight|source=Sten}}<br />
<br />
==== Blargg Skip ====<br />
Saves about 2 seconds over the normal flight. It can be a little tricky to get enough height to get over the lava wall, but it should be fairly consistent if you fly from just before the blargg. If you take off too late you'll stay inside the alcove area and can still attempt the normal flight as a backup.<br />
{{youtubevideo|url=DaSMEG0BhfM|title=Vanilla Dome 3 Second Half - Blargg Skip|source=Sten}}<br />
==== Raft Skip ====<br />
The inputs for this strat are quite complex, but can be made very consistent with practice. It is important to note that when bouncing off the blargg, you must be holding b, and not holding any direction on the d-pad. Right should be held as soon as possible after the bounce.<br />
{{youtubevideo|url=BPvTAfOPg_U|title=Vanilla Dome 3 Second Half - Raft Skip|source=Sten}}<br />
<br />
== All Castles ==<br />
=== Buzzy Bounce ===<br />
Bouncing on the buzzy to avoid walking up the wall saves time without red blocks. Keep in mind this will slightly shift the take-off spot for raft skip because of not having any pspeed when grabbing yoshi.<br />
{{youtubevideo|url=XV1arGw19_k|title=Vanilla Dome 3 Buzzy Bounce (No Red Blocks, Get Yoshi)|source=SilverStar6609}}<br />
<br />
<br />
== 95 Exit, No Cape ==<br />
<br />
=== No Shell Jump === <br />
{{youtubevideo|url=xUH7krad7tQ|title=Vanilla Dome 3 - No Cape, Get Yoshi (No Shell Jump)|source=Calco2}}<br />
<br />
=== Wall Shell Jump ===<br />
{{youtubevideo|url=lW05GA-Rgmw|title=Vanilla Dome 3 - No Cape, Get Yoshi (Wall Shell Jump)|source=Calco2}}<br />
<br />
=== Shell Jump ===<br />
This strat shows off a different way of shell jumping up to the bonus game pipe. It also shows a faster yoshi grab in the second half of the stage.<br />
{{youtubevideo|url=fUarplGpl9g|title=Vanilla Dome 3 - No Cape, Get Yoshi (Shell Jump)|source=Calco2}}<br />
<br />
== All Castles, No Cape ==<br />
Shows the fast yoshi spawn you can do in this category. Could do the same with fast room 1 by grabbing a shell before the pipe.<br />
Also shows the no blue shell end with setup for getting p-speed for the final raft jump.<br />
{{youtubevideo|url=rFGK2Wb63hA|title=Vanilla Dome 3 - No Cape, Get Yoshi (No Shell Jump)|source=Fitz1889}}<br />
<br />
== Lunar Dragon ==<br />
{{youtubevideo|url=LkyXNRQ8nyA|title=Vanilla Dome 3 Normal Exit - Lunar Dragon, Get Yoshi|source=Umari0}}<br />
<br />
== Small Only ==<br />
{{youtubevideo|url=4Mjn0xlPEQk|title=Vanilla Dome 3 - Small Only|source=rezephos}}<br />
<br />
<br />
{{Levels}}<br />
[[Category:Vanilla Dome]]<br />
[[Category:Level]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3496Advanced Flying Techniques2020-02-14T22:43:37Z<p>3rdLavaDolphin: /* Sticky Fly */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
Cape-spinning while getting a big aircatch works differently from with a regular aircatch (which results in the low aircatch described above). Instead, if the capespin is done quickly enough, Mario will not have time during the big aircatch to accelerate to maximum upward speed. In this case, the big aircatch property is stored while Mario faces backward. During that time while he faces backward, he cannot accelerate upward, but he will maintain most of the upward velocity during the frames he faces backward. The overall result is that a greater vertical distance can be covered than normal. This allows Mario to navigate in certain tight spots while cape-flying, such as the gap near the keyhole in [[Star World 5]].<br />
<br />
In rare cases, when Mario ends the capespin facing backward, he may not have a chance to clear the big air flag. In this case, as soon as Mario begins to face forward again (either from changing direction or from accelerating above 0 speed) he will immediately start accelerating upward again. This is a double aircatch, and can be used to gain much more height than an ordinary big aircatch. Unfortunately, under normal circumstances it is not possible to get more than two aircatches this way. To store the big aircatch through a capespin Mario must begin the capespin with a relatively high downward velocity. It is possible to gain more height (called an infinite/perpetual/continuous aircatch; see below), but this requires using the B button to cancel forward momentum rather than a capespin.<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
If Mario aircatches with big air near a ceiling, he will hit the ceiling before reaching maximum upward velocity. In this case, the big air flag will not be cancelled and he will continue to ascend into the ceiling as long as he remains moving forward and backward on the d-pad (and X/Y) continue to be held. The overall result is that Mario will travel forward while "sticking" to the ceiling. The stickyfly can be maintained on both downward and upward sloped ceilings, but corners will sometimes kill Mario's speed depending on precise positioning. <br />
<br />
Speed can be adjusted by briefly releasing backward and tapping forward. This should be done quickly, but has enough frames of leeway that there is generally no risk of losing the stickyfly.<br />
<br />
Note that if the aircatch is initiated by pressing and holding X/Y with remaining takeoff meter, Mario will hit the ceiling normally and bounce off even with big air unless backward on the d-pad is also held; see for instance this example (note that left and right are alternated on the d-pad here to preserve as much horizontal speed as possible):<br />
<br />
{{youtubevideo|url=GuTJNOi0chQ|title=Vanilla Dome 3 example|source=ThirdLavaDolphin}}<br />
<br />
=== Without Big Air ===<br />
<br />
It is possible to stickyfly without having big air stored; however, it is much more precise. In practice, one needs to cut the corner of the ceiling as tightly as possible and the aircatch is generally frame-perfect. Mario should hit a positive upward speed and, on the same frame, hit the ceiling. Even with frame-perfect timing it may not always work if the precise subpixel positions don't work out. It will be much easier to begin this type of stickyfly if Mario can do so on a downward sloped ceiling, such as in the sublevel of [[Vanilla Dome 1]].<br />
<br />
It is extremely difficult (though possible) to adjust speed during this type of stickyfly.<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3495Advanced Flying Techniques2020-02-14T22:20:34Z<p>3rdLavaDolphin: /* Extended Aircatch */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
Cape-spinning while getting a big aircatch works differently from with a regular aircatch (which results in the low aircatch described above). Instead, if the capespin is done quickly enough, Mario will not have time during the big aircatch to accelerate to maximum upward speed. In this case, the big aircatch property is stored while Mario faces backward. During that time while he faces backward, he cannot accelerate upward, but he will maintain most of the upward velocity during the frames he faces backward. The overall result is that a greater vertical distance can be covered than normal. This allows Mario to navigate in certain tight spots while cape-flying, such as the gap near the keyhole in [[Star World 5]].<br />
<br />
In rare cases, when Mario ends the capespin facing backward, he may not have a chance to clear the big air flag. In this case, as soon as Mario begins to face forward again (either from changing direction or from accelerating above 0 speed) he will immediately start accelerating upward again. This is a double aircatch, and can be used to gain much more height than an ordinary big aircatch. Unfortunately, under normal circumstances it is not possible to get more than two aircatches this way. To store the big aircatch through a capespin Mario must begin the capespin with a relatively high downward velocity. It is possible to gain more height (called an infinite/perpetual/continuous aircatch; see below), but this requires using the B button to cancel forward momentum rather than a capespin.<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3494Advanced Flying Techniques2020-02-14T22:09:15Z<p>3rdLavaDolphin: /* Low Aircatch */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
If Mario spins his cape right as he catches air (without big air), depending on the capespin framerule he may gain significantly less height than normal. This is because, once Mario faces backward (that is, opposite the direction he is moving), the aircatch will be cancelled. How much lower than normal Mario will go depends on the relative timing of the aircatch and the capespin, as well as when this occurs relative to the capespin framerule. This can be used to fly in very tight spaces, such as between water/castle lava and the death plane in a level like [[Vanilla Dome 2]] or [[Wendy's Castle]], but by nature it is inconsistent due to reliance on the capespin framerule.<br />
<br />
Often, this may be done accidentally if the player wants Mario to turn around with the capespin. In this case it is a good idea to aircatch before capespinning, to give the most time to react to which direction Mario faces. The problem occurs when the aircatch and capespin are done too close together. In that case, the result may be a low aircatch, which gives much less time to react than normal. One should be certain to delay the capespin at least enough that Mario gets a full aircatch, which only requires waiting a few frames.<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3493Advanced Flying Techniques2020-02-14T21:56:31Z<p>3rdLavaDolphin: /* P-Balloon */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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 this will only be possible right after collecting the balloon. To cause an earthquake Mario's flight phase must be the maximum value of 6 when hitting the ground. After collecting the balloon you will not be able to change his flight phase and it will decrease below 6 within a few frames. Obviously this will also cancel the flight state.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3472Advanced Flying Techniques2020-01-03T14:34:25Z<p>3rdLavaDolphin: /* Low Takeoff */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
If you want to be sure to avoid getting a low takeoff, there are two easy methods. First, rather than floating to the ground (holding A/B), release it early enough that Mario begins falling normally in midair. If this is not possible, simply running on the ground for a while will also reset the descent framerule; you never need more than 15 frames of Mario being grounded, but fewer will suffice depending on the factors described above.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3471Advanced Flying Techniques2020-01-03T08:35:28Z<p>3rdLavaDolphin: /* Low Takeoff */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
Here is a demonstration video of this technique being used; this is intended solely as an example:<br />
<br />
{{youtubevideo|url=fs3nNeNHmB4|title=Low Takeoff example|source=ThirdLavaDolphin}}<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3470Advanced Flying Techniques2020-01-03T08:17:10Z<p>3rdLavaDolphin: /* Miscellaneous Techniques */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Low Takeoff ==<br />
<br />
While airborne with cape, Mario can only stop floating and start descending on specific frames, determined by when the RAM address $7E14A5 becomes zero. This address constantly cycles as 16 (decimal), 15, 14, ..., 1, 16 and then back to 16 while A/B is held while airborne, and if A/B is released, it will go from 1 to 0 instead. If it is 0 and A/B is pressed while caped and airborne, it will become 16 again and begin cycling. This is represented by the following flowchart:<br />
<br />
[[File:7E14A5.png]] <br />
<br />
Ordinarily this means that when Mario takes off with p-speed by pressing A or B, he will ascend for a minimum of 16 frames before he can even begin falling. This can be undesirable for various reasons, including low vertical space, tight takeoff meter manipulation, or simply a desire to get flight speed as quickly as possible.<br />
<br />
However, if Mario is airborne with cape and lands on the ground, this address is not cleared. If its value is high enough and he manages to take off quickly after landing before the meter hits 0, rather than starting a new descent framerule, this new takeoff can fall on the previous descent timer. If that timer was close to expiring, and A/B is released before it does, Mario can begin descending much faster than the normal 16 frames. In order to pull this off, the player needs to start a new descent framerule (i.e. have 7E14A5 become 16), and then, in quick succession, land on the ground, press A/B, and release A/B, all before the timer reaches 1. Done perfectly, the resulting jump will be essentially the same height as a quick tap-jump without cape. If the A/B press comes earlier than the absolute latest possible frame, Mario will ascend for that many additional frames; in many applications it is not necessary to perform this perfectly as the result will still be significantly lower than if this technique was not used.<br />
<br />
Because the descent framerule is not normally visible to the player, knowing when it becomes 16 is difficult if A/B are held for a long period of time. Instead, it is often helpful to briefly press (or even tap) A/B while Mario is falling and near the ground to start a new descent timer. This is a relatively new technique (at least in realtime play) and the best ways of setting it up in the instances where it is applicable are still being researched.<br />
<br />
=== Left-right takeoff ===<br />
<br />
If an even lower takeoff is required, while doing this technique the player can also do a left-right to kill Mario's p-meter, and then regain it, and time the A/B press right as full p-meter is regained but before Mario reaches full p-speed. If A/B is pressed with 40-47 speed, the same jump height will result as if this is not done and the player hits 47 speed on Mario's oscillation. If it is done very well, speeds in the range 32-39 give an even lower jump, (full p-meter will requires at least 35 speed). That said, this should only be considered if the previous technique is already maximized or not possible, because it is quite ineffective compared to doing the above method a frame or two better.<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:7E14A5.png&diff=3469File:7E14A5.png2020-01-03T07:58:14Z<p>3rdLavaDolphin: Flowchart describing how Mario's cape descent framerule works.</p>
<hr />
<div>Flowchart describing how Mario's cape descent framerule works.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3454Advanced Flying Techniques2019-12-27T14:31:27Z<p>3rdLavaDolphin: /* Quick Dive */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
This technique is essentially the opposite of the quick aircatch described above.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3453Advanced Flying Techniques2019-12-27T14:22:40Z<p>3rdLavaDolphin: /* Quick Aircatch */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight vertical space (e.g. at the bottom of the level under lava, though in principle this technique is not needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3452Advanced Flying Techniques2019-12-27T14:20:07Z<p>3rdLavaDolphin: /* Quick Aircatch */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly or fly in a very tight space (e.g. at the bottom of the level under lava, though this technique is not technically needed for doing so).<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3451Advanced Flying Techniques2019-12-27T14:18:01Z<p>3rdLavaDolphin: /* Quick Aircatch */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Each backward press changes Mario's cape phase (represented by the angle of Mario's cape in his flying animation) by 1. To catch air, one needs to go from cape phase (at least) 3 to phase 1. By pressing back twice in quick succession, Mario will catch air faster than simply by holding it. To be useful, this needs to be combined with the ideal timing for pressing back described above. For obvious reasons this should generally only be done when it is necessary to gain altitude quickly.<br />
<br />
Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately, saving 8 frames over the simple method. Of course this is quite difficult to do on a standard SNES controller, but it is not unreasonable to save around 4 frames with practice.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Terminology&diff=3447Terminology2019-12-19T18:23:13Z<p>3rdLavaDolphin: /* General Terms */</p>
<hr />
<div>== Abbreviations ==<br />
;NSW:[[No Starworld]]<br />
;NCNSW:[[No Cape, No Starworld]]<br />
;AC:[[All Castles]]<br />
;YI:[[Yoshi's Island]]<br />
;DP:[[Donut Plains]]<br />
;VD:[[Vanilla Dome]]<br />
;FoI:[[Forest of Illusion]]<br />
;CI:[[Chocolate Island]]<br />
;VoB:[[Valley of Bowser]]<br />
;SW:[[Star World]]<br />
;SP:[[Special World]]<br />
;IL:[[Individual Level]]<br />
;RNG:[[RNG|Random Number Generator]]<br />
;TAS:Tool Assisted Speedrun / Tool Assisted Superplay<br />
;GBK:[[Groovy]] Boss Kill<br />
;CMBK:[[Cookie Mountain]] Boss Kill<br />
;DBK:Double Boss Kill--getting both GBK and CMBK in a single run<br />
;ARK:[[Awesome]] Reznor Kill<br />
<br />
== General Terms ==<br />
;Wiggle/Left-Right/Turnback:While running, pressing left for a short time to slow down. Useful for manipulating enemy spawns or for correcting a jump that went too far.<br />
;Long Jump: Tapping jump and immediately regrabbing and holding it to get a low jump but slow falling, resulting in a longer jump.<br />
;Clip: Falling through or getting stuck any sort of solid platform.<br />
;Wall Clip:When running into a wall at a high speed, and Mario acts as if he were standing on solid ground for a frame. Allows for a wall jump, but also kills [[Mechanics|P-Speed]] and spin jumps.<br />
;Corner Clip:When running into a corner at the top of a wall, and Mario hits the wall and the floor at the same time. Mario makes it to the platform, but [[Mechanics|P-Speed]] is lost. If Mario is going fast enough, he can actually fall through the block.<br />
;Wall Jump:Jumping on the frame(s) Mario is technically standing on solid ground during a wall clip.<br />
;Stair Clip/Slope Clip: When jumping at a shallower angle than the slope at the right place, Mario can fall through the slope.<br />
;Yoshi Clip: Using Yoshi to easily clip through a solid block. See [[Yoshi Clips]].<br />
;Block Dupe: Abusing bad collision to create extra blocks by hitting them with an item at a particular position.<br />
;Wings: The item that Yoshi can grab to go to a bonus room and end the level prematurely. Usually refers to spawning unintended wings using block dupes. See [[Wings]].<br />
;Shell Jump: Throwing a shell midair and jumping off of it immediately after. See [[Shell Jumps]].<br />
;Item Swap: Allowing Yoshi to eat any sprite in the game by removing the item off of Yoshi's tongue as he is grabbing it.<br />
;Cloud: The cloud Lakitu rides around in; usually refers to the item swap that gives you a cloud in your item box. See [[Cloud]].<br />
;Orb: The green ? orb at the end of [[Sunken Ghost Ship]]. Usually refers to the item swap that gives you an orb in your item box. See [[Orb]].<br />
;Neutral Jump/Hopping Glitch: Abusing speed mechanics to make Mario move ever-so-slightly faster by releasing right on the D-pad. Can be used to eke out an extra game second on the clock.<br />
;Fast Yoshi: Block duping a Yoshi block, which causes Yoshi to hatch quickly. Usually used in [[Yoshi's Island 2]] for [[11 Exit]] runs.<br />
;Fast Fly: Abusing speed mechanics to make Mario fly faster by tapping right until Mario is flying as fast as he can. See [[Mechanics|Flying]].<br />
;Pipe Fly/Door Fly: Abusing flying mechanics to retain flight after entering a door or pipe.<br />
;Cannon Fly: Getting pipe-fly through a cannon pipe in order to fly with a higher speed than normal.<br />
;Sticky Fly: Abusing flying mechanics to stick to a ceiling while flying.<br />
;Yoshi Flight: Abusing flying mechanics to enter the flying state while riding Yoshi.<br />
;One Tile Fly: Landing on a single block and taking off again.<br />
;Zips/Tornadoes/Smashola: Abusing collision mechanics to quickly move downward by pushing Mario through yellow turn blocks.<br />
;Corner Boost: Using the edge of a block to push Mario slightly forward by moving fast enough upwards. Primarily used in water levels where it can save a frame or so per corner.<br />
;P-switch Jump: When Mario lands on a P-switch, he is considered to be on the ground for 1 frame. Pressing jump on this frame allows Mario to jump off of the switch.<br />
;[[Yump]]: Not a P-switch jump.<br />
;Key Jump: Mario can stand on a key in midair, and jump off it. By pressing Y and B on the same frame, he will regrab the key while jumping, and the process can be repeated arbitrarily. Used in some difficult [[ROM hack]] speedruns.<br />
;Platform Boost: Moving sprite platforms will push Mario while he runs on them. As such, running on platforms moving in the same direction he is moving saves time (and platforms moving the opposite direction lose time).<br />
;Eat/Tongue Cancel: Getting hit off of Yoshi while a sprite is on Yoshi's tongue will knock it off his tongue, but also modifies the sprite's interactions.<br />
;Double Eat: If two enemies are fed to baby Yoshi in quick succession, an extra one will be counted. This allows baby Yoshi to be fed with as few as 3 enemies (compared to 5 normally). If the counter is already at 4 sprites, and then the player does a double-eat with two more sprites, the last one will not be eaten but will be in a glitched state. This is similar to a tongue-cancel, but unlike tongue-cancelling, all interaction with the glitched sprite is disabled in this case.<br />
;Double Tongue: If Mario goes through a powerup (or powerdown) animation 1 frame after Yoshi's tongue begins, Yoshi will stick his tongue out a second time, even if the first tongue grabs something. This glitch is used in various boss kills.<br />
<br />
== Strat Nicknames ==<br />
;Underball: Going under the Podoboo in room 1 of [[Iggy's Castle]].<br />
;Dank-Ass Iggy Room: Getting a 282 on the game timer in room 1 of [[Iggy's Castle]] without doing Underball.<br />
;Morton Fly: Spin flying up room 3 of [[Morton's Castle]].<br />
;Fast Red Switch: Hitting the P-switch and getting pipe fly in [[Red Switch Palace]].<br />
;Dirty Eerie: Taking off before the two Eeries in [[Vanilla Ghost House]].<br />
;Ride of Shame: Riding on the skull rafts in [[Vanilla Dome 3]] without flying past them.<br />
;Yolo Fly: Skipping the 2nd skull raft in [[Vanilla Dome 3]] by performing a very tight spin fly without doing a turnback.<br />
;Blargg Skip: Skipping the skull raft after the midway point in [[Vanilla Dome 3]] by bouncing off a Blargg.<br />
;Raft Skip: Completely skipping the skull raft after the midway point in [[Vanilla Dome 3]] by using Yoshi flight.<br />
;Vanilla Dode 3: Doing all the fastest strats in [[Vanilla Dome 3]]; nicknamed after speedrunner [[Dodechehedron]].<br />
;Goal Post Eat: Getting an unintentional item swap in [[Star World 3]] that results in Baby Yoshi eating the goal tape, making the normal exit unbeatable.<br />
;Awesome Flower: Grabbing the fire flower in [[Awesome]].<br />
;Red Block Thing: Taking off from the lowest Red ! Block while getting the secret exit of [[Vanilla Dome 1]].<br />
;Getting Mooned/Getting Blocked/Scraping: Flying through a level with obstacles in the air, but losing flight due to crashing into them instead of flying over.<br />
;Back to the Future: Getting 288 on the game timer in the first room of [[Ludwig's Castle]].<br />
;Left Side Clip: Yoshi clipping on the left side of the ledge in [[Forest of Illusion 2]].<br />
;Dickbutt: The visual cue for jumping in [[Forest Secret Area]].<br />
;Dirty Bubble: Taking off before the first bubble in [[Forest of Illusion 3]].<br />
;Roy Fly: Flying through the first half of [[Roy's Castle]], skipping the block snake.<br />
;Dirty Hole: Taking off before the first hole in [[Choco-Ghost House]].<br />
;Cooter Kill: Finishing off Wendy in [[Wendy's Castle]] by hitting her the third time while she is sticking out of a pipe upside-down.<br />
;Scroll-less Despawn: Despawning one of the Boo Rings in [[Sunken Ghost Ship]] by manipulating when the Boo Cloud appears.<br />
;Sexy Slide: Smoothly gliding through the one tile hole in [[Valley Ghost House]] by the key and keyhole.<br />
;Sandbar: The second room of [[Valley of Bowser 2]].<br />
;Sandbar Clip: Clipping through the sandbar to save 12 seconds.<br />
;The Double: Clipping through the sandbar twice to save 18 seconds.<br />
;The Triple: Clipping through the sandbar three times to save 18.5 seconds.<br />
;The Quad: Clipping through the sandbar three times, then clipping through the floor in the 3rd room to save 19 seconds.<br />
;Cape Kill: The optimal strategy for defeating Bowser by flying in the sky at certain times to hit him as quickly as possible.<br />
;Ball Skip: Hitting Bowser while his is preparing the toss a ball, which causes him to not throw it.<br />
;Cloud Kill: The optimal strategy for defeating Bowser by using the [[Cloud]] to skip Bowser's animations.<br />
[[Category:Getting Started]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3442Advanced Flying Techniques2019-12-11T19:22:14Z<p>3rdLavaDolphin: /* Optimal Tapping */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
If you have identified your current speed, the number of frames you need to hold right can be determined easily as ''SPEED - 46'' (so long as your speed is between 47 and 50). Holding forward for an extra 5 frames (which does not change the final speed) can be helpful as well.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3441Advanced Flying Techniques2019-12-11T19:20:08Z<p>3rdLavaDolphin: /* Speed Mod 2 and Mod 4 */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
If Mario begins a room from a stationary position midair (such as a vertical pipe exit), he will spend 1 frame before entering flight (if there is takeoff meter remaining). Based on this, the player can immediately manipulate either an odd speed by holding forward or an even one by holding neutral as the room begins. Holding forward for just 1 frame will give 1 speed, and each subsequent frame adds 4 speed (of course until 49 is reached). Be aware that romhacks with modifications to give Mario flight automatically (rather than through pipe/doorfly) may not respect this though.<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Version_Differences&diff=3440Version Differences2019-12-11T05:23:53Z<p>3rdLavaDolphin: /* Nintendo Super System */</p>
<hr />
<div>This page is to compare the different versions of Super Mario World.<br />
<br />
= Versions =<br />
<br />
There are six versions of Super Mario World that are currently allowed on the leaderboards.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Abbr. !! Version !! Found<br />
|-<br />
| '''J''' || Japanese || The only version with Japanese text, this version was released in Japan.<br />
|-<br />
| '''U''' || North American || The localized version of the game for NTSC audiences.<br />
|-<br />
| '''UW''' || North American All-Stars + World || This version was bundled in with Super Mario All-Stars.<br />
|-<br />
| '''E0''' || PAL v1.0 || Rare. The localized version of the game for PAL audiences, but the resolution hadn't been updated to fill the PAL screen.<br />
|-<br />
| '''E1''' or '''E''' || PAL v1.1 || The updated version of the PAL release. This version removed the black bars at the top and bottom of the screen.<br />
|-<br />
| '''EW''' || PAL All-Stars + World || This version was bundled in with Super Mario All-Stars in PAL regions.<br />
|}<br />
<br />
== Version Differences ==<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
|-<br />
!<br />
!style="width:100px;"| '''J''' <br />
!style="width:100px;"| '''U''' <br />
!style="width:100px;"| '''UW''' <br />
!style="width:100px;"| '''E0''' <br />
!style="width:100px;"| '''E1''' <br />
!style="width:100px;"| '''EW''' !! Notes<br />
|-<br />
|style="text-align:right;"| '''Text''' || Japanese <br />
|colspan="5"| English<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Intro Screen''' || Auto <br />
|colspan="5"| Actuate <br />
|style="text-align:left;"| In order to advance passed the intro cutscene, a button must be pressed on all versions but J.<br />
|-<br />
|style="text-align:right;"| '''Save Boxes''' || Small <br />
|colspan="5"| Big <br />
|style="text-align:left;"| The size of the save boxes had to change to accommodate English text, so they take up more time to display.<br />
|-<br />
|style="text-align:right;"| '''Switch Palace Fanfare''' || Short <br />
|colspan="5"| Long <br />
|style="text-align:left;"| The amount of time required to dismiss the Switch Palace fanfare was changed to make it easier to read the cutscene text.<br />
|-<br />
|style="text-align:right;"| '''Reenter Castles with L+R''' || No<br />
|colspan="5"| Yes<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Level Design''' || Edible Dolphins <br />
|colspan="5"| Small Level Changes <br />
|style="text-align:left;"|See [[#lvldiff|Level Differences]].<br />
|-<br />
|style="text-align:right;"| '''Gameplay'''<br />
|colspan="3"| Original Physics<br />
|colspan="3"| Updated Physics <br />
|style="text-align:left;"| In order to accamodate the framerate change, the physics were changed in the PAL region so the game didn't seem to run slow.<br />
|-<br />
|style="text-align:right;"| '''Framerate'''<br />
|colspan="3"| 60 Hz<br />
|colspan="3"| 50 Hz <br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Resolution'''<br />
|colspan="4"| 256x224<br />
|colspan="2"| 256x239 <br />
|style="text-align:left;"| The E0 version had black bars at the top and bottom of the screen.<br />
|-<br />
|style="text-align:right;"| '''Exit Counter''' || >= 96 || Up to *96 || >= *96 <br />
|colspan="2"| blue; >= 96 <br />
|style="text-align:left;"| >= *96 <br />
|style="text-align:left;"| By collected extra glitched exits, the counter can go above 96 in all but the U versions.<br />
|-<br />
|style="text-align:right;"| '''Luigi'''<br />
|colspan="2"| Mario palette swap || Unique Graphics <br />
|colspan="2"| Mario palette swap || Unique Graphics<br />
|style="text-align:left;"|<br />
|-<br />
|style="text-align:right;"| '''Exiting Game'''<br />
|colspan="2"| None || Press Select on Overworld<br />
|colspan="2"| None || Press Select on Overworld<br />
|style="text-align:left;"|<br />
|}<br />
<br />
== Releases ==<br />
<br />
Super Mario World has been released on 6 systems, but not every version is available on every system. Here is a chart that shows which versions exists on each system.<br />
<br />
{| class="wikitable"<br />
|-<br />
! !! '''J''' !! '''U''' !! '''UW''' !! '''E0''' !! '''E1''' !! '''EW'''<br />
|-<br />
| Super Nintendo || ✓ || ✓ || ✓ || ✓ || ✓ || ✓ <br />
|-<br />
| Wii VC || ✓ || ✓ || || || ✓ || <br />
|-<br />
| 3DS VC || ✓ || ✓ || || || * || <br />
|-<br />
| WiiU VC || ✓ || ✓ || || || * || <br />
|-<br />
| SNES Classic || ✓ || ✓ || || || * || <br />
|-<br />
| Nintendo Switch Online || ✓ || ✓ || || || || <br />
|}<br />
<br />
&#42; While PAL 3DS, WiiU, and SNES Classic releases exist, they are actually the U version, since the 50 Hz versions are of no use anymore.<br />
<br />
=== How to Tell Which Version You are Playing ===<br />
[[File:Resolution_difference.png|frame|The 256x239 resolution of the PAL versions (shown on left) causes more of the bottom of the level to show on screen.]]<br />
<br />
If you aren't sure which version your cartridge is, just follow this questionaire:<br />
# Is the text in Japanese?<br />
#* Yes - '''J''' version<br />
#* No - continue...<br />
# What system are you playing on?<br />
#* 3DS VC, WiiU VC, SNES Classic, or Nintendo Switch Online - '''U''' version<br />
#* Super NES or Wii VC - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''E1''' version<br />
#* 2 on Wii VC - '''U''' version<br />
#* 2 on Super NES - continue...<br />
# Are you playing a version of All-Stars + World?<br />
#* No - go to 6.<br />
#* Yes - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''EW''' version<br />
#* 2 - '''UW''' version<br />
# Go to [[Yoshi's Island 1]] and hold run and right as the level loads. What happens?<br />
#* Mario hits the Koopa and dies - '''U''' version<br />
#* Mario runs under the Koopa and survives - '''E0''' version<br />
<br />
= PAL vs NTSC =<br />
<br />
To compensate for the PAL system that runs at 50fps opposed to 60fps - developers made Mario run faster in the PAL rom to offset the difference. As a result Mario can make jumps that are not possible in the NTSC version, so different routes would be taken. It is difficult to compare runs between these two versions. Even though Mario's running speed was increased to make up for the slower framerate, other parts of the game like cutscenes and the overworld were not sped up, so generally runs on PAL versions will be much slower because of this.<br />
<br />
This video demonstrates some of the speed differences between PAL and NTSC versions of the game:<br />
{{#ev:youtube|Cn9nvP-uRJI|560||}}<br />
<br />
= J Version Advantages =<br />
*J version is [https://www.twitch.tv/videos/48008136 0.267 seconds faster for each save message.]<br />
*J version is [https://www.twitch.tv/videos/48007985 3.2 seconds faster for each switch palace.]<br />
<br />
Taking into account these differences this is how it affects some main categories:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Category !! '''J''' is faster by<br />
|-<br />
| 11 Exit || 0.534 seconds<br />
|-<br />
| No Starworld || 2.670 seconds<br />
|-<br />
| All Castles || 3.204 seconds<br />
|-<br />
| 96 Exit || 20.810 seconds<br />
|}<br />
<br />
==Level Differences==<br />
*The message at the end of [[Funky]] reads "YOU ARE SUPER PLAYER!!" on the J version instead of "YOU ARE A SUPER PLAYER!!" like the other versions.<br />
*There is no yellow ! block at the beginning of [[Donut Plains 2]] in the J version.<br />
*There is visible cut-off on the J version on the right side of [[Donut Secret House]] if you scroll the screen to the right.<br />
*The time limit was changed to 400 seconds from 300 seconds in the J version of [[Lemmy's Castle]].<br />
*There are fewer arrow signs at the end of [[Chocolate Island 3]] in the J version.<br />
*The 3 extra lives below the orb in [[Sunken Ghost Ship]] are not present in the J version.<br />
*There are fewer green berries in [[Funky]] in the J version.<br />
*There is no cape near the beginning of [[Vanilla Dome 1]] in the J version.<br />
<br />
= Nintendo Super System =<br />
<br />
[[File:NSS_smw.png|thumb|200px|The Nintendo Super System version allows the player to begin in any of the seven "zones".]]<br />
<br />
There is a relatively little known arcade release of Super Mario World for the Nintendo Super System. Released only in the US, the Nintendo Super System is essentially a Super Nintendo in an arcade cabinet. This version can be differentiated from all others by the title screen (shown right). The Nintendo Super System version of the game is identical in physics and in all levels to the U version of the game, except that the message box in [[Yoshi's Island 4]] is no longer present (because Start+Select is disabled). Most glitches also function identically.<br />
<br />
There are several changes which make this version technically the fastest official release of Super Mario World. For one, the game does not save, so save prompts never appear. The intro cutscene can be skipped immediately after the message box text appears. Castle cutscenes can be scrolled by the player by mashing, drastically reducing their length. Finally, the player may choose to start in any one of the seven "zones", with previous levels already completed. The only change which could adversely affect speedruns is that Start+Select is disabled. Overall, this version would save several minutes compared to the versions above in a 96 exit run.<br />
<br />
For the leaderboards, this version is not currently allowed. This version can be run on a standard SNES (or emulator) through a flashcart, but obtaining a legitimate copy is prohibitively expensive. Additionally, only a very small number of such units were produced, while all the above versions have millions of sales. Finally, because of the massive time savings, allowing this version would essentially invalidate all historic runs.<br />
<br />
[[Category:Getting Started]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Version_Differences&diff=3439Version Differences2019-12-11T04:52:57Z<p>3rdLavaDolphin: /* Level Differences */</p>
<hr />
<div>This page is to compare the different versions of Super Mario World.<br />
<br />
= Versions =<br />
<br />
There are six versions of Super Mario World that are currently allowed on the leaderboards.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Abbr. !! Version !! Found<br />
|-<br />
| '''J''' || Japanese || The only version with Japanese text, this version was released in Japan.<br />
|-<br />
| '''U''' || North American || The localized version of the game for NTSC audiences.<br />
|-<br />
| '''UW''' || North American All-Stars + World || This version was bundled in with Super Mario All-Stars.<br />
|-<br />
| '''E0''' || PAL v1.0 || Rare. The localized version of the game for PAL audiences, but the resolution hadn't been updated to fill the PAL screen.<br />
|-<br />
| '''E1''' or '''E''' || PAL v1.1 || The updated version of the PAL release. This version removed the black bars at the top and bottom of the screen.<br />
|-<br />
| '''EW''' || PAL All-Stars + World || This version was bundled in with Super Mario All-Stars in PAL regions.<br />
|}<br />
<br />
== Version Differences ==<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
|-<br />
!<br />
!style="width:100px;"| '''J''' <br />
!style="width:100px;"| '''U''' <br />
!style="width:100px;"| '''UW''' <br />
!style="width:100px;"| '''E0''' <br />
!style="width:100px;"| '''E1''' <br />
!style="width:100px;"| '''EW''' !! Notes<br />
|-<br />
|style="text-align:right;"| '''Text''' || Japanese <br />
|colspan="5"| English<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Intro Screen''' || Auto <br />
|colspan="5"| Actuate <br />
|style="text-align:left;"| In order to advance passed the intro cutscene, a button must be pressed on all versions but J.<br />
|-<br />
|style="text-align:right;"| '''Save Boxes''' || Small <br />
|colspan="5"| Big <br />
|style="text-align:left;"| The size of the save boxes had to change to accommodate English text, so they take up more time to display.<br />
|-<br />
|style="text-align:right;"| '''Switch Palace Fanfare''' || Short <br />
|colspan="5"| Long <br />
|style="text-align:left;"| The amount of time required to dismiss the Switch Palace fanfare was changed to make it easier to read the cutscene text.<br />
|-<br />
|style="text-align:right;"| '''Reenter Castles with L+R''' || No<br />
|colspan="5"| Yes<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Level Design''' || Edible Dolphins <br />
|colspan="5"| Small Level Changes <br />
|style="text-align:left;"|See [[#lvldiff|Level Differences]].<br />
|-<br />
|style="text-align:right;"| '''Gameplay'''<br />
|colspan="3"| Original Physics<br />
|colspan="3"| Updated Physics <br />
|style="text-align:left;"| In order to accamodate the framerate change, the physics were changed in the PAL region so the game didn't seem to run slow.<br />
|-<br />
|style="text-align:right;"| '''Framerate'''<br />
|colspan="3"| 60 Hz<br />
|colspan="3"| 50 Hz <br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Resolution'''<br />
|colspan="4"| 256x224<br />
|colspan="2"| 256x239 <br />
|style="text-align:left;"| The E0 version had black bars at the top and bottom of the screen.<br />
|-<br />
|style="text-align:right;"| '''Exit Counter''' || >= 96 || Up to *96 || >= *96 <br />
|colspan="2"| blue; >= 96 <br />
|style="text-align:left;"| >= *96 <br />
|style="text-align:left;"| By collected extra glitched exits, the counter can go above 96 in all but the U versions.<br />
|-<br />
|style="text-align:right;"| '''Luigi'''<br />
|colspan="2"| Mario palette swap || Unique Graphics <br />
|colspan="2"| Mario palette swap || Unique Graphics<br />
|style="text-align:left;"|<br />
|-<br />
|style="text-align:right;"| '''Exiting Game'''<br />
|colspan="2"| None || Press Select on Overworld<br />
|colspan="2"| None || Press Select on Overworld<br />
|style="text-align:left;"|<br />
|}<br />
<br />
== Releases ==<br />
<br />
Super Mario World has been released on 6 systems, but not every version is available on every system. Here is a chart that shows which versions exists on each system.<br />
<br />
{| class="wikitable"<br />
|-<br />
! !! '''J''' !! '''U''' !! '''UW''' !! '''E0''' !! '''E1''' !! '''EW'''<br />
|-<br />
| Super Nintendo || ✓ || ✓ || ✓ || ✓ || ✓ || ✓ <br />
|-<br />
| Wii VC || ✓ || ✓ || || || ✓ || <br />
|-<br />
| 3DS VC || ✓ || ✓ || || || * || <br />
|-<br />
| WiiU VC || ✓ || ✓ || || || * || <br />
|-<br />
| SNES Classic || ✓ || ✓ || || || * || <br />
|-<br />
| Nintendo Switch Online || ✓ || ✓ || || || || <br />
|}<br />
<br />
&#42; While PAL 3DS, WiiU, and SNES Classic releases exist, they are actually the U version, since the 50 Hz versions are of no use anymore.<br />
<br />
=== How to Tell Which Version You are Playing ===<br />
[[File:Resolution_difference.png|frame|The 256x239 resolution of the PAL versions (shown on left) causes more of the bottom of the level to show on screen.]]<br />
<br />
If you aren't sure which version your cartridge is, just follow this questionaire:<br />
# Is the text in Japanese?<br />
#* Yes - '''J''' version<br />
#* No - continue...<br />
# What system are you playing on?<br />
#* 3DS VC, WiiU VC, SNES Classic, or Nintendo Switch Online - '''U''' version<br />
#* Super NES or Wii VC - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''E1''' version<br />
#* 2 on Wii VC - '''U''' version<br />
#* 2 on Super NES - continue...<br />
# Are you playing a version of All-Stars + World?<br />
#* No - go to 6.<br />
#* Yes - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''EW''' version<br />
#* 2 - '''UW''' version<br />
# Go to [[Yoshi's Island 1]] and hold run and right as the level loads. What happens?<br />
#* Mario hits the Koopa and dies - '''U''' version<br />
#* Mario runs under the Koopa and survives - '''E0''' version<br />
<br />
= PAL vs NTSC =<br />
<br />
To compensate for the PAL system that runs at 50fps opposed to 60fps - developers made Mario run faster in the PAL rom to offset the difference. As a result Mario can make jumps that are not possible in the NTSC version, so different routes would be taken. It is difficult to compare runs between these two versions. Even though Mario's running speed was increased to make up for the slower framerate, other parts of the game like cutscenes and the overworld were not sped up, so generally runs on PAL versions will be much slower because of this.<br />
<br />
This video demonstrates some of the speed differences between PAL and NTSC versions of the game:<br />
{{#ev:youtube|Cn9nvP-uRJI|560||}}<br />
<br />
= J Version Advantages =<br />
*J version is [https://www.twitch.tv/videos/48008136 0.267 seconds faster for each save message.]<br />
*J version is [https://www.twitch.tv/videos/48007985 3.2 seconds faster for each switch palace.]<br />
<br />
Taking into account these differences this is how it affects some main categories:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Category !! '''J''' is faster by<br />
|-<br />
| 11 Exit || 0.534 seconds<br />
|-<br />
| No Starworld || 2.670 seconds<br />
|-<br />
| All Castles || 3.204 seconds<br />
|-<br />
| 96 Exit || 20.810 seconds<br />
|}<br />
<br />
==Level Differences==<br />
*The message at the end of [[Funky]] reads "YOU ARE SUPER PLAYER!!" on the J version instead of "YOU ARE A SUPER PLAYER!!" like the other versions.<br />
*There is no yellow ! block at the beginning of [[Donut Plains 2]] in the J version.<br />
*There is visible cut-off on the J version on the right side of [[Donut Secret House]] if you scroll the screen to the right.<br />
*The time limit was changed to 400 seconds from 300 seconds in the J version of [[Lemmy's Castle]].<br />
*There are fewer arrow signs at the end of [[Chocolate Island 3]] in the J version.<br />
*The 3 extra lives below the orb in [[Sunken Ghost Ship]] are not present in the J version.<br />
*There are fewer green berries in [[Funky]] in the J version.<br />
*There is no cape near the beginning of [[Vanilla Dome 1]] in the J version.<br />
<br />
= Nintendo Super System =<br />
<br />
[[File:NSS_smw.png|thumb|200px|The Nintendo Super System version allows the player to begin in any of the seven "zones".]]<br />
<br />
There is a relatively little known arcade release of Super Mario World for the Nintendo Super System. Released only in the US, the Nintendo Super System is essentially a Super Nintendo in an arcade cabinet. This version can be differentiated from all others by the title screen (shown right). The Nintendo Super System version of the game is identical in all levels to the U version of the game, except that the message box in [[Yoshi's Island 4]] is no longer present (because Start+Select is disabled). Most glitches also function identically.<br />
<br />
There are several changes which make this version technically the fastest official release of Super Mario World. For one, the game does not save, so save prompts never appear. The intro cutscene can be skipped immediately after the message box text appears. Castle cutscenes can be scrolled by the player by mashing, drastically reducing their length. Finally, the player may choose to start in any one of the seven "zones", with previous levels already completed. The only change which could adversely affect speedruns is that Start+Select is disabled. Overall, this version would save several minutes compared to the versions above in a 96 exit run.<br />
<br />
For the leaderboards, this version is not currently allowed. This version can be run on a standard SNES (or emulator) through a flashcart, but obtaining a legitimate copy is prohibitively expensive. Additionally, only a very small number of such units were produced, while all the above versions have millions of sales. Finally, because of the massive time savings, allowing this version would essentially invalidate all historic runs.<br />
<br />
[[Category:Getting Started]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Version_Differences&diff=3438Version Differences2019-12-11T04:52:41Z<p>3rdLavaDolphin: </p>
<hr />
<div>This page is to compare the different versions of Super Mario World.<br />
<br />
= Versions =<br />
<br />
There are six versions of Super Mario World that are currently allowed on the leaderboards.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Abbr. !! Version !! Found<br />
|-<br />
| '''J''' || Japanese || The only version with Japanese text, this version was released in Japan.<br />
|-<br />
| '''U''' || North American || The localized version of the game for NTSC audiences.<br />
|-<br />
| '''UW''' || North American All-Stars + World || This version was bundled in with Super Mario All-Stars.<br />
|-<br />
| '''E0''' || PAL v1.0 || Rare. The localized version of the game for PAL audiences, but the resolution hadn't been updated to fill the PAL screen.<br />
|-<br />
| '''E1''' or '''E''' || PAL v1.1 || The updated version of the PAL release. This version removed the black bars at the top and bottom of the screen.<br />
|-<br />
| '''EW''' || PAL All-Stars + World || This version was bundled in with Super Mario All-Stars in PAL regions.<br />
|}<br />
<br />
== Version Differences ==<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
|-<br />
!<br />
!style="width:100px;"| '''J''' <br />
!style="width:100px;"| '''U''' <br />
!style="width:100px;"| '''UW''' <br />
!style="width:100px;"| '''E0''' <br />
!style="width:100px;"| '''E1''' <br />
!style="width:100px;"| '''EW''' !! Notes<br />
|-<br />
|style="text-align:right;"| '''Text''' || Japanese <br />
|colspan="5"| English<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Intro Screen''' || Auto <br />
|colspan="5"| Actuate <br />
|style="text-align:left;"| In order to advance passed the intro cutscene, a button must be pressed on all versions but J.<br />
|-<br />
|style="text-align:right;"| '''Save Boxes''' || Small <br />
|colspan="5"| Big <br />
|style="text-align:left;"| The size of the save boxes had to change to accommodate English text, so they take up more time to display.<br />
|-<br />
|style="text-align:right;"| '''Switch Palace Fanfare''' || Short <br />
|colspan="5"| Long <br />
|style="text-align:left;"| The amount of time required to dismiss the Switch Palace fanfare was changed to make it easier to read the cutscene text.<br />
|-<br />
|style="text-align:right;"| '''Reenter Castles with L+R''' || No<br />
|colspan="5"| Yes<br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Level Design''' || Edible Dolphins <br />
|colspan="5"| Small Level Changes <br />
|style="text-align:left;"|See [[#lvldiff|Level Differences]].<br />
|-<br />
|style="text-align:right;"| '''Gameplay'''<br />
|colspan="3"| Original Physics<br />
|colspan="3"| Updated Physics <br />
|style="text-align:left;"| In order to accamodate the framerate change, the physics were changed in the PAL region so the game didn't seem to run slow.<br />
|-<br />
|style="text-align:right;"| '''Framerate'''<br />
|colspan="3"| 60 Hz<br />
|colspan="3"| 50 Hz <br />
|style="text-align:left;"| <br />
|-<br />
|style="text-align:right;"| '''Resolution'''<br />
|colspan="4"| 256x224<br />
|colspan="2"| 256x239 <br />
|style="text-align:left;"| The E0 version had black bars at the top and bottom of the screen.<br />
|-<br />
|style="text-align:right;"| '''Exit Counter''' || >= 96 || Up to *96 || >= *96 <br />
|colspan="2"| blue; >= 96 <br />
|style="text-align:left;"| >= *96 <br />
|style="text-align:left;"| By collected extra glitched exits, the counter can go above 96 in all but the U versions.<br />
|-<br />
|style="text-align:right;"| '''Luigi'''<br />
|colspan="2"| Mario palette swap || Unique Graphics <br />
|colspan="2"| Mario palette swap || Unique Graphics<br />
|style="text-align:left;"|<br />
|-<br />
|style="text-align:right;"| '''Exiting Game'''<br />
|colspan="2"| None || Press Select on Overworld<br />
|colspan="2"| None || Press Select on Overworld<br />
|style="text-align:left;"|<br />
|}<br />
<br />
== Releases ==<br />
<br />
Super Mario World has been released on 6 systems, but not every version is available on every system. Here is a chart that shows which versions exists on each system.<br />
<br />
{| class="wikitable"<br />
|-<br />
! !! '''J''' !! '''U''' !! '''UW''' !! '''E0''' !! '''E1''' !! '''EW'''<br />
|-<br />
| Super Nintendo || ✓ || ✓ || ✓ || ✓ || ✓ || ✓ <br />
|-<br />
| Wii VC || ✓ || ✓ || || || ✓ || <br />
|-<br />
| 3DS VC || ✓ || ✓ || || || * || <br />
|-<br />
| WiiU VC || ✓ || ✓ || || || * || <br />
|-<br />
| SNES Classic || ✓ || ✓ || || || * || <br />
|-<br />
| Nintendo Switch Online || ✓ || ✓ || || || || <br />
|}<br />
<br />
&#42; While PAL 3DS, WiiU, and SNES Classic releases exist, they are actually the U version, since the 50 Hz versions are of no use anymore.<br />
<br />
=== How to Tell Which Version You are Playing ===<br />
[[File:Resolution_difference.png|frame|The 256x239 resolution of the PAL versions (shown on left) causes more of the bottom of the level to show on screen.]]<br />
<br />
If you aren't sure which version your cartridge is, just follow this questionaire:<br />
# Is the text in Japanese?<br />
#* Yes - '''J''' version<br />
#* No - continue...<br />
# What system are you playing on?<br />
#* 3DS VC, WiiU VC, SNES Classic, or Nintendo Switch Online - '''U''' version<br />
#* Super NES or Wii VC - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''E1''' version<br />
#* 2 on Wii VC - '''U''' version<br />
#* 2 on Super NES - continue...<br />
# Are you playing a version of All-Stars + World?<br />
#* No - go to 6.<br />
#* Yes - continue...<br />
# When the title screen shows, does the ground take up 2 or 3 logs vertically? (see right)<br />
#* 3 - '''EW''' version<br />
#* 2 - '''UW''' version<br />
# Go to [[Yoshi's Island 1]] and hold run and right as the level loads. What happens?<br />
#* Mario hits the Koopa and dies - '''U''' version<br />
#* Mario runs under the Koopa and survives - '''E0''' version<br />
<br />
= PAL vs NTSC =<br />
<br />
To compensate for the PAL system that runs at 50fps opposed to 60fps - developers made Mario run faster in the PAL rom to offset the difference. As a result Mario can make jumps that are not possible in the NTSC version, so different routes would be taken. It is difficult to compare runs between these two versions. Even though Mario's running speed was increased to make up for the slower framerate, other parts of the game like cutscenes and the overworld were not sped up, so generally runs on PAL versions will be much slower because of this.<br />
<br />
This video demonstrates some of the speed differences between PAL and NTSC versions of the game:<br />
{{#ev:youtube|Cn9nvP-uRJI|560||}}<br />
<br />
= J Version Advantages =<br />
*J version is [https://www.twitch.tv/videos/48008136 0.267 seconds faster for each save message.]<br />
*J version is [https://www.twitch.tv/videos/48007985 3.2 seconds faster for each switch palace.]<br />
<br />
Taking into account these differences this is how it affects some main categories:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Category !! '''J''' is faster by<br />
|-<br />
| 11 Exit || 0.534 seconds<br />
|-<br />
| No Starworld || 2.670 seconds<br />
|-<br />
| All Castles || 3.204 seconds<br />
|-<br />
| 96 Exit || 20.810 seconds<br />
|}<br />
<br />
==Level Differences==<br />
*The message at the end of [[Funky]] reads "YOU ARE SUPER PLAYER!!" on the J version instead of "YOU ARE A SUPER PLAYER!!" like the other versions.<br />
*There is no yellow ! block at the beginning of [[Donut Plains 2]] in the J version.<br />
*There is visible cut-off on the J version on the right side of [[Donut Secret House]] if you scroll the screen to the right.<br />
*The time limit was changed to 400 seconds from 300 seconds in the J version of [[Lemmy's Castle]].<br />
*There are fewer arrow signs at the end of [[Chocolate Island 3]] in the J version.<br />
*The 3 extra lives below the orb in [[Sunken Ghost Ship]] are not present in the J version.<br />
*There are fewer green berries in [[Funky]] in the J version.<br />
*There is no cape near the beginning of [[Vanilla Dome 1]] in the J version.<br />
, <br />
= Nintendo Super System =<br />
<br />
[[File:NSS_smw.png|thumb|200px|The Nintendo Super System version allows the player to begin in any of the seven "zones".]]<br />
<br />
There is a relatively little known arcade release of Super Mario World for the Nintendo Super System. Released only in the US, the Nintendo Super System is essentially a Super Nintendo in an arcade cabinet. This version can be differentiated from all others by the title screen (shown right). The Nintendo Super System version of the game is identical in all levels to the U version of the game, except that the message box in [[Yoshi's Island 4]] is no longer present (because Start+Select is disabled). Most glitches also function identically.<br />
<br />
There are several changes which make this version technically the fastest official release of Super Mario World. For one, the game does not save, so save prompts never appear. The intro cutscene can be skipped immediately after the message box text appears. Castle cutscenes can be scrolled by the player by mashing, drastically reducing their length. Finally, the player may choose to start in any one of the seven "zones", with previous levels already completed. The only change which could adversely affect speedruns is that Start+Select is disabled. Overall, this version would save several minutes compared to the versions above in a 96 exit run.<br />
<br />
For the leaderboards, this version is not currently allowed. This version can be run on a standard SNES (or emulator) through a flashcart, but obtaining a legitimate copy is prohibitively expensive. Additionally, only a very small number of such units were produced, while all the above versions have millions of sales. Finally, because of the massive time savings, allowing this version would essentially invalidate all historic runs.<br />
<br />
[[Category:Getting Started]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:NSS_smw.png&diff=3437File:NSS smw.png2019-12-11T04:40:04Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3436Advanced Flying Techniques2019-12-08T06:02:26Z<p>3rdLavaDolphin: /* Lava Zip */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner cave lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava. Note that cave lava is solid at the bottom, so it acts as a ceiling. (On the other hand, castle lava acts like water on the bottom and must be avoided while flying.)<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3435Advanced Flying Techniques2019-12-08T06:00:55Z<p>3rdLavaDolphin: /* Miscellaneous Techniques */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==<br />
<br />
== Lava Zip ==<br />
<br />
[[File:Lava_Corner.png|thumb|200px|Mario can zip downward using this corner tile.]]<br />
<br />
It is possible to enter a corner lava tile in such a way that Mario will zip downward. If the lava wall continues to the bottom of the level, Mario will not die, but instead will be ejected below the lava. From this position, it is possible to survive if Mario is already in flight. A very brief forward tap followed immediately by pressing backward will allow him to catch air under the level. It is then possible to fly back up to the right, or more interestingly, fly to the left under the lava.<br />
<br />
If Mario is facing left and has big air, it will even be possible to get a stickyfly under the lava. This can be held indefinitely, but be warned that solid wall tiles facing up against lava tiles extend lower than the lava, so you will collide with them and stop sticking. To survive, it is necessary to fly under these tiles.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:Lava_Corner.png&diff=3434File:Lava Corner.png2019-12-08T05:53:53Z<p>3rdLavaDolphin: Mario can easily enter this corner tile and zip downward with extremely high speed.</p>
<hr />
<div>Mario can easily enter this corner tile and zip downward with extremely high speed.</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3433Advanced Flying Techniques2019-12-08T05:48:12Z<p>3rdLavaDolphin: /* Cannon Fly */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
Cannons shoot Mario at 64 speed, significantly faster than he can reach normally. By pipeflying into a pipe cannon, Mario can gain flight as soon as he begins descending. This is notably used in [[Chocolate Island 1]]. Getting flight requires that the takeoff meter be at least 27 when entering the pipe. <br />
<br />
At 64 speed, every frame pressing right (assuming Mario faces right) will reduce Mario's speed by 1 until it reaches 47, after which it will have the normal cape flight oscillation pattern. If speed is the goal, the player should avoid pressing right.<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:Negative_flow.png&diff=3432File:Negative flow.png2019-12-08T03:53:35Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3431Advanced Flying Techniques2019-12-08T02:58:46Z<p>3rdLavaDolphin: /* Negative Speed Flowcharts */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
A different approach, still flowchart-based but requiring less precise determination of speed, is shown in the following chart. The chart shows the minimum number of B-taps to get to one of the four target speeds (or two when the speed is 5 mod 6). This still assumes you have odd speed and seek to keep it odd.<br />
<br />
[[File:Negative_flow.png]]<br />
<br />
The lesson here is that, if the player has speed between +1 and +5, 2 B-taps will work. Between 5 and 11, 3 B-taps will. Between 11 and 17, 4 will, and so on. The player thus needs to be able to distinguish speeds +3 and below from +7 and above, and so on.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3430Advanced Flying Techniques2019-12-08T02:22:13Z<p>3rdLavaDolphin: /* 4 Frame Forward Press Method */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long. More B-taps won't tend to improve your final negative speed, but they do make it safer if you do longer forward presses. In principle, as many as 10 B-taps can help, but only if you pressed forward far longer than needed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3429Advanced Flying Techniques2019-12-08T02:16:10Z<p>3rdLavaDolphin: /* Negative Speed Flowcharts */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. The above methods are workable, but very inefficient if your goal is actually to move backwards an appreciable distance. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3428Advanced Flying Techniques2019-12-08T02:15:21Z<p>3rdLavaDolphin: /* 4 frame Forward Press Method */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 Frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3427Advanced Flying Techniques2019-12-08T02:15:03Z<p>3rdLavaDolphin: /* Flying in Place/Backwards */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== 4 frame Forward Press Method ====<br />
<br />
The highest possible negative speed for Mario is -13. That means that if you tap forward for 4 (or more) frames, you will always end up with a positive speed. That speed could be as high as 9 if your negative speed is at -7, but it is perfectly possible to fly backwards if you hit 9 speed (or even potentially higher if you mash B quickly enough). With this method, it is then safe to do any number of B taps after catching air. However, you should do at least 4. With 4 B-taps, any speed up to +17 will end up in the range between -7 and -13. With only 3, the highest such speed is +11, which you can easily accidentally go above simply by pressing forward a frame too long.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3426Advanced Flying Techniques2019-12-08T01:06:53Z<p>3rdLavaDolphin: /* Flying in Place/Backwards */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== 2 B-tap Method ====<br />
<br />
By far the biggest risk with backward flying is hitting exactly 0 speed. This method allows you to keep your speed always odd, but has the disadvantage of not achieving optimal backward speeds. If you begin at any positive speed, you can always do two B-taps safely, and your speed will remain odd. So long as your initial speed was less than 12, you will end up with some negative speed between -11 and -1. Unfortunately, this cannot reach the optimal -13 speed. If you tap forward too long, you may get more speed than you would want. If you end up with at least 5 speed, you can safely do 3 B-taps and maintain odd speed parity. The main issue here is that it will prove challenging to avoid moving forward too much; your forward taps must be done precisely or else you will gain too much speed.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3425Advanced Flying Techniques2019-12-08T00:46:35Z<p>3rdLavaDolphin: /* Negative Speed Flowcharts */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3424Advanced Flying Techniques2019-12-08T00:46:04Z<p>3rdLavaDolphin: </p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:11_Flow.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:13_Flow.png]]<br />
<br />
There is nothing stopping one from using other negative speeds, but these two are probably the most useful. -12 and -8 speed are potentially quite bad because of the risk of hitting exactly 0 speed. -10 does not carry this risk, but does put you on an even speed, which is usually still a bad idea. -9 and -7 are both workable, but because these are not as fast as -11 or -13, covering distance with these speeds will take longer. A particularly committed player could combine multiple flowcharts, switching between target negative speeds as the situation calls.<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:13_flow.png&diff=3423File:13 flow.png2019-12-08T00:40:34Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:11_flow.png&diff=3422File:11 flow.png2019-12-08T00:40:16Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart.png&diff=3421File:-11 Speed Flowchart.png2019-12-08T00:36:35Z<p>3rdLavaDolphin: 3rdLavaDolphin uploaded File:-11 Speed Flowchart.png</p>
<hr />
<div>#REDIRECT [[File:-11 Speed Flowchart old.png]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart_old.png&diff=3419File:-11 Speed Flowchart old.png2019-12-08T00:35:46Z<p>3rdLavaDolphin: 3rdLavaDolphin moved page File:-11 Speed Flowchart.png to File:-11 Speed Flowchart old.png: idk how to delete :/</p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart.png&diff=3420File:-11 Speed Flowchart.png2019-12-08T00:35:46Z<p>3rdLavaDolphin: 3rdLavaDolphin moved page File:-11 Speed Flowchart.png to File:-11 Speed Flowchart old.png: idk how to delete :/</p>
<hr />
<div>#REDIRECT [[File:-11 Speed Flowchart old.png]]</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart_old.png&diff=3418File:-11 Speed Flowchart old.png2019-12-08T00:34:45Z<p>3rdLavaDolphin: 3rdLavaDolphin uploaded a new version of File:-11 Speed Flowchart.png</p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3417Advanced Flying Techniques2019-12-08T00:32:51Z<p>3rdLavaDolphin: /* -11 Speed Flowchart */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== Negative Speed Flowcharts ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:-11_Speed_Flowchart.png]]<br />
<br />
A very similar method can be used for -13 speed, though it tends to be slightly less convenient.<br />
<br />
[[File:-13_Speed_Flowchart.png]]<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-13_Speed_Flowchart.png&diff=3416File:-13 Speed Flowchart.png2019-12-08T00:31:20Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart_old.png&diff=3415File:-11 Speed Flowchart old.png2019-12-08T00:30:26Z<p>3rdLavaDolphin: 3rdLavaDolphin uploaded a new version of File:-11 Speed Flowchart.png</p>
<hr />
<div></div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=Advanced_Flying_Techniques&diff=3414Advanced Flying Techniques2019-12-08T00:18:22Z<p>3rdLavaDolphin: /* Flying in Place/Backwards */</p>
<hr />
<div>[[Category:Tricks & Glitches]]<br />
<br />
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'''.<br />
<br />
= Speed Management =<br />
<br />
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).<br />
<br />
== Maximizing Speed ==<br />
<br />
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:<br />
<br />
{{youtubevideo|url=yw6wmF8vqCo|title=How to Optimize Mario's Flight Speed|source=dotsarecool}}<br />
<br />
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.<br />
<br />
=== Optimal Tapping ===<br />
<br />
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.<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! Tap Forward<br />
|-<br />
| 47 <br />
| 1 (or 6)<br />
|-<br />
| 48<br />
| 2 (or 7)<br />
|-<br />
| 49<br />
| 3 (or 8)<br />
|-<br />
| 50<br />
| 4 (or 9)<br />
|}<br />
<br />
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.<br />
<br />
=== 4-Frame Tapping ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Initial Speed Optimization ===<br />
<br />
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.<br />
<br />
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.)<br />
<br />
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.<br />
<br />
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.<br />
<br />
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]].<br />
<br />
== Managing Low Speeds ==<br />
<br />
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. <br />
<br />
=== Losing Speed Quickly ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Speed Mod 2 and Mod 4 ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
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):<br />
<br />
{| class="wikitable"<br />
! Speed<br />
! B taps to flip speed parity<br />
|-<br />
| -8 or lower<br />
| 1<br />
|-<br />
| -7 to -2<br />
| 2<br />
|-<br />
| -1 to 4<br />
| 3<br />
|-<br />
| 5 to 10<br />
| 4<br />
|}<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
=== Flying in Place/Backwards ===<br />
<br />
It is possible for Mario to move backwards relative to the direction he is facing. This technique is useful in conjunction with cape-spins to turn around, because one can react to whichever direction Mario faces. In some cases it may be used to eliminate the need to turn at all. This is also useful for precise movement, allowing one to carefully position Mario in a particular spot while flying.<br />
<br />
The basic rule of thumb is that Mario must always be travelling forward with at least 1 speed while catching air. However, if immediately after catching air, one holds backwards and presses B quickly, Mario's speed will go negative within a few B presses, lowering by 6 units each press. If done well, Mario will move backwards slightly while rising during the aircatch. Then, at the desired height, forward should be pressed very briefly to get back to a positive speed. Each frame forward is held increases Mario's speed by 4. Mario's capped backward speed ranges from -7 to -13, so in the best case only 2 frames of forward are needed, while in the worst case 4 frames are required. Once Mario's speed is back to positive, quickly shift on the d-pad back to backward to start another cape pump, and repeat. If it is not necessary to travel backward, only in place, then it may be better to press B a controlled number of times rather than mashing, making the needed forward taps more consistent.<br />
<br />
==== -11 Speed Flowchart ====<br />
<br />
Backwards flying is difficult to do consistently without accidentally missing an aircatch. One method to alleviate this is to use a speed flowchart. If you know your current speed, you can determine the number of B-taps to reach a desired speed. -11 speed is a good choice for a desired negative speed because with an ideal 3-frame forward tap you will end up at 1 speed. If you overtap slightly you will end up at 5, 9, 13, etc, which can be distinguished easily from 1.<br />
<br />
To start with, you will need to reach the desired speed. One thing to note is that, while Mario's negative speed is capped, it is easy to distinguish when Mario has -13 speed, because on this particular B-tap Mario will noticeably accelerate backwards, while other B-taps only slightly reduce Mario's negative speed. From -13 speed, it requires 2 B-taps to reach -11. This allows one to get to the desired -11 speed, after which the flowchart can be followed.<br />
<br />
Alternatively, if you know Mario's exact (positive) speed, you can determine how many B-presses are needed easily. This flowchart shows the number of B-presses needed both for positive speeds which can be reached from -11 speed (in the center) and others that cannot (to the right).<br />
<br />
[[File:-11_Speed_Flowchart.png]]<br />
<br />
= Catching Air =<br />
<br />
An aircatch (also known as a cape pump) is when Mario tilts backwards and begins ascending while in cape flight. Aircatches are normally triggered by pressing and briefly holding backward on the d-pad while flying.<br />
<br />
Note: while there are many differences between NTSC and PAL physics, catching air is one very obvious difference. As with everything on this page (and most of this wiki) this page deals only with the NTSC versions.<br />
<br />
== Aircatch Timing ==<br />
<br />
To catch air, Mario must be in flight phase of at least 3 for more than 1 frame, and then begin pressing backward on the d-pad. The flight phase is indicated by the angle of Mario's cape animation while flying. Most commonly, when Mario "bobbles" or pulls back without catching air, he was only in flight phase 2 when back was pressed. Occasionally though, when back is pressed on the first frame of phase 3, Mario's animation will visually change for a frame to the phase 3 animation, but will not successfully catch air. In this case, back needed to be pressed (at least) 1 frame later.<br />
<br />
Watching Mario's animation thus gives a good indicator of how optimally one is catching air. Ideally phase 3 should be visible for as short as possible (but not a single frame).<br />
<br />
=== Ceiling Hits ===<br />
<br />
Often one wants to stay close to a ceiling while flying, and accomplishes this by rapidly catching air and then hitting the ceiling. One example in speedruns is in [[Roy's Castle]]. In this case, it is possible to catch air more often than normal due to hitting the ceiling. In this case, the cape sound effect provides a useful tool for determining precisely how long it took from starting the aircatch to hitting the ceiling (which consequently informs on how far Mario fell prior to the aircatch, etc.) Normally, the cape sound effect does a quick glissando of a full octave up and back down. However, if the ceiling is hit, this sound effect will be cancelled after ascending only part of the octave. Based on the relative pitch of the starting sound and the sound as it is cancelled by the ceiling, one can determine precisely how many frames the aircatch lasted.<br />
<br />
This is useful for hitting very precise windows without good visual cues, for example this strategy in Roy's castle:<br />
<br />
{{youtubevideo|url=FBmt36m3XaM|title=Roy's Castle - Cape|source=ThirdLavaDolphin}}<br />
<br />
It can also be applied when flying under solid tiles at the bottom of a level, where visual cues are not available. In particular, flying under lava for extended distances is very difficult unless one has a strong grasp on this skill.<br />
<br />
=== Quick Aircatch ===<br />
<br />
Normally, to catch air, one needs to hold backward for 11 frames continuously. However, it is possible to catch air more quickly. Optimally, one should press back for 1 frame, release for 1 frame, and then press back again to catch air immediately. This input is obviously difficult to perform on a standard SNES controller.<br />
<br />
TODO: Theory behind this, more realistic examples.<br />
<br />
== Big Air ==<br />
<br />
=== Takeoff Meter Assisted Big Air ===<br />
<br />
=== Quick Dive ===<br />
<br />
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.)<br />
<br />
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.<br />
<br />
=== Multiple Aircatch ===<br />
<br />
= Preserving Flight =<br />
<br />
This section describes the specifics of several techniques that let you preserve or regain flight in ways that one might not immediately expect.<br />
<br />
== Takeoff Meter ==<br />
<br />
When Mario jumps with p-speed, two special things happen. One, a flag gets set indicating that this jump was made with p-speed, which allows Mario to regain p-meter while airborne. (This flag will be unset if Mario enters cape flight.) Secondly, a meter called the takeoff meter is set (if it is not already counting down) to 80 and subsequently counts down by 1 each frame. While the takeoff meter is active, the camera is able to scroll upward even if Mario is airborne. Additionally, if Mario finds himself falling at any point with the takeoff meter active and X/Y held, rather than falling normally, he will enter cape flight mode.<br />
<br />
This means that Mario can gain flight by falling off a ledge or by jumping without p-speed. He does need to set the takeoff meter, which requires jumping with p-speed, but once it is set Mario can enter flight without either applying. The 80 frame window is long enough that this has many practical applications.<br />
<br />
== Pipe/Door Fly ==<br />
<br />
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.<br />
<br />
=== Cannon Fly ===<br />
<br />
=== Trajectory Locking ===<br />
<br />
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.<br />
<br />
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. '<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
=== Improved P-speed ===<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
{{youtubevideo|url=MmJSyBHsjM4|title=Donut Secret House Normal Exit|source=ThirdLavaDolphin}}<br />
<br />
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.<br />
<br />
{{youtubevideo|url=hboxJ_z-P7E?start=465&end=480|title=11 exit ("warps") TAS|source=BrunoVisnadi & Amaraticando}}<br />
<br />
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.<br />
<br />
== Climbing Vines/Nets ==<br />
<br />
While Mario is flying, he is able to grab nets and vines as usual. Doing so will result in Mario switching to climbing, but the flight flag is preserved while climbing. Once Mario stops climbing (typically by jumping off), he will go back to flying. Additionally, if he is hit while climbing, he will cape cancel and get invincibility frames (but lose flight) rather than taking damage. Climbing allows one to scroll the camera vertically during flight (normally not possible). There is no need to hold X/Y while climbing.<br />
<br />
When Mario stops climbing and begins flying again, the direction he faces will be determined by his animation. Specifically, Mario will face in the direction of whichever of his hands is lower. This notably allows Mario to turn around while flying without a cape-spin or Yoshi.<br />
<br />
== P-Balloon ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
= Cape Spin Techniques =<br />
<br />
This section describes various techniques which require Mario doing a cape spin (by pressing X or Y) while flying.<br />
<br />
== Turning Around ==<br />
<br />
While flying, X or Y is generally held. If the other one is pressed, Mario will spin his cape while still flying. When the cape spin ends, Mario may face either direction depending on what frame X/Y is pressed. This gives a way to change Mario's direction while in flight. Specifically, Mario's spinning (including cape spins) works on an 8 frame cycle which begins at the beginning of each new level or room loading and runs continuously. Facing a particular direction corresponds to a 4 frame window, but ordinarily one cannot tell where that window occurs.<br />
<br />
If the player wants to turn around, they must then either specifically manipulate this timer, or else just spin and hope to turn. While any individual cape spin is effectively luck, a competent player can ensure that they take a trajectory such that facing either direction can be handled. Generally, it is advantageous to have low horizontal speed and to cape spin soon after an aircatch to give the most time to react. In most cases, it is more difficult to react to the turn-around failing (Mario not changing direction) so for beginners it is recommended to always play assuming that a turn-around will fail, and adapting when it does eventually succeed.<br />
<br />
It can happen that, for several consecutive capespins Mario fails to turn. This can be a symptom of hitting a particular rhythm where the capespins are separated by a multiple of 8 frames. If you identify this, simply delaying the next cape pump slightly (ideally by 4 frames) will break the rhythm. Alternatively you can simply wait a bit before retrying to get off the bad rhythm.<br />
<br />
It is, in principle, possible to determine where in this framerule you are by playing a level consistently from the beginning or by watching Mario's spinning animation. However, it is very difficult to do any serious cape flying consistently to the frame because of speed oscillations, and Mario's animation is fast enough that reacting to it is not easy.<br />
<br />
Some romhacks patch this mechanic so that Mario always changes direction when spinning his cape. This makes technical maneuvers involving cape far easier, eliminating the adaptability needed with vanilla capespins. Most cape-specific hacks do not apply this patch though in order to keep the physics authentic.<br />
<br />
== Throwing Held Items ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Pause-buffered Throw ===<br />
<br />
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).<br />
<br />
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.)<br />
<br />
== Speed Manipulation ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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.<br />
<br />
=== Adding B-tapping ===<br />
<br />
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).<br />
<br />
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.<br />
<br />
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.<br />
<br />
== Low Aircatch ==<br />
<br />
== Extended Aircatch ==<br />
<br />
== Rise Cancel ==<br />
<br />
= Yoshifly =<br />
<br />
Yoshifly is a glitched movement mechanic whereby Mario can cape-fly while riding Yoshi. Fundamentally, the only difference between Yoshifly and ordinary cape flight is that Yoshi's turnaround animation still works while flying, which means that Mario is able to change direction simply by pressing the desired direction on the d-pad. On the other hand, if one wants to press backward to catch air, steps must be taken or else Mario will turn around, cancelling the aircatch.<br />
<br />
== Starting a Yoshifly ==<br />
<br />
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. <br />
<br />
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.<br />
<br />
=== Ceiling Dismount ===<br />
<br />
=== Yoshi Grab ===<br />
<br />
=== Baby Yoshi Feed ===<br />
<br />
== Basic Movement ==<br />
<br />
== Catching Air ==<br />
<br />
=== Tongue Technique ===<br />
<br />
=== Non-tongue Technique ===<br />
<br />
= Miscellaneous Techniques =<br />
<br />
== Sticky Fly ==<br />
<br />
=== Without Big Air ===<br />
<br />
== Clipping ==<br />
<br />
The requirements for clipping are no different with cape than without, but because Mario's movement is different while flying modified setups may be needed.<br />
<br />
=== Slope Clip ===<br />
<br />
It is possible to fly through a staircase or other 45 degree slope. To do so, one should aim for the pixel between tiles in the slope, and hit it while Mario is catching air and moving upward. The positioning for this is quite precise, so it can be advantageous to approach the slope slowly before catching air and then immediately accelerating to try to hit the desired position.<br />
<br />
An example is shown in this video:<br />
<br />
{{youtubevideo|url=Wy9WTp1Elkk|title=Stair Fly example|source=lambby}}<br />
<br />
=== Corner Slope Clip ===<br />
<br />
=== True Corner Clip ===<br />
<br />
A true corner clip, which can be applied to 90 degree corners to clip downward, requires Mario to move at least 4 pixels horizontally into a corner tile in 1 frame. Mario's maximum flight speed is 51 units, at which speed one has a 3 subpixel window to hit horizontally. The minimum possible speed to clip is 49, at which point it is subpixel-perfect. Naturally, any intentional application of this, whether in realtime or tool-assisted runs, requires substantial work to manipulate Mario's precise subpixel position, or else extreme luck.<br />
<br />
== Camera Unlocking ==<br />
<br />
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.<br />
<br />
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.<br />
<br />
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).<br />
<br />
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.<br />
<br />
== Invisible Ceiling Stick ==<br />
<br />
Mario cannot ascend arbitrarily high relative to the camera. If he would be above a height roughly 6 tiles above the top of the screen, he will not go any higher even if he has upward velocity. This effect is known as the "invisible ceiling". It is not a solid ceiling; rather, Mario's vertical position simply cannot increase any higher.<br />
<br />
If one positions the camera such that the invisible ceiling is at a desired height, and then flies as close to the ceiling as possible, Mario will spend a portion of each aircatch while he is ascending at this ceiling position. This is not a stickyfly in normal sense above because it does not last indefinitely. However, for the limited duration while Mario is ascending while at the top of the screen, he will remain at exactly that altitude. In principle this allows one to navigate tight sections (e.g. short 2 tile high corridors) which could otherwise not normally be crossed while maintaining flight. This can also be used without flight by jumping at the top of the screen.<br />
<br />
== Continuous Cape-Cancel ==</div>3rdLavaDolphinhttps://smwspeedruns.com/index.php?title=File:-11_Speed_Flowchart_old.png&diff=3413File:-11 Speed Flowchart old.png2019-12-08T00:17:37Z<p>3rdLavaDolphin: </p>
<hr />
<div></div>3rdLavaDolphin