Original Post

On Slope Clipping

Preface

On January 30, 2022, a Japanese Sunshine TASer named su published a video.

(Tweet has been deleted)

It’s hard to see because it happens right at the edge of the screen, but Mario clips through the roof of a Shine room building—a place you’re normally supposed to enter either by paying a Monte 1 coin to throw you through a window or by doing a fruit clip. But in this video, Mario clips in by himself through the roof. This is a newly discovered trick now known as slope clipping, and this article will explain how it works.

Did a Similar Technique Already Exist 4 Years Ago?

In fact, slope clipping was already used in 2018 during the Any% TAS, specifically in Pinna Park Episode 2 to clip into the cannon.

At the time, while working on that TAS, someone in the general Super Mario Sunshine Discord server reported a case that had occurred accidentally during an RTA. Although the mechanism wasn’t yet understood, by trying nearly every analog stick direction, it was possible to reproduce it in the TAS.

Later on, a user named Nokidoki provided information that helped clarify the mechanism: when one slope connects to another, the boundary between them tends to have weaker collision. That’s when the underlying principle was finally understood.

However, no further development happened after that. As a result, even in the Any% TAS—or the 120 Shines TAS currently in development—this technique has not been used anywhere else aside from the cannon clip.

https://x.com/Qbe_Root/status/1336325764870881284

Quarter Frames

To explain how slope clipping works, we first have to talk about the concept of Quarter Frames (abbreviated as QF).

Super Mario Sunshine runs at 30 frames per second (30 FPS), but each frame is internally divided into four sub-steps, called Quarter Frames. During each of these four QFs, the game performs checks for Mario’s collision with walls and floors.

Normally, you can’t see each QF individually, but by rapidly opening and closing the Z-button map or the pause menu as fast as possible, you can advance the game one QF at a time.

On the Switch version of Sunshine, you can simply hold the map button to repeatedly open and close the map at max speed, which makes it easy to step through QFs and observe them.

Floor and Wall Collision Checks

Now let’s look at how floor and wall collision checks actually work in Sunshine, specifically the ones involved in slope clipping.

We’ll use [unit] as the measurement for in-game distances. For example, if Mario has a horizontal speed (XZ speed) of 48, that means he moves 48 units in a single frame. This value of 48 is the speed Mario reaches when he’s diving.