18 minutes: Difference between revisions

From ALttPR Wiki
Jump to navigation Jump to search
(a unified explanation of why some things take 18 minutes)
 
(typo: an number -> a number)
 
Line 3: Line 3:
Some events in the game depend on timers or similar counters that count down once per frame until they reach a target value. When these events occur as intended, the counter will be initialized so that it takes an appropriately small number of frames.
Some events in the game depend on timers or similar counters that count down once per frame until they reach a target value. When these events occur as intended, the counter will be initialized so that it takes an appropriately small number of frames.


When the events occur in a glitched state, they could start counting from an number that was being used for something else, causing a much longer delay than intended. There is a significant chance that the number starts ''lower'' than the target value, so you have to wait for up to 65,535 frames for it to wrap all the way around the sequence of 16-bit numbers.
When the events occur in a glitched state, they could start counting from a number that was being used for something else, causing a much longer delay than intended. There is a significant chance that the number starts ''lower'' than the target value, so you have to wait for up to 65,535 frames for it to wrap all the way around the sequence of 16-bit numbers.


At 60 frames per second, counting 65535 frames takes 18 minutes and 12.25 seconds.
At 60 frames per second, counting 65535 frames takes 18 minutes and 12.25 seconds.


Glitches that depend on counters like this will usually have some setup that initializes the counter to something reasonable, such as picking up a pot before performing [[Mirror Door]].
Glitches that depend on counters like this will usually have some setup that initializes the counter to something reasonable, such as picking up a pot before performing [[Mirror Door]].

Latest revision as of 23:49, 2 January 2022

Certain major glitches in ALttP, if performed incorrectly, are described as freezing your game for "up to 18 minutes".

Some events in the game depend on timers or similar counters that count down once per frame until they reach a target value. When these events occur as intended, the counter will be initialized so that it takes an appropriately small number of frames.

When the events occur in a glitched state, they could start counting from a number that was being used for something else, causing a much longer delay than intended. There is a significant chance that the number starts lower than the target value, so you have to wait for up to 65,535 frames for it to wrap all the way around the sequence of 16-bit numbers.

At 60 frames per second, counting 65535 frames takes 18 minutes and 12.25 seconds.

Glitches that depend on counters like this will usually have some setup that initializes the counter to something reasonable, such as picking up a pot before performing Mirror Door.