Glitchy Ledge Grab

From Ukikipedia
(Redirected from GLG)
Jump to navigation Jump to search
GLG at SA Entrance

A glitchy ledge grab or GLG is a kind of ledge grab that goes higher than a normal ledge grab. While a regular ledge grab can only allow Mario to ascend up to 150 units, a glitchy ledge grab allows Mario to ascend up to 238 units. This can allow Mario to reach areas he could not normally in the context of challenges such as the A Button Challenge.

Details

When the conditions required for Mario to perform a Ledge Grab are met, the game searches for a potential floor to grab onto by searching downwards for a floor hitbox starting at 160 units above Mario's vertical position.[1] Importantly, the search looks for any part of a floor hitbox, not only the top of one. Under normal conditions, the top of the floor hitbox will always be below the 160 unit search height, otherwise the required condition of there being no wall 150 units above Mario would not be met. Floor hitboxes are 78 units tall. This means that if the floor search, starting at a relative height of 160 were to somehow encounter the middle or bottom of a floor hitbox, Mario would ledge grab the found floor, despite the top of that floor being above the 160 height search start. This is a glitchy ledge grab. If the search starting at an offset of 160 units encounters the bottom-most portion of a floor, then Mario would grab the ledge at an offset of 160 + 78 units, creating a maximum attainable ledge grab height of 238 units.

A GLG can be triggered in a few ways:

  • The wall is slightly tilted away away from Mario on the vertical axis, so the lower point (30 units above Mario) is inside the wall, but the upper point (150 units above Mario) is not. This triggers a ledge grab check when there is not intended to be one. This is used in the A Button Challenge to enter The Secret Aquarium with 0 A-button presses.[2]
  • Mario correctly triggers a ledge grab on a wall he is not completely below, but it detects an unintended floor. This can happen near the edges of non-axis-aligned walls, because the logic for a Ledge Grab uses a point starting from Mario, but in the direction perpendicular to the wall Mario is inside. This perpendicular line can extend past the wall Mario is inside, and end up inside an unintended floor. This is used in the A Button Challenge to enter Bowser in the Sky in 0 A-button presses.[3][4]
  • Mario's lower point is near a wall, and his upper point is aligned exactly with a gap in the wall due to float imprecision. [5]

References