Okay so about two weeks ago I thought it would
be fun to theorycraft the strongest and most
secure combination lock possible in Super
Mario Maker 2.
There never really was a point to this in
the first Mario Maker, since everyone was
able to download each course, and therefore
everyone was able to take a look at the combination,
but since nintendo sadly decided that editing
downloaded courses is no longer a thing in
Mario Maker 2, that also means that, at least
in theory it should be possible to upload
a combination lock stage that is so secure
that it becomes cryptographically impossible
to beat it.
So I sat down, and naively started to scribble
together a couple of different designs for
locks, not knowing what I just did.
So, over the last two weeks I spent way, way,
way too much time trying to come up with the
absolute perfect combination lock in Super
Mario Maker 2.
It honestly almost drove me insane.
So today we are going to take a look back
at this journey, we will not only succeed
in building a lock that is mathematically
impossible to beat, but we will also fail
miserably at trying to upload a truly impossible
stage.
So are you ready?
Let’s do this!
Alright, so before we hop into mario maker,
and try to theorycraft the perfect lock, we
first quickly have to talk about how combination
locks function in the first place.
So how do locks work?
The probably easiest way to think of the safety
of a combination lock is to assume that each
lock has a certain numerical safety.
That’s how many different combinations it
has.
Obviously.
The interesting thing here, is that this number
is defined by two things.
The base of the lock, and it’s length.
A standard bicycle lock for example often
contains of a set of 4 numbers between 0-9.
So each spot in this lock is one between 10
different number.
0-9.
We are going to call this number the base
of the lock.
The length of the lock is four in this case,
since we enter four times a number between
0-9.
This gives us 10 to the power of 4 different
inputs, or ten thousand in total.
So I know that all of this sounds super obvious,
so why are we talking about it in the first
place?
Well the reason we are talking about this,
is that one of the two factors that factor
into a locks strength is much much much more
important than the other one.
The length of a lock makes it way more secure,
than it’s base value.
We can easily see this if we add once 5 to
to the base of our bicycle lock, and once
5 to its length.
a lock that requires us to input 4 times a
correct number between 0-14 would be a lock
which strength is defined by 15 to the power
of 4.
Such a lock has about 50.000 different inputs.
A lock that requires us to input 9 times a
random number between 0-9 on the flip side
has one billion different inputs!
So if we truly want to theorycraft the absolutely
and totally most secure combination lock possible
in mario maker, then we have to prioritize
the length of the lock at all costs, while
it’s base is less important.
So here’s where Mario Maker comes into play.
In Super Mario Maker we are limited to 100
entities per sub world, which means that we
only have very limited resources to theorycraft
the perfect lock.
Back in probably 1992 we already took a look
at a design for a pretty secure combination
lock in Mario Maker.
This lock worked with a base of 10, and a
length of 12, giving us one trillion different
inputs.
So a lock with one trillion different inputs
is obviously a really secure lock, but it’s
nowhere near absolutely safe.
The way we made this lock work was the following.
Basically we stacked brave goombas on top
of each other, with a boo and a muncher on
top of them.
Whenever our heroic combination lock hacking
plumber, hits his head against a brick block,
one brave goomba bravely dies, and the lock
falls down one spot.
Only if all cells are set up in such a way
that the boo is at the correct spot, this
koopa is able to walk to the p-switch at the
left.
This lock has two major flaws, first, since
it uses a base of ten, we are only able to
give the lock a length of 12 before hitting
the entity limit, which is far from optimal.
And second, it is unbelievably easy to reverse
engineer the code, just by counting how many
brave goombas bravely died, before there's
no more brave goombas to cowardly kill.
We’ll talk a lot about the problems of making
a lock un-reverse-engineerable in a second,
but for now let’s focus on the base and
it’s length.
See, when building this lock, I made a really
stupid mistake.
I focused on building a lock in our lame standard
and boring dezimal numerical base 10 system,
while there is absolutely no reason to do
so in the mushroom kingdom.
There is no benefit to a lock base 10.
All it does is heavily limiting us with the
entity limit.
What we need is a much more creative way to
represent a lock.
Think about the lottery as an example.
A standard lotterie often wants us to guess
six correct numbers between 0 and 47.
That’s nothing else than trying to brute
force a combination lock base 48 with a length
of 6.
They just make the base really high, so that
it becomes counterintuitive how many different
options a lottery lock actually has.
For a perfect Mario Maker lock we should take
the exact opposite approach.
We should try to minimize how many different
entities we need per lock cell, and focus
on getting the lock as long as possible within
the 100 entity limit.
So the first idea I had, was just to build
a really long lock using binary numbers.
Binary means that each lock cell only has
exactly two inputs.
Either no question block didn’t get triggered,
or triggering the question block it was.
If we found a way to just combine 40 of such
cells into a single lock, then we would already
have more than one trillion different combinations,
while each additional cell would grow this
number exponentially.
Hooray!
So here’s the first prototype.
Each question block here represents a single
digit and has two states.
Triggered, and not triggered.
If we trigger a question block, the blaster
jumps upwards.
The blasters have two different height levels.
The idea here is that we only get a flat surface
at the top if all blasters are at the correct
spot.
If a blaster that needs to get triggered doesn't
get triggered, then there is a gap at the
top.
If a blaster that should not get triggered
gets triggered however then this blaster is
one spot too high.
Super simple stuff.
The way we read this is by using a snake block,
that slowly transports a cannon to an enemy
at the far left.
Only if the top is a straight line, and therefore
all inputs were entered correctly the cannon
reaches the enemy, crushes it, and rewards
us with a key in the process.
Hooray!
Sadly this design has several problems.
First we have to put the blasters onto global
ground, because otherwise they despawn while
we enter the combination.
Second we also have to put global ground at
the top, so that the cannon does not despawn
while the lock gets read.
Since icycles aren’t global ground anymore
(booooo!) we no longer have a global ground
option that does not count towards the enemy
limit, so we can only build this lock with
a length of a bit over 40.
That’s slightly better than our previous
design but still pretty meh.
Luckily, I lied to you when I said that there
are no more global ground options that do
not count towards the entity limit, because
there is still something in the game that
counts towards the block limit, while also
being global ground.
Something super weird.
Cloud blocks in the 3D world style.
Yup.
I know that is super weird, but normal cloud
blocks in 3D world act as global ground.
This means that if we built a lock like this
in 3D world, we do not have to use platforms
on tracks as global ground, which allows us
to save tons of spots in the entity limit.
Here’s what such a lock looks like.
This lock has a length of 64, at a base of
2.
This means that this super simple lock is
able to store about 18 quintillion numbers.
18 quintillions are a billion, billions.
That’s quite a secure lock that we got there.
Sadly it doesn’t really work for several
reasons.
First: The springs that we spawn to get the
blasters upwards unfortunately also land on
global ground, which means that we fill the
elb at some point during the input, and no
springs can’t spawn no more.
Second the snake block that we use to read
the state of the lock, sadly destroys all
the blasters that are set too high when reading
the lock, meaning it, well it uhm, just tells
us the exact combination.
Woops.
So we need to find a better way to input numbers,
as well as a better way to read the state
of the lock.
So the best and cheapest way to read the lock,
is just to have mario escort an enemy to the
other side, that’s not the problem.
The real problem is how to do the inputs in
such a way that we do not require global ground,
or any other additional entities.
And this ladies and gentleman, is where stuff
gets a bit insane.
So uhm, as it turns out, we can ignore global
ground entirely, if we use spawn blocking,
and an escort version to read the lock.
Check this out.
Here we input our code by breaking the brick
blocks at the bottom.
Each broken brick block means we entered a
1 into our lock, each unbroken brick block
represents a zero.
At the top we have red dotted line blocks.
And here’s the catch.
Those red dotted line blocks spawn block bullet
blasters.
Bullet blasters can’t spawn while there
is a red block occupying their homespace,
but as soon as a two state block gets flipped,
they suddenly can spawn.
The basic idea here is the same as before.
Each blaster has one of two heights, and only
the correct combination provides a flat surface
for an enemy to walk through.
A wrong input either makes the enemy fall
down, or blocks the path forward entirely.
This lock only requires a single enemy that
carries a key, and a single blaster per lock
cell, since we can put the on / off block
into a different sub world.
This lock can be built with a length of 99.
The only entity space that isn’t used for
a lock cell, is the enemy that carries the
key.
All other 99 entity spots are used for the
lock.
This gives us a base 2 length 99 lock.
That’s a lock that has 633 octillion different
states.
That’s 633 billion, billions, billions different
combinations.
That’s a lock that can’t get bruteforced
anymore.
So the length of this lock is pretty much
optimal.
The only possible improvement would be to
find a way to build a lock without normal
entity limit items, which sadly appears to
be impossible.
But … we aren’t done here yet.
Because while it isn’t possible to improve
the length of the lock anymore, it is actually
possible to improve it’s base value.
See, since we are now working with spawn blocking,
there is no reason for us to build this in
binary.
We can actually use many brick blocks per
cell as our way of inputting a number.
Since the lock needs to remain invisible for
mario while it gets read, the maximum height
of brick blocks is 8.
8 brick blocks give us a base of 9, since
0 is also an input option.
Here’s how this works.
There is only one way for the blaster to be
at exactly the correct height, and that is
when the correct amount of brick blocks got
destroyed before.
This blaster for example only spawns if 7
blocks got destroyed.
If a number smaller 7 is entered into the
lock then there is always a brick block remaining
that prevents the blaster from spawning.
If the number 8 is entered, then the blaster
drops down one tile too much, and the key
carrying spike top becomes entrapped in this
little gap for eternity.
Poor guy.
So this gives us a lock that requires us to
input 99 times a correct number between 0
and 8, and there is definitely only one correct
combination that actually rewards our plumber
with a key at the end.
So this lock is a base 9, length 99 lock.
This lock has 29 trigintillion different input
options.
That’s a number with 95 decimal digits.
Here’s is the exact number:
29512665430652752148753480226197736314359272517043832886063884637676943433478020332709411004889
It is completely impossible in a cryptographical
sense that someone guesses this number by
accident.
Let’s just quickly do a small thought experiment
so that all of you get a feeling of why I’m
so sure that this lock can’t get guessed.
Right now Mario Maker 2 sold about 4 million
copies.
Let’s say every single person that bought
mario maker up until now, decides to dedicate
their entire life from now on, trying to crack
the code.
Each person enters a thousand combinations
each day.
That would mean that 4 billion combinations
get entered daily into the lock.
To make this a bit simpler let’s assume
no one ever enters the same number.
So that’s 4 billion unique inputs per day,
and 1 trillion and 460 billion unique inputs
per year.
So if we divide the strength of the lock by
this number we should now how many years it
takes until each combination got entered once,
assuming 4 million people try it a thousand
times every day.
So the answer is it takes about 20 sexvigintillion
years.
That’s a number with 82 zeros.
That’s several billions of billions of billions
of years longer than the universe exists.
I’m absolutely truly one hundred percent
absolutely convinced that this lock can’t
get guessed.
So does that mean that we just theorycrafted
a stage that can never be beaten once uploaded?
Well, sadly no.
Because there are two problems.
First it is possible to get into the lock
via clever use of multiplayer, and once inside
the code can easily be read, and second, and
that’s honestly the much much bigger problem:
Modding tools allow it to view downloaded
stages, so that code can always be read by
someone who is modding mario maker.
I actually uploaded the stage to find out
if someone is able to reverse engineer the
code using
one of those tricks, and yup, after only a
couple of days online the stage already got
beaten by mario maker user Netgen and Linkgannon.
Also as a side note.
Entering the code into the lock is unbelievably
tedious, because, you know, sometimes you
want to break a brick block.
But you break two brick blocks, which means
you have to start all over again.
It took me almost four hours to get the whole
thing debugged, and the randomized code into
it, and I was really really happy once I finally
managed to upload the whole thing.
So why am I telling you this, well because
when I entered the name for the stage, the
switch keyboard glitched out and dropped an
O.
So the stage is now forever going to be the
Impossible Cmbination Lock, since there's
no way that I enter that code again.
O’s are overrated anyway.
Anyway, so here we have it.
Is it possible to build a truly impossible
level in Super Mario Maker using combination
locks?
Well sadly no, mainly because of modding,
but as it turns out it is possible to build
a cryptographically impossible lock that is
so secure that it definitely can’t be guessed
anymore.
Huge and enormous thanks to all the wonderful
people on twitter that took a look at the
first and second lock design, and helped me
debug the whole thing.
Seriously guys, you are amazing.
So here we have it, an impossible to guess
lock, that sadly can be cheated by modding.
And this is the end of the video.
*click* except, as it turns out, it actually
surprisingly isn’t.
So let me share a little story with you.
So a couple of weeks ago a us gamer journelist
hit me a quick mail, telling me that he is
thinking about writing a quick story about
passcode levels in super mario maker 2, and
whether I’d be willing to answer him a couple
of questions.
And I was like sure, why not!
And then I started to wonder.
What is actually the most secure combination
lock?
So I sat down and started to tinker around
with it, and this is what caused this whole
madness.
So it took our us gamer journalist a while
to get back to me, and once he replied I actually
was already half finished with the video.
So here’s where this gets interesting, because
the first question he asked me was something
along the lines, do you think veedracs passcode
level design is optimal, or do you think this
design can still be improved.
And I was like: “Which veedrac design again!?”
So, uhm, as it turns out, I wasn’t the only
one wasting way too much time of my life trying
to get a meaningless number as high as possible.
As it turns out the legendary Mario Maker
creator Veedrac was working on this as well.
And as it turns out, he found a way to build
a combination lock that is much much much
much more secure than the design we just theorycrafted.
So I’m not going to spoil how he did it,
because he made an amazing and really entertaining
video on how it works, that pretty much continues
at exactly the point where this video ends.
I honestly can’t recommend you wonderful
ladies and gentleman his video enough, it’s
a really fun quick watch, and, well, and his
combination lock, eats our combination lock
for breakfast.
The link is in the description!
So with that being said:
Thanks for watching this little video, I hope
you enjoyed it.
If you enjoyed it don’t forget to leave
me a thumbs up and maybe you feel especially
cmbination lock today and want to hit the
subscribe button as well.
I hope that all of you have a wonderful day,
and to see you soon.
Goodbye!
