Super Mario Bros. 3 in 3 Minutes – World Record Speedrun Explained [video]

6 years ago (youtube.com)

Excellent video. I'm impressed the author went to recreate the run frame by frame, and then used those findings to analyze what was happening. Never expected this video to turn into a full on reverse engineering explanation.

As a side note, this kind of speed run has become more popular in the recent years for a combination of reasons: - First, it's difficult to improve on the regular world records since they're so optimized (just have a look at Quake Done Quick and its sequels). - Second, the emulators available to the speed running community have evolved. They now include better ways to track what's happening in memory. - Third, the games themselves are understood better (as recently exemplified by the Super Mario 64 full reverse engineering).

So it's creating a whole new genre of runs that simply isn't about execution anymore.

If you're interested in the topic, you might like the Super Mario World speed run that uses a similar technique (https://www.youtube.com/watch?v=gECESOoU8Es), or the recent work on removing randomness from Wind Waker runs (https://www.youtube.com/watch?v=1hs451PfFzQ).

  • > So it's creating a whole new genre of runs that simply isn't about execution anymore.

    This sounds to me like a variant of "using glitches/sequence breaks isn't how the devs intended it to be played".

    Arguably, setting up for these glitches and exploiting them in real-time (i.e. not TAS) using only a controller is still "execution".

    • Sure. I meant in the sense that if you just said execution without context, you'd simply expect that we'd be talking about mastering inputs. This requires a body of knowledge established completely outside of the game itself.

  • I'd argue that many frame perfect moves used to setting up the memory is very much execution. Maybe a different kind of execution, but still very much skill based.

    • In this video, the speedrunner made a mistake and had to compensate on the fly to get the enemy into the exact position when he hit the pipe. I think that is more impressive than a perfect run.

      1 reply →

  • > So it's creating a whole new genre of runs that simply isn't about execution anymore.

    Did we watch the same video?

    It was completely about execution. You still need to be exceptionally good at the game to get those frame-perfect setups.

    • I meant in the sense that if you just said execution without context, you'd simply expect that we'd be talking about mastering inputs. This requires a body of knowledge established completely outside of the game itself.

      1 reply →

That's absolutely insane. Manipulating the state of the game world so that its data maps to instructions to complete the game, and then glitching in a way that executes it.

The only thing I'm not clear on: even knowing exactly what you're doing... how likely is it that you could pull this off in real-time? Did the player have to do this 10 times? 100? 1,000?

  • I don't know about the run shown in the OP, but there are a fair number of memory-manipulation/ACE speedruns that are feasible in RTA ("real-time attack", a.k.a. something a human could pull off, as distinct from TAS). Off the top of my head I can think of such routes for Pokemon Red/Blue, Ocarina of Time, and Super Mario World.

    To answer your question of "how likely is one to pull this off" for those three, the Pokemon one requires no almost advanced execution, other than turning off the console at a precise point to corrupt the save data you otherwise just need to follow a simple (though long) series of steps. The Mario one requires some pixel-perfect precision, and runners often used hacked ROMs that display coordinates in order to train. The Zelda one requires exact angles to be held on the analog stick, and I've heard of people creating guides out of cardboard and rubber bands in order to help them achieve the angles more reliably.

    Sorry that I don't have any video links on hand, but you could almost certainly find examples of these in the GDQ archives.

    EDIT: Found a good video for the SMW example, by SethBling, which actually goes a step further and manually reprograms SMW into Flappy Bird: https://www.youtube.com/watch?v=hB6eY73sLV0

    EDIT 2: Here's an excellent explanation of the Zelda ACE: https://www.youtube.com/watch?v=wdRJWDKb5Bo

    • Even then, some of the timing accuracy required still mystifies me. E.g., if I got it right then, for the RNG manipulation to work, you have to press "A" on the menu screen in one particular frame, counted from when the console was switched on. At the standard PAL framerate of 50 FPS, this gives you 1/50th of a second to react, with no visual indicator that the frame you're looking for is about to come up. I have no idea how to even begin training this.

      13 replies →

    • GTA Vice City and San Andreas Any% are also memory manipulation. World record for Vice City is 8.5 minutes and 15 minutes for San Andreas. I think both are very precise but very much doable by speedrunners, although not consistently.

    • One of the Castlevania games (maybe Symphony of Darkness?) achieves ACE by inventory manipulation.

      Mega Man 1 has an ACE category as well which is really interesting. I think Nudua explained it somewhere. (On my phone, but a quick googling should help you.)

      2 replies →

  • > The only thing I'm not clear on: even knowing exactly what you're doing... how likely is it that you could pull this off in real-time? Did the player have to do this 10 times? 100? 1,000?

    Speedrunners usually list their number of attempts in the top right corner of their splits window. In this case, it says 16/3904. My read of that is that this is his 3,904th total attempt at speed running this game (I have seen runners with attempt counts at over 40k). The 16 is probably attempt count for this specific session/stream, but I'm not as sure of that.

  • Having done some speed running (mostly Mirror's Edge), I've clocked 1000's of attempts on some stages. At one point I realised my cam software was taking a screenshot when I pressed record and made it into a seizure inducing compilation: https://www.youtube.com/watch?v=tqN5C_T8yxU These are only the attempts I recorded...

  • They have to do it a bunch to build the muscle memory, but once they have it they get pretty consistent. For instance, dannyb21892 just recently broke the WR for any% in Zelda OoT 2 times in one stream and the run includes similar precision to do ACE.

The video explanation is almost as impressive as the speed run itself.

The speed run is literally doing low level assembly code manipulation to pull off this time apparently.

Worth a watch even for people who aren't into gaming.

  • The 0 exit speedrun for Super Mario World uses pretty much the exact same method (koopas and all) as well https://www.speedrun.com/smw/run/y65xp50z

    SMB3 also has an interesting tool assisted speedrun (non-human doing the inputs) where fast inputs on the second controller cause an overflow on the input buffer allowing for the game to be beaten basically instantly from the start screen.

    If you like this because of the interesting stuff done to abuse the game The Legend of Zelda Ocarina of Time has pretty much been a history of "and then a quicker way to corrupt the game was found".

    It's not always about going fast either, challenge runs also get a lot of very interesting results from a lot of dedication. Super Mario 64's A Button Challenge (try to beat the game with as few A presses as possible) has tons of outrageously complex tricks with amazing explanation videos. One in particular caught people's attention to the point it became a meme https://www.youtube.com/watch?v=kpk2tdsPh0A though it's not actually the most technically impressive to come out of that endeavor.

    • I'm really glad that video became a meme (probably because of the completely unnecessary argument about what a half-A press is) because it got me interested in how a lot of these old games work. The engineering that went into optimizing them is incredible and it's a shame that newer games typically don't bother as much.

      2 replies →

  • Agreed, I was first perplexed at what was going on, starting to not see where it was going at all with the low-level explanations, and then when the enemy positions turned out to be assembly instructions... mind blown.

    It also reminded me of this video which shows Flappy Bird being code injected into Super Mario World, by hand... https://www.youtube.com/watch?v=hB6eY73sLV0

Here is Mitch Flower Power performing the glitch on live TV in 2016 with Stephen Colbert:

https://youtu.be/jvLwpnn1F4Y

I believe Mitch was the first person to do this trick in RTA.

  • What the hell, he just pulled that off with all the distraction and people yelling, with all the stress, on a single try? How is that even possible, don't speedrunners do thousands of runs to get a win like this? Was it a real run?

    And Colbert was speaking and distracting him during some of the most important part of the run and cut off before even really showing his win. What a shame.

    • He also did it at GDQ. Which really speaks to how good Mitch is.

      But once you are at this level, it is the other details that requires grinding:

      The thing that sets the run from TFA apart from this run is the hammer bro manipulation that easily fails AND the luck of having good hammer bro movement (6% chance) after the manipulation is done.

      Getting those two things on top of good execution is what requires thousands of tries for these top players.

    • In many cases, there are "marathon safe" methods that are slower but much easier to get on first try and/or recover from on failure. (The "marathon" refers to live speedrunning marathon events like Games Done Quick.) Presumably, he used this.

  • In addition to how good Mitch is, he's also one of the nicest people around. I recommend his twitch if you wanna watch him speedrun, these days he's grinding SMB 3 10% with a crazy hammer bros. manipulation.

For those of you who (like me) are curious to see what it’s like to have your product broken in ways unforeseen but people unimaginably motivated, check out the IGN speed run series - I love hearing every time the team watching a world-record speed run for the first time says, “whoa, how did that happen? Tim, didn’t you handle that kind of physics bug?!”

It’s absolutely gold: https://youtu.be/2sGN3peODwY

It’s fantasy, but I’d love to see a “miyamoto-and-team watch five classic games be hyper-optimized speed-run“, although the distance may be too great. Part of what makes the ign series enjoyable is that the programmers have intimate knowledge of two worlds: the code, and the gameplay

This is the most fascinating technical post I've seen in HN in quite some time. I'm in awe of how people can optimize around particular goals when given enough time.

  • I have seen similar achievements with some really shitty enterprise software. Where I would normally pull data out of the system and use modern tools to perform analytics, other people who have used the software for years will write 500 line long SQL statements to get the same answer

I love the speedrunning and ROM hacking communities. Speedrunning has become my sports entertainment. And I finally learned Assembly by messing around hacking Super Mario World.

All I can say is that I wish I combined my passions for programming and gaming much earlier in life.

If you like this kind of video, I highly recommend Summoning Salt's World Record Progression videos: https://www.youtube.com/channel/UCtUbO6rBht0daVIOGML3c8w

They don't always dig deep as the original video post, but the discovery of glitches comes up often and the videos are incredibly well done.

Great video. The realization that "beating Super Mario Bros. 3" is much less well-defined than I thought is very interesting. Not just technically, but like there's some philosophical metaphor that I can't quite describe...

  • Yeah, that's why the community has specific categories for different runs. I appreciate glitched runs because of the acumen needed to accomplish them but it's 100% runs that truly impress me most as a gamer.

    The speedrun world is almost like a scholarly domain, with all the usual bickering about terminology, whether this qualifies as that, and so on. I would be interested to read an ethnology of the community.

    • > The speedrun world is almost like a scholarly domain, with all the usual bickering about terminology

      Right. Like the most recent 100% runs of Ocarina of Time[1], which use glitches to obtain items early and break the sequence of the game, while still obtaining every item from its source eventually making them still legitimate 100% runs.

      You'd think "100%" and "glitchless" were synonymous, but they're not anymore!

      1: https://www.youtube.com/watch?v=F4nc4lhj3Uk

      2 replies →

  • I think the key attribute of "Any %" disconnecting success from actual content completion is essential for this sort of thing to succeed, but also what separates it from the mundane definition of "beating the game."

And here's this glitch taken to the max using a TAS (in which a program is used to enter frame-perfect controller inputs). Apparently, a second controller is used to enter arbitrary code into RAM.

http://tasvideos.org/4961S.html

I don't really understand it, but it really blows my mind what some people think of.

  • The progression isn't particularly mind blowing, though. Once somebody notices a buffer overflow / register pollution of some sort, you note which area of memory it's executing and then reverse engineer how to modify that memory to execute particular instructions. I would expect a community like HN would consider this par for the course.

    That said, what's impressive to me is the amount of time and energy individuals are willing to expend on this sort of thing. Speed runs in general, the sheer time investment and dedication. There's a sand mandala aspect to it all.

    • Yeah, it turns out the link I posted is from one of the people behind the discovery/application of the glitch, so it really seems to be the logical next step if you know what you're doing.

      And agreed on speedrunners! It's not something I could ever do myself, but it's one of my favorite aspects of gaming.

    • I don't know if you've watched The Dawn Wall; it reminds me of speedrun grinding IRL.

    • I wonder how many of these people eventually go on to become developers and/or enter the (anti-?)security community, because finding and exploiting bugs in non-games also requires the same sets of skills.

I was thinking someone should write a story on the premise that we are living in a simulation, where 'glitches in the matrix' like déjà vu, coincidences, freak accidents, etc., are due to accidental arrangements of people corrupting the program... but then I realised someone already had. In El ángel exterminador (1962) a group of people are trapped in a single room (level) due to their accidental seating arrangement. They are freed when they unlock the same sequence. In Groundhog Day a similar thing happens where the protagonist is trapped replaying the same level, until he figures out the correct sequence of actions to pass it. I am sure there are others.

  • If you want a story that handles this scenario pretty much exactly, you might want to check out “Unsong” [0] by the excellent Scott Alexander.

    That world is basically a biblically-inspired computer simulation which gets corrupted when Apollo 8 crashes into the celestial sphere. Also boiling a goat in its mother’s milk causes a segfault for some reason the developer can’t quite explain.

    [0] http://unsongbook.com/chapter-1-dark-satanic-mills/

    • The payoff is real: “So the whole universe runs on this system of sapphires connected by paths?”

      “MOST OF IT RUNS ON SAPPHIRES ON PATHS, BUT I USE RUBY ON RAILS FOR THE DATABASES.”

      I quite enjoyed this story, thank you for sharing it.

  • I saw El ángel exterminador and it was great, but I don't think it hints at any simulation. The phenomenon does not really need any literal explanation, but if I had to provide one, I would rather suggest a mystical occurrence or entity such as the "angel" hinted by the title, somehow triggered by the characters, and the seating solution may be a way of telling the humans to stay in their place.

This was interesting. I used to whine about doing this kind of glitched run, but it's just a different category of speedrun. Amazing to have that level of precision, though of course he must have done this hundreds, maybe thousands of times to get it right.

If you like this kind of explanation be sure to watch the "0.5 A presses" Mario 64 speedrun video, which is equally interesting as far as getting into the hidden guts of the game: https://youtu.be/kpk2tdsPh0A

UPDATE: They do! https://en.wikipedia.org/wiki/List_of_Super_Mario_speedrunni... (see also, replies)

----

I'm not saying this kind of thing isn't impressive -- because, duh, it's amazing! I just don't think it should count as a record. Or at least it should have it's own category.

For me it just crosses a line between exploiting a side effect or minor bug, and... well, this.

If I could somehow glitch physics at the quantum level in real life, to instantly warp me to the finish line of a race, is it fair?

Is it in the _spirit_ of the race?

It'd be incredible, sure, and on paper, yes, you went from point A to B faster than a cheetah. But it's no longer a race concerning the physical fitness of the contestants. It's about systemic exploitation.

I guess this question bleeds into the idea of physical augmentation and enhancement, and quickly into some Deus Ex stuff, if you push it enough.

Love the hack, just pondering the ethics of it being a record.

  • It is it's own category. https://www.speedrun.com/smb3 has the following:

    100%: "Beat the game, entering and completing every stage and Hammer Bros. fight" Any %, warpless: "Beat the game as quickly as possible without using any wrong warps or warp whistles. Warp whistles may be collected but not used." Any %, no wrong warp: "Beat the game as quickly as possible without using any wrong warps." Any %: “Time starts on pressing Start on the title screen. Time ends when Mario is visible in the princess' chamber. If the game crashes, the run is invalid."

    The run shows is an Any% run.

  • I'm not a speedrunning expert but I think that there are usually subcategories for "glitchless" runs, where you can only use the intended game mechanics. So your suggestion has already been approved by the speedrunning community.

  • It's not really any different to how we have different categories for racing. We have categories for people in cars, and categories for people running under their own power, etc.

    Does the fastest lap record for some track take away from any sprinting record?

    Even if there was a running race and car race on the same track I don't think anyone would have any issue differentiating between the various records that would exist.

Ropping to victory would have been impossible if Nintendo didn’t constantly cut corners and implemented stack canaries like they should have.

This guy makes such good videos.

I mean, I marginally gave a shit about a lot of these games now that I'm old (even though I owned all of them as a kid), much less about speed runs, but after watching his videos by chance, I suddenly care again ... and maybe even a lot more for the endeavour of speed runs.

And that's the hallmark of a good documentary.

Whenever i see stuff like this (youtube recommends speedruns + indepth speedruns videos on and off over the last few years), i imagine something like game of life where a ton of pixels are getting smaller and more refined.

The thought behind it is, that we as brains churn through everything and as we are that many and we are connected so well, we just churn through games which have been released 32 years ago by doing everything you can do with it.

Just a few days ago i saw a video where they used debug code to manipulate the game state and one of those things was a sprite fix, as there is a bug in super mario bros. 2 where the last frame was skipped and the memory fix fixes that.

The same happens with more complex 3d games as well, like thx to nvidia tools frame analysis of games exist on yt. Nice to see all the render pathes explained step by step.

ahhmm clears throat This wouldn't have happened if they used Rust ;)

  • The reason you get these sorts of bugs is not because of the languages used, but because of the tight constraints, most notably the limited amounts of ROM and RAM available. You simply couldn’t code such a thing in safe Rust. If you wanted to make cartridges like this with Rust, there would be a lot of unsafe code, and you’d get just the same bugs.

    Put another way: if you said, “you wouldn’t get this if you wrote it in Java”—well, sure, but that’s because you wouldn’t get anything, because the JVM wouldn’t fit and couldn’t run on the target platform.

  • If there's one thing that makes me regret pushing Rust, it's this. :P Although fortunately, physics engines in any language will always have exploitable, memory-safe bugs that make for great speedruns.

  • Seems like a challenge as some would say the game would not have happened, on an NES, in Rust.

    :D

Ive always wished someone made a Super Mario Bros. race your friend to the end split-screen (top & bottom) game. In between each player can hit certain blocks to create obstacles for their opponent.

I think it would be a lot of fun! Maybe some MOD maker can make that!

One interesting aspect of modern technology is that there are huge inefficiencies everywhere. It is also an opportunity since anyone can jump in and create/improve something a lot better.

This video is an interesting demonstration of 2 things - human ingenuity and the scope of improvement even when it is not obvious!

That's quite interesting. The visualization and explanation are awesome.

Besides, I have learned stack exploits, but I had never expected they could also be used in an NES game.

Watched that guy heavily a few months ago. He makes great explanations, really breaks things down so laymen can understand it.

It really bugs me that people refer to this glitch as a wrongwarp even though it's ACE, not a wrongwarp...

EDIT: I mixed up two retro gaming YouTubers. The below refers to Bisqwit, not Bismuth. His personal views aside, I hope you find Bisqwit's other videos interesting.

I really respect this guy as an engineer and a retro gaming enthusiast, but he has some videos explaining his personal irrational Islamophobia that really make me wonder about him as a person -- here's one of them: https://www.youtube.com/watch?v=xVxSAi4sueQ

  • Say what? Watched the video and it did not even mention Islam?

    • He's probably referring to this comment Bisqwit posted in the comments on that video:

      > I believe there is an incredible number of counterfeit doctrines and antichrists (Greek word that literally means counterfeit messiah), some more obvious and some more subtle. Islam being one of the most obvious ones.

      (It's a reference to Islam at least. Not sure how calling it a false doctrine is Islamophobic; seems like a pretty standard Christian take.)

    • It's a great video, that must have taken hundreds of hours just to animate, not to mention the research. That the author has opinions I don't agree with or are unpopular is another matter. I can have more than one thought because I'm not 4 anymore. This reflex to stigmatise and virtue signal annoys the freak out of me. Just enjoy the video.