Gaming Reviews, News, Tips and More.
We may earn a commission from links on this page

How Speedrunners Can Now Beat Ocarina of Time In Under Eight Minutes

We may earn a commission from links on this page.
Image for article titled How Speedrunners Can Now Beat Ocarina of Time In Under Eight Minutes
Screenshot: Kotaku (Zudu/YouTube)

The Legend of Zelda: Ocarina of Time, one of the most beloved games of all time, has always had a devoted community of speedrunners—people who try to complete the game as quickly as humanly possible. Ocarina of Time, released in 1998 for the Nintendo 64, usually takes around 20-30 hours to finish. Using bugs and glitches, speedrunners in recent years have found ways to knock that down to less than half an hour, with the 2019 record hitting just under 17 minutes. But over the past few months, something has changed. The new record for speedrunning Ocarina of Time is a mind-boggling seven minutes and 48 seconds.

Just how did Ocarina of Time speedrunners make such drastic progress? The answer lies in a new method that allows a clever player to manipulate the game’s data so they can warp straight to the end of the game. And it’s led to a wider community discussion about what should or shouldn’t be allowed in speedruns.


The process that makes all of this possible is called arbitrary code execution. By performing actions that seem random, a speedrunner can alter Ocarina of Time’s memory values, forcing the game to remember very specific things at very specific times. With the perfect combination of actions, the speedrunners can then trick the game into executing some ridiculous things — like warping them directly to the end of the game.

“Arbitrary code execution has two main parts,” speedrunner Daniel Baamonde told Kotaku via Discord. “The first one is the ability to tell the game to execute code in places of memory where it shouldn’t, such as places where data is usually stored instead of code. The second part is the ability to finely manipulate the data at those locations such that it mimics valid code.”


In other words, speedrunners can perform actions that change the game’s code. Move Link a certain way and carry items to a specific position and it’s possible to take the data used to track those things and use it for something else. Strange movements or complex file names can consequently have strange effects elsewhere.

This trick has proven crucial to lowering speedrun times in the Any% category, in which runners complete a game as quickly as possible through whatever means available. Runners and glitch hunters have found a variety of ways to execute code and alter data within Ocarina of Time. Arbitrary code execution allowed Majora’s Mask speedrunners to achieve their Holy Grail trick of skipping directly to the endgame segments on the moon, and lowered the Ocarina of Time Any% record to numbers never thought possible. A year ago, Ocarina of Time had finally reached times less than 17 minutes after a four-year process. The current record is a 7 minute and 48 second run held by American runner Zudu.

The process of discovering how to perform arbitrary code execution involved another trick, called Stale reference manipulation. This trick allows players to overwrite Ocarina of Time’s code, especially pertaining to “actors” in the game world. Every actor—entities like enemies, non-playable characters, and items—is represented by a value in the game’s memory. SRM makes it possible to change the data tracking those entities.


The initial use for this trick was small but useful. With the right steps, you could rewrite the items inside a treasure chest. But it soon became clear to speedrunners that SRM could create the circumstances to perform arbitrary code execution, which would allow them to break the game in a variety of ways.

There was a catch. As methods to perform arbitrary code execution developed, they became more and more complicated. Ocarina of Time reads inputs from two of the N64’s controller ports at all times: the first and third port. This provided an opportunity. With more inputs, runners had another way to manipulate the games data. The issue was that achieving the inputs required so much precision on two different controllers, it was all but impossible to pull off during a live, unassisted speedrun.To overcome this difficulty, runners began to use programs to determine the exact position the analog stick needed to be in so they could get the specific value they needed in the game’s memory. They used aids like rubber bands to lock the stick in position before even starting the speedrun.


“This was a bit controversial,” Baamonde said. “Because it brought up some questions about whether this preparation should be included in the time of the run, and about whether it was ok to use external tools in preparation that would not otherwise be allowed during a speedrun.”

These are important existential questions for the speedrunning community. When exactly does a speedrun start? Normally, it’s when you begin to play the game, but this new Any% route for Ocarina of Time requires pre-planning and the use of external tools not usually allowed during a live run. If a run is about executing real-time tricks based on your skill at a video game, using rubbers bands and other makeshift means to lock an essential controller input in place might not be in that spirit.


The Ocarina of Time community faced a question: what exactly were the limits of an Any % speedrun? Anything goes, right? In late February, all runs using modifications were removed from the leaderboards until the community decided what would be allowed.

Maybe it wouldn’t matter at all. As the community put a vote together on the validity of controller modifications and input-reading software, an entirely new route was found that didn’t involve inputs from controller three. It is still a difficult run to perform, but it can be done without outside assistance. Baamonde achieved the first sub-8 minute run on February 25th. Before this achievement, he dubbed the route “Any% No Controversy” on Twitter. Between his runs and Zudu’s record run, Ocarina of Time speedrunners might have hit the pinnacle of what they can accomplish with the game.


“The latest route is really stripping the game down to the metal,” Baamonde said. “When you see runners saying that sub-8 minutes may very well be the last minute barrier the game sees, we really do mean it.”

As for the community poll, the results came in this morning. Controller modifications and input software will now officially be allowed. All runs using the previous methods have been reinstated.


The vote indicated wide support within the immediate community for modifications and other hacks. 54 out of 72 voters agreed that tools like rubbers bands could be allowed. A similar number—52 out of 72 voters—said that runners should be allowed to start a speedrun with the required controller inputs already held.

Given that the most recent Ocarina of Time route doesn’t require a rubber band and can still get under eight minutes, it seems a moot point for now. But games have a tendency to break in strange ways. If new setups and tricks are found, Ocarina of Time speedrunners will be able to use any and all means necessary inside and outside the game to achieve success.