A Link to the Past
Exploration Glitch
Exploration glitch or EG is a major glitch where the player abuses the game's layering mechanics to place Link on the wrong layer. When this happens, Link will be unable to interact with most sprites and tilemap features, including walls.
Because all of the game's indoor rooms are on one map, this allows players to freely move around almost the entire underworld.
Mechanics and brief technical explanation
Layers in the context of EG refer to the mechanics that are used to give the illusion of multi-dimensional space on certain indoor rooms. This is a 2D game, yet some rooms seem to have an upper floor and a lower floor. And not only that, but sometimes Link can appear to walk under the floor (and the enemies and walls or whatever else) that's above him (or vice versa, walking above the floor that's below). This is possible because the game tracks the "layer" of different entities and objects in the game. Link, enemies, most walls and obstacles—these will typically only interact if they're on the same layer.
Link's layer is stored at address $EE in the game's memory. In normal gameplay, when Link is in a non-layered room (most of the rooms in the game), the value at $EE will be set to 0. In a layered room, it'll be set to 0 if Link is on the upper floor of the room, and it'll be set to 1 if Link is on the bottom floor of the room.
EG results from a situation where the player can get Link's layer set to 1 in a place where it should be 0. This allows him to freely move around most rooms because in most rooms, all of the tilemap collision and sprites are only going to interact with Link on layer 0. But Link is on layer 1. It's as if Link is "under" the floor.
Entering EG
There are several ways to directly enter EG:
- Clipping
- Transition glitches into certain rooms, principally from rooms with one layer scheme to a room with a different one while bypassing the game's intended machinations for linking such rooms together.
- Hookpushes that manipulate the hookshot's layer interactions
- Activating armed EG.
And regarding that last one, there are a few ways to arm EG:
- S&Q during a ledge hop while indoors
- Indoor mirror jumps
- Ledge hopping into a pit transition or a void
You can think of these as interrupting a layer transition and storing it for later. When EG is armed, the player can take damage or bonk to activate EG. EG will be disarmed if the player uses any indoor ledge hops or any north ledge hops on the overworld. It will also be disarmed if the player tries to enter EG with damage or bonking while having weak EG set (see EG strength in the next section). If the player has EG armed and takes damage or bonks on the overworld, then Link will enter an overworld EG state, which is considered a separate glitch by the community.
EG strength
When using armed EG, it may be important to understand EG strength. Each supertile in the underworld sets a value in memory related to the layering effects of the game. This can sometimes prevent the player from using stored EG.
The annotated underworld map shows which rooms set strong EG, which rooms set weak EG, and which rooms leave the value alone. You cannot activate armed EG in rooms that set weak EG, and if the player wants to activate EG in a room that leaves EG strength alone, they need to be sure that the last room that modified EG strength was a room that sets strong EG.
Exiting EG
There are a few ways to exit EG:
- A common way is to use "high" walls, which are often (but not always) found in layered rooms, to jump back in-bounds.
- \/ auto stairs (that is stairs where the upper floor is at the top of the stairs and the lower floor is oriented at the bottom) in rooms that set strong EG can be used to get in-bounds. Link is able to use them from above even while in EG, which will place him in-bounds on the bottom floor.
- Spiral stair doors that are on the bottom floor of a layered room can be used while in EG. Link will transition and in the next room, he'll be in-bounds.
- EG kick, which is done by visiting a supertile with dynamic conveyor floors or moving walls. The annotated underworld map highlights these supertiles in yellow.
- Weirdshots, which can be used to latch the hookshot onto a hookable object in the layer opposite Link. The hookshot will drag Link in-bounds.
Overworld EG
EG functions exactly the same on the overworld, with the major difference that the overworld only has a single layer for tilemap interactions. Overworld maps contain more collision than underworld rooms, so they also use a different calculation. These two factors combined mean that collision is only coded to check for one layer, so EG cannot be used on the overworld to bypass tile collision. It does, however, put Link on a different layer compared to sprites, allowing him to ignore collision with them. This includes barriers like the Desert monuments, the Lumberjacks' tree, or the gold-armored knights blocking Link from accessing any area of the rainy overworld outside of Link's house and Hyrule Castle. Any sprite spawned from a bush will inherit Link's layer.
Link will not be visible most of the time because he's drawn behind the background layer 2, which contains the entirety of the overworld map's graphics. He can be seen when passing under tiles that have transparency though, such as tree roots.
