List of Super Mario 64 glitches: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
Line 654: Line 654:
Each area in the game has a collision map, which consists of hitboxes for walls, floors and ceilings and is used to determine where Mario can go. However, in addition to the one collision map which is present on the area itself, an infinite number of copies of said collision map exist, spaced out in a three-dimensional grid. These copies of the collision map are called the ''Parallel Universes'' or ''PUs''. The reason why these exist is a simple integer overflow, which happens when Mario's position coordinates, which are stored as floating point decimal numbers, are typecasted to 16-bit integers for collision calculations. As a signed 16-bit integer can only store 2<sup>16</sup> values, ranging from -32768 to 32767, casting a higher or lower floating point decimal to said integer will result in an overflow to the other end of the range. And if exactly 2<sup>16</sup>, the number of possible values for the integer, is added to one of Mario's position coordinates, it does not affect the collision check at all due to overflowing to the exact same value modulo 2<sup>16</sup>.  
Each area in the game has a collision map, which consists of hitboxes for walls, floors and ceilings and is used to determine where Mario can go. However, in addition to the one collision map which is present on the area itself, an infinite number of copies of said collision map exist, spaced out in a three-dimensional grid. These copies of the collision map are called the ''Parallel Universes'' or ''PUs''. The reason why these exist is a simple integer overflow, which happens when Mario's position coordinates, which are stored as floating point decimal numbers, are typecasted to 16-bit integers for collision calculations. As a signed 16-bit integer can only store 2<sup>16</sup> values, ranging from -32768 to 32767, casting a higher or lower floating point decimal to said integer will result in an overflow to the other end of the range. And if exactly 2<sup>16</sup>, the number of possible values for the integer, is added to one of Mario's position coordinates, it does not affect the collision check at all due to overflowing to the exact same value modulo 2<sup>16</sup>.  


When attempting to get into a Parallel Universe on console, the game usually freezes, unless the camera is put in fixed mode; on emulators, PUs can be reached without fixing the camera. As Mario has to pass over an out of bounds area to reach a Parallel Universe and the game splits up every frame of his movement into four parts, running collision checks for each of them, it is necessary that each of those quarter frame steps goes far enough to reach a PU. This means, Mario has to build up enough speed using [[#Hyperspeed Glitches|Hyperspeed Glitches]] to travel a distance of 4 Parallel Universes, called ''Quadruple Parallel Universe'' or ''QPU'' distance -  or a multiple of that - to successfully reach a Parallel Universe.
When attempting to get into a Parallel Universe on console, the game usually freezes, unless the camera is put in fixed mode; on emulators, PUs can be reached without fixing the camera. As Mario has to pass over an out of bounds area to reach a Parallel Universe and the game splits up every frame of his movement into four parts, running collision checks for each of them, it is necessary that each of those quarter frame steps goes far enough to reach a PU. This means, Mario has to build up enough speed using [[#Hyperspeed glitches|hyperspeed glitches]] to travel a distance of 4 Parallel Universes, called ''Quadruple Parallel Universe'' or ''QPU'' distance -  or a multiple of that - to successfully reach a Parallel Universe.


Parallel Universes themselves are invisible, as there are no graphics loaded. Also, most objects are not loaded in Parallel Universes; walls are missing and there is no water. The latter is especially important, as this is the reason why the [[#Moat Door Skip|Moat Door Skip]] works. However, some things like loading zones, namely paintings in the castle, or [[Crazed Crate]]s, are still present there. Spawning a [[Power Star]] like a 100-coin star in a Parallel Universe softlocks the game.<ref>[http://tasvideos.org/GameResources/N64/SuperMario64.html TASVideos - explanation of Parallel Universes]</ref><ref>[https://www.youtube.com/watch?v=kHd8TSf2tds YouTube Video from Pannenkoek2012, noting that  vertical PUs exist as well]</ref><ref>[https://www.youtube.com/watch?v=wC1PV9CYC4Y YouTube video showing the softlock from spawning a star in a PU]</ref>
Parallel Universes themselves are invisible, as there are no graphics loaded. Also, most objects are not loaded in Parallel Universes; walls are missing and there is no water. The latter is especially important, as this is the reason why the [[#Moat Door Skip|Moat Door Skip]] works. However, some things like loading zones, namely paintings in the castle, or [[Crazed Crate]]s, are still present there. Spawning a [[Power Star]] like a 100-coin star in a Parallel Universe softlocks the game.<ref>[http://tasvideos.org/GameResources/N64/SuperMario64.html TASVideos - explanation of Parallel Universes]</ref><ref>[https://www.youtube.com/watch?v=kHd8TSf2tds YouTube Video from Pannenkoek2012, noting that  vertical PUs exist as well]</ref><ref>[https://www.youtube.com/watch?v=wC1PV9CYC4Y YouTube video showing the softlock from spawning a star in a PU]</ref>