The Legend of Zelda (second quest)

  • Aims for fastest time
  • Manipulates Luck
  • Abuses Programming Errors
  • Uses a game restart sequence
  • Takes damage to save time
  • Uses a level password
  • No predefined saves
  • No Death
  • Genre: Adventure
  • Uses Emulator FCEUX 2.0.2
This run is 4 minutes and 13.60 seconds faster than Sleepz' published movie.
The Legend of Zelda is a game that needs little introduction to most gamers, however, here is a brief description:
The player controls the hero character, Link. Ganon, the prince of darkness, and his army attack the kingdom of Hyrule and steal the triforce of power--a legendary relic handed down to each generation of Hyrule's royalty. Now he needs to obtain the triforce of wisdom, but princess Zelda scattered eight pieces of the triforce of wisdom in dungeons around the game's fantasy setting called Hyrule. The princess also sends her most trustworthy nursemaid, Impa, to find a hero with the courage to face Ganon. Ganon, who is upset by Zelda's plot, captures her and imprisons her at LEVEL 9.
Impa is then cornered by Ganon's minions but rescued by a young man. His name is Link, our protagonist. Impa confides in Link, telling him the story of Gannon and the Princess. Now armed with a quest, but no sword, Link goes forth to save Hyrule. I still wonder how the Princess managed to hide those triforce pieces with all the monsters and locked doors in these dungeons...

Techniques and Technical Information

Luck Manipulation

Luck manipulation is the heart and soul of this run. The most rerecords are used trying to obtain ideal enemy movement in order to quickly kill enemies, bypass them, or damage boost off of them.

Enemy Dropping Patterns

One of the first objectives when starting this run was to determine exactly how the game determines what items enemies drop; with full control of enemy drops, the better we may plan our damage boosting and bomb rationing.
The enemies either drop or do not drop an item based solely on what frame they are killed.
What exactly they drop is more complicated. It is determined by two factors:
  • The type of baddie (they are lumped into 4 categories based on what they are programmed to drop)
  • The number in $052A
$052A increases by one every time an enemy is killed. This chart made by Baxter illustrates the concept better than words:
Knowing which enemies are up ahead, and the value of $052A, it was easier to plan our bomb and life boosts based on what would drop.
For example, some frames are used in LEVEL 6 to kill three bats. This increases $052A's value by three so that the digdogger (eyes) in level 8 will drop us a fairy and a heart, allowing Link to completely refill the health he used damage boosting towards LEVEL 8.
0050 will also count the amount of enemies that are killed, but it will drop to 0 again if Link is hit. Killing a number of enemies (for instance 10) without getting hit will cause $0050 to flip to 0 automatically in which case the item at the chart in the picture will be overwritten by a ‘good’ item such as a 5-rupee, a bomb or a fairy. This is how it for instance was possible to get two 5-rupees at LEVEL 1.

Luck manipulation of enemy movement

There are a few ways to control how the enemies move on screen.
  • When Link enters a room on a different frame, the enemies' initial direction of movement can change. (Waiting before entering next room is done underneath the door, or spread out over the previous room, so that it won’t be very noticeable.)
  • Pausing the game using the select button costs a minimum of two frames, but it can save a lot of time in certain situations because it directly effects how enemies behave.
  • Enemies behave differently based on where Link is on the screen.
Even with all of these techniques to manipulate the monsters, it can still be difficult to control all the baddies in an optimal fashion; consequently, this is where many rerecords are spent. The only way to be sure that a room of blue darknuts, or bunnies, etc is completed as fast as possible is to keep trying to manipulate their movement, while at the same time sparing the least amount of frames. Unfortunately, all said techniques to control monsters' behavior use frames (except Link's position, but it can cost frames to move him for luck manipulation, too).
With this conclusion, it's easy to see that the game lends itself to massive amounts of testing. Generally, one will find that once a certain problem monster has been manipulated to behave in a desired fashion, the rest have all inconveniently changed their minds and are now doing something undesired. The best approach is to keep trying various combinations of the techniques until an optimal one presents itself.

Luck manipulation and gambling

There is a 4 frame rule at the gamble door (as well as all other doors that lead from the overworld to the underworld). The gamble rupee value can only be manipulated based on what frame the gambling den is entered at. So keep trying every 4th frame until desired rupee value is available. Getting the 50-rupee in the middle is obviously the fastest.

Combat and Movement Techniques

Combat and movement is fairly straightforward in Zelda, but there are some tricks to help save time.

Link's Movement

Some facts:
  • Link can only move and face one of four directions--up left right and down--at a given time.
  • He can only change direction on every 8th X or Y coordinate.
  • These pixels where link can move any direction (i.e. {64,64}, {64,72}, {56, 64}, Let's call them a crossroad coordinate.
  • Link moves at roughly 1.5 pixels per frame (there is sub pixel positioning).
  • The memory addresses for Link's X,Y position are $0070 and $0248 respectively. Due to sub pixel positioning, when moving these addresses generally increase/decrease in this pattern: 1,2,1,2,1 etc
There is a timesaving technique in regards to the sub pixel positioning. Link can move through an in screen block of area every 6 frames except when moving up followed by right, right followed by up, down followed by left or left followed by down. In said case, Link moves at 5 frames per in screen block (8 x or y coordinates constitute a block in game). This is the explanation for zigzagging up and right or down and left--it saves one frame every 8 coordinates.
  • Screen scroll glitch:
Sleepz posted this glitch some time ago, but it has yet to be used in a published TAS. In the overworld, just before entering a new screen, press a direction to Link's left or right for one frame when Link only has 5 more coordinates to reach the next screen scroll. It allows Link to wrap around the screen so that he is now on the opposite side! The timesaving implications are lucrative, especially considering the fact that link can wrap around the entire map, entirely skip the lost woods, and access areas that may otherwise be obscured by water or mountains.
  • Similarly, the above technique may be used to get inside obstacles (blocks, bushes, etc), and sometimes allows Link to bypass areas that he would normally need to walk around. The first example of this is in dungeon 2: Link is able to enter the inside of a block from the top, and then exit the block from the right side. This is not easily performed during console play as it requires frame by frame input (it does not use left+right or anything). Due to the fact that Link can move halfway ‘below’/’inside’ solid blocks normally, this trick allows Link to pass through diagonally placed solid blocks.

Combat Techniques

  • Pressing A + B with bombs equipped allow link to use his sword and deploy a bomb simultaneously--a very useful move on enemies that take multiple blows to kill. It’s especially useful since Link is unable to do anything for a few frames when using his sword, a bomb or another item.
  • On a crossroad coordinate, Link may face any direction while thrusting his sword. Useful in striking multiple enemies that are on various sides of the hero.
  • On a crossroad coordinate, press Left, Right, and A. Link will attack diagonally up and left!
  • When hitting an enemy with the sword on the exact frame that a bomb explodes, the enemy will get damaged by both at the same time. This trick is used often to avoid enemy invulnerability time.
  • When moving over the ladder or leaving a room, Link can use his sword while he is moving. This is especially useful for collecting pickups when leaving the room after for instance a bossfight.
  • When fighting digdoggers (eye boss monsters), lay a bomb and quickly swap to the whistle. Blow the whistle, and the bomb's detonation timer will continue to count down despite the fact that all enemies and actions are paused while the whistle is in use. The bomb will instantly detonate once the whistle is finished playing, instantly exploding on the small eyes spawned by the large eye. (Bombs take 40 frames to detonate, memory address $0038 or $0039)

Route

The route begins much like Sleepz' run, but ends differently. Here's the brief description
  • LEVEL 1
    • Acquire rupees for gambling
    • Heart Piece for damage bumps and the white sword
    • Triforce Piece 1
    • Reset
  • LEVEL 2
    • Along the way...
      • Gamble
      • Get Candle (needed for opening a 100 rupee cave after level 2 and opening level 7)
    • Pick up the whistle
    • Pick up Heart Container for White Sword
    • Pick up Triforce Piece 2
  • LEVEL 6
    • Get ladder. (useful in level 4 and level 5 and this particular level order, needed for entering level 8 on the way to level 4 also)
    • Leave for now; bow and arrows needed to finish
  • LEVEL 8
    • Along the way...
      • Pick up the bracelet; it's needed to open up LEVEL 4 so we can get the raft, and consequently the bow in LEVEL 5.
    • Use stepladder to enter
    • Triforce Piece 3
  • LEVEL 4
    • Along the way...
      • White sword (in this quest plenty of bosses which make it worthwhile to collect this)
    • Pick up the raft for LEVEL 5 and the bow, which is required to finish 6 and 7
    • Triforce Piece 4
    • Reset
  • LEVEL 5
    • Pick up Bow
    • Triforce Piece 5
    • Reset
  • LEVEL 3
    • Along the way...
      • Use the secret road man in cave for speed
    • Triforce Piece 6
  • LEVEL 7
    • Triforce Piece 7
    • Whistle to the lake by lost woods
  • LEVEL 6
    • Triforce Piece 8--complete triforce now
  • LEVEL 9
    • Silver Arrow
    • Ending

Extra

It was also possible to glitch up the level 9 graphics due to entering it before the game expected it. Due to the frame rule of 4 frames, the glitching of the graphics can be avoid by entering a frame later, without losing any time. Fortunately it was possible to hexedit the version with the glitched level 9 graphics (it completes the game in the exact same amount of frames):

Personal comments:

Morrison: I lost motivation on this project numerous times and just disappeared for long stretches of time. I apologize to Baxter for this, as it is the main reason the run took such a long time to make. While I was away, he finished the dungeons 5, 3, 7, 6 revisited, and 9 all by his lonesome, so about half the run wasn't even a collaboration, but a solo effort. Hats off to you :) I'm not certain my name should even be on the project anymore. I am just glad to see it completed. Baxter is a great TASing partner. Trying to beat the times on his WIPs is not an easy task; he's quite thorough and patient. :) I had a lot of fun spending time with him in irc while we were doing all the testing. Big thanks to all previous Zelda TAS authors, Baxter, Phil, Sleepz namely.
Baxter: The Legend of Zelda is one of few games in TASing where I both really like the results as well as the process. Researching routes, and optimizing rooms can both be quite fun. While the main idea of the fastest completion of a room might be the same, the specifics are not. Due to a change in the order of completion of the levels (…53769 instead of …56379) all of these levels had to be redone (level 5 also). Having to redo stuff that’s was completely optimized before is not fun, and this is when you notice that not each room can be done the same. Even though it’s called luck manipulation, there are frames required to manipulate this luck, and sometimes real luck is needed in the process. When redoing these levels, you constantly gain and lose frames to a previous version in each room, while they both may have been completely optimized for each initial conditions. It’s definitely a bit different from most other games, but very fun nonetheless. The cooperation with Morrison was very fun, and he was a great partner. He often mentioned options I hadn’t thought of, and produced very accurate work. It was too bad that he lost his motivation for TASing, but more because I really enjoyed working with him than that I had to do more work myself. Thanks to everyone who showed their interest in this TAS, which is always a great help.

mmbossman: Excellent planning, execution, and entertainment; Great job guys. Accepting as an improvement to the published "2nd quest" movie.
Bisqwit: Encoding. My first FM2 encode :)
Bisqwit: Unclaiming the encode, because I can't figure out why mencoder refuses to render the libass subtitles in the movie, and I have too little time to debug it.


adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3574)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
http://fceux.com/zip That should fix your bug.
It's hard to look this good. My TAS projects
Banned User
Joined: 12/5/2007
Posts: 742
Location: Gone
Yeah, and I knew that I had 2.0.2 - that's what it said in my screenshot. I'll try that, thank you
Banned User
Joined: 12/5/2007
Posts: 742
Location: Gone
I have seen more program error abuses in this run than any other Zelda run I've seen, definitely a yes!
Active player (253)
Joined: 7/30/2006
Posts: 208
Location: Alefgard, USA
Wonderful. My favorite part was scroll glitching to completely avoid the lost woods. Yes vote.
Active player (253)
Joined: 7/30/2006
Posts: 208
Location: Alefgard, USA
A question though -- and it may have been brought up elsewhere. Is it possible to use the scroll glitch inside of a dungeon? It seems that if it were, you could avoid using as many keys or bombs, or possibly even skip some items. It may even allow you to scroll glitch from one dungeon to another. Wouldn't it???
Editor, Experienced player (734)
Joined: 6/13/2006
Posts: 3300
Location: Massachussetts, USA
I don't know exactly, but I think that the overworld is one giant map, and the dungeons are separate maps that are not connected to each other (i.e. when playing only your current dungeon is loaded.)
Homepage ☣ Retired
Active player (411)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Don't ask me what I have voted :P Nice run! Baxter really loves that game. That game is really annoying to TAS because all of this shit is random based. Because of that reason, I didn't want to participate in that project and I also wanted to TAS something different. Also, there are some of my runs that I wanted, and I'm currently at work, to improve such as SCV4. Baxter wanted to do the 2nd Zelda quest run after we had finished with our run but then we found that the glitch could help more than expected for the 1st quest run. So he asked me if I wanted to do it but I told him to do the 2nd quest run as it was more needed. So now, it is done. And now, he wants to redo the 1st quest right soon. :S I've hardly got the morale to do half the movie and now, it's his 4th TASes of Zelda, including Zelda Outlands hack. Damn, Baxter, you are crazy ;). Well, congratulations Baxter and Morrison.
Skilled player (1410)
Joined: 5/31/2004
Posts: 1821
dave_dfwm wrote:
A question though -- and it may have been brought up elsewhere. Is it possible to use the scroll glitch inside of a dungeon?
No, this isn't mentioned in the submission text yet... but it should be. More things will be added there... but no, it it not possible to glitch from one side of the room to the other side of the room inside dungeons. This can only be done in the overworld.
ShinyDoofy wrote:
Another lossless x264, this time without the subtitles (for the publishers).
Hmm... the current youtube generation is all too willing to upload any movie, and maybe even the fewer subtitles the better. I remember DeHackEd accidently encoding a tetris movie of mine without subtitles, and even though it was replaced very quickly, that version without subtitles can still be found at youtube... I'm not a big fan of it.
Editor, Expert player (2330)
Joined: 5/15/2007
Posts: 3934
Location: Germany
dave_dfwm wrote:
A question though -- and it may have been brought up elsewhere. Is it possible to use the scroll glitch inside of a dungeon? It seems that if it were, you could avoid using as many keys or bombs, or possibly even skip some items. It may even allow you to scroll glitch from one dungeon to another. Wouldn't it???
If I recall correctly, when it was tested the game froze (?). Either way, it wasn't possible I think.
Banned User
Joined: 8/2/2008
Posts: 420
Location: italy
I've never been a fan of the Zelda series, so I didn't really know what to expect when I downloaded this. Now I'm glad I did so, because holy shit, this is awesome. Yes forever.
Gone.
Active player (328)
Joined: 2/23/2005
Posts: 786
Despite having played through this game at least 30 times over the years, I have never once gotten through the second quest. Great movie, I was thoroughly impressed.
Experienced player (614)
Joined: 4/24/2005
Posts: 612
This is the type of TAS I like where you know what you can do ahead of time and never look back as you make progress. It was also full of moments that would make a non-believer in TASVideos cringe and shout cheats/hacks. Very nice job and I'm sure it required a lot of testing here and there so don't think that goes unappreciated. Yes vote.
Joined: 4/25/2004
Posts: 498
THANKS BAXTER & MORRISON, YOU'RE THE HEROES OF ZELDA TASING. *holds up a random Triforce and flashes the screen with it, inducing epilepsy in half the audience* YOU ARE GREAT. YOU HAVE AN AMAZING LUCK MANIPULATION AND GLITCHERY. *votes yes*
snorlax
He/Him
Joined: 5/20/2007
Posts: 174
Location: Wisconsin
Phil wrote:
redo the 1st quest right soon.
Voting yes, on the condition that this happens. Yes, my vote can be bought.
Active player (315)
Joined: 8/25/2006
Posts: 287
This is now one of my favorite TASes ever. :) Amazing job, my hat is off to both of you, i'm impressed. Needless to say; yes vote!
Joined: 3/11/2008
Posts: 583
Location: USA
Wow that name was input fast. Down the stairs from the right. And again at the dungeon. And backwards at the gambling den. Side note: A pity you didn't happen to walk through the B button slot on way to first dungeon, it'd make a good screenshot. Hope it happens later. . . Almost does, about frame 4420... The enemy manipulation looks quite good. And an old man asks for your money or your life...unlike a normal player, you leave life. hmm...wouldn't happen to be a third of those to have a game-killing 0-heart container experience? Oh, so you kill the flames with silver arrows...I feel stupid Yes vote.
Banned User
Joined: 12/5/2007
Posts: 742
Location: Gone
Did Link have enough life (3 units) to at least damage-boost off one of those four flames in the end? That's what Phil/Bax once done in the first-quest TAS I once saw =)
eternaljwh wrote:
Oh, so you kill the flames with silver arrows...I feel stupid
Morrison
He/Him
Former player
Joined: 8/2/2006
Posts: 195
Location: USA
symbolic X wrote:
Did Link have enough life (3 units) to at least damage-boost off one of those four flames in the end? That's what Phil/Bax once done in the first-quest TAS I once saw =)
tried it, but i think it was slower in this movie.
twitch.tv/Retrogaming2084
Joined: 4/25/2004
Posts: 615
Location: The Netherlands
Nice movie. I really liked the scroll- and diagonal blocks glitches. Kudos to whoever found them.
qfox.nl
Joined: 4/3/2005
Posts: 575
Location: Spain
Congratulations! I've never seen the 2nd quest done before, was waiting for something like this. Yes vote.
No.
Joined: 6/22/2007
Posts: 181
Location: Eastern Michigan University
I really enjoyed this run. I watched the MKV version, thank you for an interesting run. Yes vote. Edit -- Note to self: AVI != MKV
Banned User
Joined: 12/5/2007
Posts: 742
Location: Gone
Okie-doke! This means both of you earned the respect of a lot of people here and of course mine. This also means that this is a message being clearly sent to the other Zelda fans meaning that this run will be in the record books for a while! I hope this lasts more than a year after it gets published. Best of luck beyond this point. =) $.X
Player (71)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Very cool run. Liked the ladder trick to go past the larger water areas. Cheers!
Active player (435)
Joined: 9/27/2004
Posts: 650
Location: Canada
Lovely run, I'm digging all the new uses for the tricks, and I haven't seen the screen wrapping glitch before. Heck yeah I was entertained.
Joined: 7/16/2006
Posts: 635
nice run. Unfortunately I'm not very familiar with the second quest, so a lot of it went over my head, but the level of optimization was very clear. definitely a yes. Out of curiosity, is the screen wrap glitch used in the current first quest TAS?