Parallel Universe: Difference between revisions

no edit summary
No edit summary
Tags: Mobile edit Mobile web edit
No edit summary
 
(3 intermediate revisions by one other user not shown)
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.]]
A '''Parallel Universe''', or '''PU''', is a region of space located far outside the intended map boundaries that reflects certain aspects, especially the floors and/or ceilings, of the main map. When the game looks for floors below (or ceilings above) a given object, it first "truncates" the object's position from a floating point value to a 16-bit integer value. The range of a floating point value is much larger than the range of a 16-bit integer value (which is -2<sup>15</sup> = -32,768 to 2<sup>15</sup> - 1 = 32,767). If a coordinate of the object's position falls outside this range, it "wraps around". For example, if one of these floating point values is 40,000, then 40,000 - 65,536 = -25,536 will be used when determining if the object is aligned with a floor or ceiling. This gives the illusion that the floors and ceilings of the main level map are "copied" repeatedly in a uniform 3D grid, at a spacing of 65,536 units.
A '''Parallel Universe''', or '''PU''', is a region of space located far outside the intended map boundaries that reflects certain aspects, especially the floors and/or ceilings, of the main map. When the game looks for floors below (or ceilings above) a given object, it first "truncates" the object's position from a floating point value to a 16-bit integer value. The range of a floating point value is much larger than the range of a 16-bit integer value (which is -2<sup>15</sup> = -32,768 to 2<sup>15</sup> - 1 = 32,767). If a coordinate of the object's position falls outside this range, it "wraps around". For example, if one of these floating point values is 40,000, then 40,000 - 65,536 = -25,536 will be used when determining if the object is aligned with a floor or ceiling. This gives the illusion that the floors and ceilings of the main level map are "copied" repeatedly in a uniform 3D grid, at a spacing of 65,536 units.
[[File:Visible PU.png|thumb|184x184px|Frame of Peter Fedak's video where he turns Parallel Universes visible using hacks; notice the lack of [[objects]]|left]]
[[File:Visible PU.png|thumb|184x184px|Frame of Peter Fedak's video where he turns Parallel Universes visible using hacks; notice the lack of [[objects]]|right]]
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.
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.


Due to the extremely high speed required to travel to PUs, they are not accessible from all courses. The courses where PUs can or cannot be accessed are summarized in the tables below. Work is ongoing to try to access PUs in courses such as [[Bowser in the Fire Sea]] (via [[Bully battery]]) and demo courses (via massive [[Spawning displacement]]).
Due to the extremely high speed required to travel to PUs, they are not accessible from all courses. The courses where PUs can or cannot be accessed are summarized in the tables below. Work is ongoing to try to access PUs in courses such as [[Bowser in the Fire Sea]] (via [[Bully battery]]) and demo courses (via massive [[Spawning displacement]]).
Methods to access a PU are:
*Speed:
**[[Backwards Long Jump#Elevator BLJ|EBLJ]]
**[[Hyperspeed Walking|HSW]]
**[[Hyperspeed Punching|HSP]]
**[[Bully battery|BB]]
**[[Speed conservation|Speed Conservation]]
* Displacement:
**Pole Teleport
**Platform Displacement
Note that EBLJ (and other types of BLJs), and BB (Bully battery) cannot be achieved on Shindou versions. Also, if a method requires to set [[HOLP]] in a PU, then it is only possible to do it on VC (because other versions crash if a camera is in the PU, and by locking camera on the main map, the HOLP wont update, because camera being too far is one of the cases where HOLP doesn't update).
{|
{|
|+
|+
Line 13: Line 27:
!Course
!Course
!PU Access
!PU Access
!0x Access
!Access by versions
!0x A Access
!Method
!Method
|-
|-
|[[Bob-omb Battlefield]]
|[[Bob-omb Battlefield]]
|Yes
|Yes
|No
|Non-Shindou
| No
|EBLJ
|EBLJ
|-
|-
|[[Whomp's Fortress]]
|[[Whomp's Fortress]]
|Yes<ref>[https://www.youtube.com/watch?v=y_gELy37HHc "Going to a vertical PU in WF" by Maria Nicolae]</ref>
|Yes<ref>[https://www.youtube.com/watch?v=y_gELy37HHc "Going to a vertical PU in WF" by Maria Nicolae]</ref>
|VC
|No
|No
|Platform Displacement (VC Only)
|Platform Displacement
|-
|-
|[[Jolly Roger Bay]]
|[[Jolly Roger Bay]]
|Yes
|Yes
|All Versions
|No
|No
|HSW
|HSW
Line 33: Line 51:
|[[Cool, Cool Mountain]]
|[[Cool, Cool Mountain]]
|No
|No
|
|No
|No
|
|
|-
|-
|[[Big Boo's Haunt]]
|[[Big Boo's Haunt]]
|Yes
| Yes
|Non-Shindou
|No
|No
|EBLJ
|EBLJ
Line 43: Line 63:
|[[Hazy Maze Cave]]
|[[Hazy Maze Cave]]
|Yes
|Yes
|All Versions
|Yes
|Yes
|EBLJ, HSW
|EBLJ, HSW
Line 48: Line 69:
|[[Lethal Lava Land]]
|[[Lethal Lava Land]]
|Yes
|Yes
|Non-Shindou
|Yes
|Yes
|BB
|BB
Line 53: Line 75:
|[[Shifting Sand Land]]
|[[Shifting Sand Land]]
|Yes
|Yes
|All Versions
|Yes
|Yes
|EBLJ, HSP
|EBLJ, HSP
Line 58: Line 81:
|[[Dire, Dire Docks]]
|[[Dire, Dire Docks]]
|Yes
|Yes
|Unsure if All Versions or only VC
|No
|No
|Pole Teleport
|Pole Teleport
Line 63: Line 87:
|[[Snowman's Land]]
|[[Snowman's Land]]
|Yes
|Yes
|All Versions
|No
|No
|HSW
|HSW
|-
|-
|[[Wet-Dry World]]
|[[Wet-Dry World]]
|Yes
| Yes
|All Versions
|Yes
|Yes
|EBLJ, HSW
|EBLJ, HSW
Line 73: Line 99:
|[[Tall, Tall Mountain]]
|[[Tall, Tall Mountain]]
|No
|No
|
|No
|No
|
|
Line 78: Line 105:
|[[Tiny-Huge Island]]
|[[Tiny-Huge Island]]
|No
|No
|
|No
|No
|
|
Line 83: Line 111:
|[[Tick Tock Clock]]
|[[Tick Tock Clock]]
|No
|No
|
|No
|No
|
|
Line 88: Line 117:
|[[Rainbow Ride]]
|[[Rainbow Ride]]
|Yes
|Yes
|Non-Shindou
|No
|No
|EBLJ
|EBLJ
Line 97: Line 127:
!Course
!Course
!PU Access
!PU Access
!0x Access
!Access by versions
!0x A Access
!Method
!Method
|-
|-
|[[Bowser in the Dark World]]
|[[Bowser in the Dark World]]
|No
|No
|
|No
|No
|
|
Line 107: Line 139:
|[[Bowser in the Fire Sea]]
|[[Bowser in the Fire Sea]]
|Yes
|Yes
|Non-Shindou
|No
|No
|EBLJ
| EBLJ
|-
|-
|[[Bowser in the Sky]]
|[[Bowser in the Sky]]
|No
|No
|
|No
|No
|
|
Line 117: Line 151:
|[[The Princess's Secret Slide]]
|[[The Princess's Secret Slide]]
|No
|No
|
|No
|No
|
|
Line 122: Line 157:
|[[Secret Aquarium]]
|[[Secret Aquarium]]
|No
|No
|
|No
|No
|
|
Line 127: Line 163:
|[[Tower of the Wing Cap]]
|[[Tower of the Wing Cap]]
|No
|No
|
|No
|No
|
|
Line 132: Line 169:
|[[Cavern of the Metal Cap]]
|[[Cavern of the Metal Cap]]
|No
|No
|
|No
|No
|
|
Line 137: Line 175:
|[[Vanish Cap under the Moat]]
|[[Vanish Cap under the Moat]]
|Yes
|Yes
|Non-Shindou
|No
|No
|EBLJ
|EBLJ
Line 142: Line 181:
|[[Wing Mario over the Rainbow]]
|[[Wing Mario over the Rainbow]]
|No
|No
|
|No
|No
|
|
Line 147: Line 187:
|[[The Castle#Castle Grounds|Castle Grounds]]
|[[The Castle#Castle Grounds|Castle Grounds]]
|Yes
|Yes
|All Versions
|Yes
|Yes
|HSW, Speed Conservation
|HSW, Speed Conservation
Line 152: Line 193:
|[[The Castle#First Floor|Castle Foyer]]
|[[The Castle#First Floor|Castle Foyer]]
|Yes
|Yes
|All Versions (for simply accessing), VC (to avoid crash)
|Yes
|Yes
|Speed Conservation
|Speed Conservation
Line 157: Line 199:
|[[The Castle#Basement|Castle Basement]]
|[[The Castle#Basement|Castle Basement]]
|No
|No
|
|No
|No
|
|
Line 162: Line 205:
|[[The Castle#Second Floor|Castle Upstairs]]
|[[The Castle#Second Floor|Castle Upstairs]]
|No
|No
|
|No
|No
|
|
|-
|-
|[[The Castle#Courtyard|Castle Courtyard]]
|[[The Castle#Courtyard|Castle Courtyard]]
|No
| No
|
|No
|No
|
|
Line 172: Line 217:
|}
|}
|}
|}
 
==Vertical Parallel Universes ==
== Vertical Parallel Universes ==
Although usually the term "PU" refers to a horizontal PU (i.e. one caused by truncation of the ''x'' and/or ''z'' coordinates of an object's position), vertical PUs (where the ''y'' coordinate is truncated) also exist. However, these behave completely differently to horizontal PUs. While truncated coordinates are used to ''find'' the floor below the object and the ceiling above the object, the original floating point values are used to determine what ''effect'' these surfaces have on the object.
Although usually the term "PU" refers to a horizontal PU (i.e. one caused by truncation of the ''x'' and/or ''z'' coordinates of an object's position), vertical PUs (where the ''y'' coordinate is truncated) also exist. However, these behave completely differently to horizontal PUs. While truncated coordinates are used to ''find'' the floor below the object and the ceiling above the object, the original floating point values are used to determine what ''effect'' these surfaces have on the object.


For example, when Mario is less than 160 units below the nearest ceiling, he is considered to be "above" the ceiling, his vertical speed is killed, and he bonks. If Mario moves to a positive (upward) vertical PU, the "nearest" ceiling will be determined based on truncated coordinates, and will therefore be in the main map. But when checking whether he is above this ceiling, floating point coordinates are used instead, and so Mario behaves as though he is stuck in a ceiling. This behavior results in positive vertical PUs appearing to be filled entirely with ceilings.
For example, when Mario is less than 160 units below the nearest ceiling, he is considered to be "above" the ceiling, his vertical speed is killed, and he bonks. If Mario moves to a positive (upward) vertical PU, the "nearest" ceiling will be determined based on truncated coordinates, and will therefore be in the main map. But when checking whether he is above this ceiling, floating point coordinates are used instead, and so Mario behaves as though he is stuck in a ceiling. This behavior results in positive vertical PUs appearing to be filled entirely with ceilings.<ref>[https://www.youtube.com/watch?v=av42uJ-04A4 "Walls, Floors, and Ceilings in PUs" by Maria Nicolae]</ref>


On the other hand, when Mario is below his "nearest" floor, he will snap up to it. This means that if Mario moves to a negative vertical PU, he will usually upwarp back to the main PU grid. This is called an '''overflow jump''', or '''OJ''' for short.
On the other hand, when Mario is below his "nearest" floor, he will snap up to it. This means that if Mario moves to a negative vertical PU, he will usually upwarp back to the main PU grid. This is called an '''overflow jump''', or '''OJ''' for short.
Line 193: Line 237:


As traveling to PUs involves moving very far from the origin, floating point imprecision can begin to have a significant effect on Mario's position, angle, and collision. When Mario's position becomes large enough, this imprecision will result in the coordinates in PUs becoming so coarse that Mario cannot cross from one coordinate to the next and, eventually, will result in certain PUs being completely unaccessible.  
As traveling to PUs involves moving very far from the origin, floating point imprecision can begin to have a significant effect on Mario's position, angle, and collision. When Mario's position becomes large enough, this imprecision will result in the coordinates in PUs becoming so coarse that Mario cannot cross from one coordinate to the next and, eventually, will result in certain PUs being completely unaccessible.  
== Floating point truncation crash ==
==Floating point truncation crash==
While in theory the grid of PUs extends indefinitely, the behavior of the truncation operation becomes "undefined" when the floating point value is outside the range -2<sup>31</sup> to 2<sup>31</sup> - 1. The Nintendo 64 and [[iQue]] Player<ref>[https://youtu.be/_dAGdYd9KUY "Do Parallel Universes Crash on iQue?" by CadBrad]</ref> versions of the game crash when such a truncation is attempted. The Wii and Wii U virtual console versions of the game do not crash, though it is not currently known whether they wrap around the 32-bit integer range, or cap to the endpoints of the range. Most emulators do not properly emulate the crash, except for a specific version of Mupen64, modded to crash correctly.
While in theory the grid of PUs extends indefinitely, the behavior of the truncation operation becomes "undefined" when the floating point value is outside the range -2<sup>31</sup> to 2<sup>31</sup> - 1. The Nintendo 64 and [[iQue]] Player<ref>[https://youtu.be/_dAGdYd9KUY "Do Parallel Universes Crash on iQue?" by CadBrad]</ref> versions of the game crash when such a truncation is attempted. The Wii and Wii U virtual console versions of the game do not crash, though it is not currently known whether they wrap around the 32-bit integer range, or cap to the endpoints of the range. Most emulators do not properly emulate the crash, except for a specific version of Mupen64, modded to crash correctly.


Line 199: Line 243:


While not all conditions for these types of crashes are known, there are some that come up frequently. These are when:
While not all conditions for these types of crashes are known, there are some that come up frequently. These are when:
* The camera enters a PU
*The camera enters a PU
* Mario bonks while in a PU
*Mario bonks while in a PU
* Mario's quarter step gets canceled while on the ground
*Mario's quarter step gets canceled while on the ground
* Mario collides with a wall head-on with PU speed
*Mario collides with a wall head-on with PU speed
== Miscellaneous behavior ==
==Miscellaneous behavior==
Certain objects and graphics behave interestingly while in parallel universes. For example:
Certain objects and graphics behave interestingly while in parallel universes. For example:
* Shadows and coin twinkle effects are glitchy
*Shadows and coin twinkle effects are glitchy
* TODO: Add more
*TODO: Add more
==References==
==References==
<references/>
<references />
 
[[Category:Glitches]]
[[Category:Glitches]]
{{Glitches}}
{{Glitches}}