
Super Mario Bros. 3 in 3 Minutes – World Record Speedrun Explained [video] - ubercow13
https://www.youtube.com/watch?v=WWbZFj-cLvk
======
leshokunin
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](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](https://www.youtube.com/watch?v=1hs451PfFzQ)).

~~~
madeofpalk
> 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.

~~~
leshokunin
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.

~~~
madeofpalk
Even then, once you get past a cursory knowledge of the game and mechanics,
you start getting into understanding the implementation of the mechanics of
the game. Then it's just a deeper and deeper rabbit hole until you're
maniupulating bytecode by throwing P Switches up in the air.

------
crazygringo
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?

~~~
kibwen
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](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](https://www.youtube.com/watch?v=wdRJWDKb5Bo)

~~~
xg15
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.

~~~
marvin
There are some cues you could use to get very close, particularly the rhythm
of the music.

I've heard that a decent drummer can hit a note within 15 milliseconds of the
mathematically correct point on average, and that makes it plausible that you
could use rhythm as a cue to hit within the 20 milliseconds that this would
require.

But obviously this would become less likely to succeed as the length of the
game continues and timing errors that affect the soundtrack compound.

~~~
dragontamer
Fighting game players regularly hit 1/60th of a second frame links.

For example, Guilty Gear XX's "one frame jump" is required to escape some
pressure strings. This requires one-frame precision (1/60th of a second),
pushing "Barrier" on frame 3.

If you push Barrier on frame 1 or 2, you're grounded and won't jump. If you
push Barrier on Frame 4, it doesn't make a difference (because your
character's animation is the same by frame 4). Its literally a 1-frame button
timing.

Street Fighter IV had a fair number of 1-frame combos as the bread-and-butter
for many characters. These 1/60th of a second links may be character specific
(since all enemy hitboxes change based off of their relative sizes). They're
also position dependent, because wall-bounce vs corner combos are a thing in
most fighting games.

[https://www.youtube.com/watch?v=OIXuOx8WbFU](https://www.youtube.com/watch?v=OIXuOx8WbFU)

Most people, with enough practice, can execute this. Just most people don't
realize that they can. This isn't even elite musician level.

Now what the expert fighting game player can do, is do the 1-frame link
reliably during a tournament while the crowd is yelling and overall in a
distracted environment.

------
nacs
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.

~~~
zamadatix
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](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](https://www.youtube.com/watch?v=kpk2tdsPh0A)
though it's not actually the most technically impressive to come out of that
endeavor.

~~~
dane-pgp
An A press is an A press. You can't say it's only a half.

~~~
hombre_fatal
Sure you can, when you define ahead of time that "press" means a full down/up
cycle. When you say the down part of the cycle is a "press", you're being just
as arbitrary.

~~~
Firehawke
That's known as positive and negative edge in the fighting game community.
Some fighting games (e.g. Street Fighter) actually check inputs at both the
positive and negative edges of button presses, so you can actually hold punch
while doing the quarter circle forward and let go as you hit forward.

A lot of advanced combos and tricks use negative edge.

~~~
userbinator
The exact same phrases are also used in digital electronics.

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

[https://youtu.be/jvLwpnn1F4Y](https://youtu.be/jvLwpnn1F4Y)

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

~~~
ehsankia
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.

~~~
wodenokoto
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.

------
sgrove
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](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

------
booleanbetrayal
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.

~~~
bob33212
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

------
vga805
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](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.

------
thornjm
Related CTF challenge you can undertake yourself:
[https://gitlab.com/cybears/fall-of-
cybeartron/-/tree/master/...](https://gitlab.com/cybears/fall-of-
cybeartron/-/tree/master/challenges/pwn/block_dude)

Write-up of solution: [https://greenbender.github.io/ctf-writeup/post-
cybearsctf-20...](https://greenbender.github.io/ctf-writeup/post-
cybearsctf-2019-writeup-blockdude/)

~~~
bottled_poe
Thanks for this, looks interesting

------
default-kramer
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...

~~~
devindotcom
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.

~~~
striking
> 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](https://www.youtube.com/watch?v=F4nc4lhj3Uk)

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

they never wore! it all depends on the community definition. you can have 100%
glitchless and 100% with glitches. or you can have both have the same
category. it all depends on what the runners define.

------
kakkun
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](http://tasvideos.org/4961S.html)

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

~~~
emerged
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.

~~~
kakkun
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.

------
thret
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.

~~~
unimportant2117
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/](http://unsongbook.com/chapter-1-dark-satanic-mills/)

~~~
thret
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.

------
devindotcom
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](https://youtu.be/kpk2tdsPh0A)

------
fortyseven
_UPDATE:_ They do!
[https://en.wikipedia.org/wiki/List_of_Super_Mario_speedrunni...](https://en.wikipedia.org/wiki/List_of_Super_Mario_speedrunning_records#Super_Mario_Bros._3)
(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.

~~~
berbec
It is it's own category.
[https://www.speedrun.com/smb3](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.

~~~
fortyseven
Indeed!

When I got back to my desk I looked into a bit and was happy to see it all
categorized nicely.

I withdraw my questioning, and am quite happy everyone's represented. ;D

[https://en.wikipedia.org/wiki/List_of_Super_Mario_speedrunni...](https://en.wikipedia.org/wiki/List_of_Super_Mario_speedrunning_records#Super_Mario_Bros._3)

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

~~~
kohtatsu
This comment is indistinguishable from sarcasm.

------
red_admiral
Gives the term _shellcode_ a whole new meaning!

~~~
fortyseven
I snorted. ;)

------
racl101
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.

~~~
drewboo
I've always found the any% categories of speed running to be the most
interesting, since it often works by manipulating the code of a game to work
in really inventive ways.

if you like videos like this, pannenkeok2012 does super in depth analysis of
everything Super Mario 64

[https://www.youtube.com/user/pannenkeok2012](https://www.youtube.com/user/pannenkeok2012)

------
Regenschirm
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.

------
ducktective
ahhmm _clears throat_ This wouldn't have happened if they used Rust ;)

~~~
chrismorgan
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.

~~~
ducktective
yeah I was joking :D...Designers had to use assembly...

~~~
chrismorgan
One of life’s pleasures is taking jokes seriously.

------
paul7986
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!

~~~
zamadatix
I'm 95% sure this is sarcastically referencing
[https://www.nintendo.com/games/detail/super-mario-
bros-35-sw...](https://www.nintendo.com/games/detail/super-mario-
bros-35-switch/) but in case it isn't or someone reading isn't aware.

~~~
paul7986
Oh wow what I wished for decades ago is coming out soon for a home console.
Had no idea but thank you!!

Weird it's only the original Super Mario Bros. game and only available from
October to March.

Didn't know it was already created on the DX...never owned one before.

*upon a search a Modder created this a year ago called Mario Royale (better name then 35) [https://www.ibtimes.com/super-mario-bros-35-has-elements-201...](https://www.ibtimes.com/super-mario-bros-35-has-elements-2019-fan-made-battle-royale-starring-mario-3042363) . They shut him down and created their own .. surprised no one at Nintendo thought of this nor ask the modder for help.

Lame, Nintendo lame!

------
jaysonqpt
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!

------
syspec
Inked in this YouTube video description, is another channel
[https://www.youtube.com/c/RetroGameMechanicsExplained](https://www.youtube.com/c/RetroGameMechanicsExplained)

Just spent an hour watching, great stuff on both channels

------
runnr_az
Really interesting... love it when talented people apply their considerable
skills to something ridiculous.

~~~
segfaultbuserr
It's one definition of hacking.

------
womitt
Bunnyhop was my favourite glitch.

The phoon too much for zblock bunnyhop fragmovie video [0] still makes me
laugh even like 10 years later

[0]
[https://www.youtube.com/watch?v=SNvDUO42Hys&t=370s](https://www.youtube.com/watch?v=SNvDUO42Hys&t=370s)

------
xiaodai
one of the best nerd food of all time. reminds of this keynote on how to get
the best pokemon and cheat in pokemon blue!

[https://www.youtube.com/watch?v=RNsEsZbXE-4](https://www.youtube.com/watch?v=RNsEsZbXE-4)

------
carolipirjapa
Here's a video of moving arbitrary code from Pokemon Red to SML2 on original
GameBoy.

[https://youtu.be/SL_Zuc0tlvo](https://youtu.be/SL_Zuc0tlvo)

------
lnyan
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.

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

~~~
toastal
Summoning Salt & Bismuth do great videos about speed running

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

------
gfaure
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](https://www.youtube.com/watch?v=xVxSAi4sueQ)

~~~
sparky_z
You appear to be mistaken. The video we're discussing is by someone called
"Bismuth", but you've linked to a completely different person called
"Bisqwit".

~~~
NobodyNada
Bisqwit has some videos that are definitely worth checking out as well. I
really enjoyed his NES memory visualizations:
[https://youtube.com/watch?v=hqDGWfZhitc](https://youtube.com/watch?v=hqDGWfZhitc)

