Monday, March 24, 2014

Corner Clipping

Corner Clipping is a precise trick in which Mario's speed allows him to skip over the first three pixels of a block, and then, with an extra boost, he is able to clip into the entire thing, and pass through the block completely.
This is generally the aimed jump when wanting to do a corner clip, where mario presumably jumps into the corner of the block.  Mario can corner clip on either side of the block, except when he is small, in which he can only clip from the right side.

This bit will have assumed that you have read the logic of the below tutorials, in which subpixels are the magic behind most of these tricks.
A walljump is where mario must have the speed that allows him to go more two pixels into the block (32 subpixels) within one frame, which means he must have 33 speed.  Well, a corner clip actually requires him to enter the block by more than 3 pixels, which is 48 subpixels, meaning he must have a speed of 49.  Coincidentally, 49 is the maximum amount of speed that you can achieve with a run as any form of mario.


The only difficult part is getting your subpixel and position to line up to where you can reach the exact position of the block, allowing you to fully enter the block by 3 pixels on the following frame.
This is why it is recommended to create or use a lua script, as a lua script such as mine or masterjun's will automatically check every frame for the subpixel line ups to a block you are predicting to, and does not require you to manually check every time (which would otherwise make this trick take a very long time).

The reason why it is needed for you to enter the block by its corner is because just entering the side isn't enough.  At the point in which you touch the side of the block, block pressure immediately comes in, and in this situation mario could completely stop before the block.  By entering the block's corner, you can avoid block pressure for the frames needed before dropping into the block by 3 pixels.  The action in turn will push you to the left, since the inner part of the block is automatically set to push the player left if he is in it, and from the right this means that saving frames.  You can also save frames and be pushed right from the left side if you are on yoshi.
When done correctly, you should achieve the x position scrolling to allow you to get 3 pixels into the block...
The red region indicates that the subpixels will line up correctly for a corner clip on that list of blocks to occur.
Normally, on the frame after this, I would be stopped immediately because of block pressure.  However, since I have entered the block through its corner, I will not be stopped.  And, by the time I do get 3 pixels in the block, the game stops collision detection for the right side of the block, and instead registers me in the middle, where I will immediately be pushed out.
The frame that I actually enter the block, although the graphics are one frame behind so it is not completely obvious that I have yet.
The second frame I have entered the block.  At this point I have hit the block below the block I am clipping, so I should start losing x speed on the next frame...
And one last screen shot just because it looks cool :D

Good luck clipping!  And again, if you have any questions about anything above, PM me preferably on SMWC.

No comments:

Post a Comment