709
edits
No edit summary |
(test please ignore) |
||
Line 1: | Line 1: | ||
[[File:ParallelUniverseViews.jpg|thumb|A diagram of Parallel Universe movement in [[Hazy Maze Cave]], after [[Mario]] has returned to the main map.]] | [[File:ParallelUniverseViews.jpg|thumb|A diagram of Parallel Universe movement in [[Hazy Maze Cave]], after [[Mario]] has returned to the main map.]] | ||
[[File:Visible PU.png|thumb|Frame of [[Peter Fedak|Peter Fedak's]] video where he uses a hack to turn Parallel Universes visible. Mario is in a PU; note the lack of [[objects]].]] | |||
A '''Parallel Universe''', or '''PU''', is an area in a map at which the game creates phantom collision for objects "outside" of the level. This is because some of the values for collision detection are truncated into the range of the real map's coordinate system, allowing some space that is intended to be [[Out of Bounds]] to become habitable. | |||
The truncation responsible for the existence of parallel universes is only performed when determining alignment with floors and ceilings. This means that walls and objects, both of which use floating point arithmetic to determine collision, do not "exist" in PUs, unless they are brought there. | |||
==Horizontal Parallel Universes== | |||
The collision glitch that causes horizontal PUs occurs because the casted position value used to check for [[floor]] below Mario (or an [[object]]) doesn't have enough bits to go above <math>\mathrm{7FFF}_{\mathrm{h}}</math> or below <math>\mathrm{-8000}_{\mathrm{h}}</math>, unlike Mario's actual position, which is a [[float]]. This is because the programmers did not anticipate Mario to stand faraway enough from the world origin to loop the collision check in standard gameplay, as that is intended to be Out of Bounds since no map is big enough; nor to be able to travel to such a faraway place, as that would require exorbitant amounts of speed beyond Mario's positive speed cap. | |||
Any multiple of <math>2^{16}</math> in Mario's actual position values will be truncated off for the floor check. Therefore, if Mario tries to reach a position faraway from the real map that causes the floor check to roll over and still detect a floor from the real map, then that space is not considered Out of Bounds and he can travel there. | |||
Where <math>|p| < 2^{16}</math> and <math>k</math> is any integer, being at position <math>p + 2^{16}k</math> along the X or Z axis is equivalent to being at position <math>p</math> for the floor check. Alternatively, being at position <math>q</math> is equivalent to being at position <math>q \bmod 2^{16}</math> for the floor check. | |||
Ergo, in practice, there exists an infinite grid of imperfect copies of the main map, spread out by <math>2^{16}</math> intervals. Due to the nature of the glitch, horizontal Parallel Universes do not have anything except floors, so there are no duplicate walls, ceilings, or objects. However, certain objects can be sent to PUs. | |||
== Vertical parallel universes == | == Vertical parallel universes == | ||
Line 25: | Line 33: | ||
Parallel universes have found uses in both speed TASes and the [[A Button Challenge]] since they allow greater control of movement through a level. PU routing is comparable to movement through a five-dimensional space, as Mario can be modelled as travelling along five axes: three "relative" axes describing his position within the map, and two integers to specify which PU he is currently in. Mario can adjust his [[speed]] and [[angle]] to move relatively around the stage regardless of how many PUs he moves in the ''x'' or ''z'' dimensions. | Parallel universes have found uses in both speed TASes and the [[A Button Challenge]] since they allow greater control of movement through a level. PU routing is comparable to movement through a five-dimensional space, as Mario can be modelled as travelling along five axes: three "relative" axes describing his position within the map, and two integers to specify which PU he is currently in. Mario can adjust his [[speed]] and [[angle]] to move relatively around the stage regardless of how many PUs he moves in the ''x'' or ''z'' dimensions. | ||
Mario's movement is split up into | Since Mario's movement is split up into 4 quarter steps, and Mario cannot move [[Out of Bounds]], Mario must travel at least a '''Quadruple Parallel Universe''' distance in 1 frame, '''QPU''' for short. The QPU distance is <math>2^{16} \times 4 = 2^{18}</math> [[unit]]s. However, if one of Mario's quarter steps (other than the first one) ends Out of Bounds, the game will cut his movement short. In this case, Mario does not travel a full 4 PU, instead ending up at some quarter-step between the QPUs, depending on where the movement is cut off. This is referred to as a '''QPU misalignment'''. | ||
As travelling to PUs involves moving very far from the origin, floating point imprecision can begin to have a significant affect on Mario's position, angle, and collision. | |||
===Object behavior=== | |||
Spawning a [[100 Coin Star]] in a PU will softlock the game. | |||
[[Koopa the Quick]] can be sent to a PU by strategically using bowling ball [[clone]]s to force him to accelerate backwards into OoB until his speed syncs with a PU. However, going to a PU moves him away from the bowling ball clones, so he will slowly lose speed with every jump. Koopa the Quick's behavior with normal positive speed in a PU is not currently known. | |||
[[Bob-omb]]s and Crazy Boxes can be brought to PUs, and appear to function normally. Naturally, they also update the [[HOLP]] to the PU location. | |||
==Vertical Parallel Universes== | |||
A '''Vertical Parallel Universe''', or '''VPU''', is a vertical extension of the PU phenomenon. Objects behave differently depending on what checks they use for collision. While it could be assumed that VPUs are a wall collision glitch, Mario's real position is used for the wall check, so he cannot experience duplicate walls at all in PUs. In addition, floor and ceiling collision may extend vertically into VPUs, causing some objects to experience their hitboxes. | |||
Since Mario's Y position cannot exceed 20,000 (the default ceiling detection value) in most circumstances, there are only two ways to reach a positive vertical PU: Hyper Speed Flying, and Platform Release Displacement. Negative vertical PUs can be reached with those methods or the Overflow Jump. | |||
In positive VPUs (above the real map), Mario is (correctly) detected as being too high above real map floors to stand on PU duplicates, so he falls through. He is also detected as being high above [[ceiling]]s, thereby putting him in their hitboxes and constricting his movement. The game also uses Mario's real position to check for walls, so he can't experience any duplicate walls in VPUs. Therefore, positive VPUs are entirely ceiling. | |||
In negative VPUs (below the real map), Mario is detected as being below real map floors, so he is snapped up onto the horizontal PU grid upon a floor collision. He is also detected as being far below ceilings, so ceilings have no effect. Again, the game also uses Mario's real position to check for walls, so he can't experience duplicate walls in VPUs. Therefore, negative VPUs are entirely floor. | |||
===Object behavior=== | |||
[[Scuttlebug]]s can be raised through VPUs. In a VPU, they are considered Out of Bounds, so they can't move laterally. Much like Mario with negative VPU floors, a Scuttlebug will snap to a main map wall if it interacts with a VPU duplicate. | |||
== Floating point truncation crash == | == Floating point truncation crash == | ||
Line 42: | Line 67: | ||
* Mario's quarter step gets cancelled while on the ground | * Mario's quarter step gets cancelled while on the ground | ||
* Mario collides with a wall head-on with PU speed | * Mario collides with a wall head-on with PU speed | ||