Reposting from my TAS submission from December 2016:
Glitch, Trick, and Game Mechanic Explanations:
Kirby can be in what is called a looped state, which can either be defined as just coming out of a loop or riding a new line after looping previously in the level. This is cancelled when kirby hits a floor and seems to lose some momentum/stars fly out from collision with the floor.
Kirby can be attached to a line, which is to say not matter the orientation of the line, Kirby will ride it until the end or until the line fades away.
A line is composed of multiple line segments, ranging from 6 to 47 pixels in length. A line must have at least 2 segments to persist. The segments can be of varying lengths, which is important for some later tricks.
Position Correction Displacement
The previous explanations weren't glitches or tricks but are necessary to explain this next concept. If Kirby is in a looped state, and is attached to a line, encountering a new line at a pixel-perfect location on the original line creates an unknown attachment state. This encounter makes it difficult to determine which line Kirby should then be attached to, the original or new line. As a fail-safe mechanism, the developers made it so that when this undetermined state is reached, Kirby should be placed at the beginning of the previous line segment (not the whole line), and try the movement again. As long as both lines persist, Kirby will run into the new line, teleport backwards, run into the new line, and the process repeats itself until one of them disappears.
Position Correction Launch
The first unintended consequence of the position correction displacement mechanic is getting a launch out of Kirby's displacement. This is a major speed increase; where Kirby's speed is normally capped at 4 units per frame, these launches can yield speeds of up to 47 units per frame. This is performed by setting up the position correction displacement and then forcing the line beneath Kirby to disappear. The result is that Kirby will launch backwards, starting at the speed equal to the length of the last segment. It is important to make the last line segment as long as possible to get the most speed. There is a simple method to get a launch in nearly any direction or speed.
Put Kirby through a loop to set up the looped state.
Draw the first segment of the new line Kirby will launch from. Kirby won't attach to this line until at least 2 segments are drawn. You don't want Kirby launching from the line with the loop because it will take longer for it to disappear than the new line. It is also important to make this segment short, because it will disappear faster.
When Kirby reaches the position of the first segment, draw the second segment in the direction desired and of the length needed. This completes the line Kirby will launch from. It is also important to note that the line is drawn opposite the direction Kirby will launch, because Kirby gets displaced backwards.
Draw a new arbitrary line segment. This does nothing other than to make the line Kirby will launch from disappear.
Draw a new line for Kirby to collide with at the end of the long segment. This position is pixel perfect for a specific speed, but there are multiple locations which give different speeds. The positions of these locations are all parallel to the line.
At this point the line disappears, and Kirby will be displaced backwards and maintain the "speed".
To better illustrate this process, I made a short gif: http://imgur.com/hNpXfqd
Launching is great, and lets you traverse large areas quickly, but more can be done with this speed. If Kirby is moving fast enough toward an obstacle such that on one frame he would be inbounds and the next would be somewhere within the obstacle, Kirby will actually ignore hit detection on the wall and move inside the obstacle. See more on the use of clipping in out-of-bounds movement.
Position Correction Displacement Clipping
There is a more direct form of clipping out-of-bounds that is used situationally. The same setup as normal Position Correction Displacement is performed, but the line used to teleport starts inside the wall. When Kirby gets displaced backwards, he will actually be inside the wall. This method allows for some neat sequence breaks. Because water will not let Kirby launch at high speeds, this is the only way in which out-of-bounds clipping can be achieved from within water.
There is a finite amount of ink available for use. Ink can be refilled, but in general it is slower than just working with the ink available. It runs out very quickly while setting up a lot of the glitches, so there are methods used to conserve ink and get by with very little. One small tick on the ink meter is all you need to draw a line (2 segments). This can only be done though if the first segment is as short as possible. If you have any ink whatsoever, you can draw a line segment the maximum length (47 units). So even with the minimum amount of ink, you can draw a decently sized line that works for most purposes. This is used a lot while out-of-bounds, because there is no way to refill ink and it is critical to always be able to draw sufficient lines.
Being out-of-bounds, more specifically inside obstacles, has very weird properties. When inside an obstacle, the game forces you violently upward, usually to the tune of 30 units per frame. This quickly gets out of hand and Kirby must be manipulated with lines to not lose control and die from straying too far out of the bounds of the level. As a result gaining height while out of bounds is very quick, and Kirby can traverse long vertical sections quickly by riding walls in certain situations. Horizontal movement is trickier, because Kirby must be touching a line at all times. To make this quick is an ink-heavy process, and properties of lines described earlier must be abused to conserve ink. You cannot loop out-of-bounds so it is a slow process, but the amount of the levels that can be skipped as a result is tremendous. Lastly, one more type of out-of-bounds movement exists, and that is downward vertical movement. Kirby gets forced violently upwards, so it is not obvious how to move Kirby downwards while out-of-bounds. The only known way to accomplish this is by rubbing against the edge of the level (where the camera locks, it's not a standard wall) and drawing straight vertical lines from below. This sucks Kirby downwards in the direction of the lines.