Reposition

From Metroid Prime Speedrunning Wiki
Jump to navigation Jump to search

The reposition mechanic is triggered whenever the Prime games detect that Samus is stuck. Its intended function is to help ensure that Samus stays within the normal playing area and has the full capability for movement at all times. However, in speedruns, this mechanic is frequently abused for Out of Bounds exploits, most notably including the Frigate Wallcrawl and Exo Skip in Metroid Prime.

Technical Overview

Repositions happen when the game considers Samus to be "stuck" and this can happen in the following scenarios:

  • Samus enters a tight space (defined as a space that's smaller than her size)
    • When unmorphed, Samus has a width of 1 unit; when morphed, Samus has a radius of 0.7 units
  • Samus lands on "sticky" collision while navigating out of bounds

Repositions can happen at any point when Samus is unmorphed. However, when Samus is in the Morph Ball, the reposition mechanic typically only happens on the same frame that Samus transitions into the ball, unless a tight space is created by manipulating enemies. Most times when the mechanic is utilized in speedruns, it is done by morphing into a tight space, as it is easier to manipulate the mechanic this way. However, during Exo Skip, a tight space has to be created by manipulating a Fission Metroid in the right spot. Samus cannot get repositioned outside of the boundaries of the box the game considers Samus to be in. This is why, for example, the Infinite Speed setup for Wave/Sun works the way it does. Since the game doesn't consider Samus to be in Chozo Ice Temple, the reposition mechanic never gets called.

Repositions can happen through solid collision, given the right circumstances. This is what allows for the Secret World in Biotech Research Area 1 to be possible. Because of the distance required to do so, this entails getting a large reposition to happen.

Check for Valid Position

Example of a large reposition in Chozo Ruins. The displacement of this reposition is X1.352, Z3.555.

When the game detects that Samus is stuck, it checks for a valid position in these directions, in order:

  • Y Axis
  • X Axis
  • Z Axis
  • YZ Axis
  • XZ Axis
  • XY Axis
  • XYZ Axis

Additionally, it appears to calculate valid positions to put Samus in a logarithmic scale, checking from 0.01 units all the way up to 3.555 units. It checks to reposition Samus in every direction in this numerical order:

  • 0.01
  • 0.015
  • 0.02
  • 0.03
  • 0.045
  • 0.065
  • 0.095
  • 0.14
  • 0.21
  • 0.315
  • 0.47
  • 0.715
  • 1.055
  • 1.58
  • 2.37
  • 3.555

Additionally, the game will check to reposition Samus in both the positive and negative directions for the X/Y/Z axes, so a real reposition check would look like this:

  • +0.01Y
  • -0.01Y
  • +0.01X
  • -0.01X
  • +0.01Z
  • -0.01Z
  • +0.01Y, +0.01Z
  • -0.01Y, -0.01Z
  • -0.01Y, +0.01Z
  • +0.01Y, -0.01Z
  • etc.
The two possible places that the SW in Biotech Research Area 1 can place you. An extremely small difference in player position can affect which of these two spots the game places you.

If the game cannot find a valid place to position Samus after all of these checks, it will fail and Samus will remain in her current position. This can be used in certain circumstances, such as in Magma Pool, to get Infinite Speed, as the ball will be unable to be rolled through normal means until the crates are destroyed.

It is currently thought that the formula that the game uses to calculate repositions is in some way flawed, though the exact details of this have yet to be uncovered. There are two key bits of evidence supporting this:

  • Sometimes there will be cases where an otherwise valid position check fails, presumably due to an error in the way that the game detects what is a valid position or not.
  • Even extremely small changes in position can have an effect on where the reposition takes you. (For example, in the Biotech Research Area 1 SW, the difference between positions Y=-217.294312 and Y=-217.294296 is enough to affect which of the two known reposition placements you get)

It is also not known from exactly where the calculation happens, whether that is from the game's reading of the player's position or from a point that the game draws inside the player when the calculation happens.

Examples of Repositioning in Speedruns

Cody Ledge

Cody Ledge is a popular trick in the room Biohazard Containment, which is used to quickly get to the upper level of the room. It is considered the fastest method of going through the room for human runners and is used in all top level speedruns.

Biotech Research Area 1 SW

This room's Secret World is the basis for the Frigate Wallcrawl, which is used in all top level speedruns. It is an example of a reposition that occurs by morphing inside of a space that is smaller than the collision of the Morph Ball (~1-1.39 units in width).

Exo Skip

The Secret World in Crater Tunnel B is an example of a reposition that occurs while in the Morph Ball, by creating a tight space using a Fission Metroid. It takes advantage of a small hole in the ground to get out of bounds.

Dynamo Works SW (Echoes)

There are some areas in Metroid Prime 2: Echoes where the door does not perfectly match with the room's collision, which allows for some Morph Secret Worlds to be possible. One notable case of this in speedruns is in Dynamo Works, where by being on the edge of Dynamo Access' collision without being transitioned into the room, the game can reposition Samus downwards, putting her out of bounds.