Super Mario Bros.

From SDA Knowledge Base

Revision as of 10:58, 22 February 2015 by Blubbler (Talk | contribs)

Jump to: navigation, search
SDAlogo runner.png This game has a run page on SDA!

DISCLAIMER: This page is referring to the NES/Famicom original release, not any of the remakes.
However many techniques still work in the same or a similiar way in the releases. Almost everything works exactly the same in the sequel SMB2j (aka Lost Levels).

General Game Mechanics

The "21 frame rule"

Every time you enter a new level, the game delays for a varying amount of time. The delay is actually calculated so that the level frame count gets rounded up to the next 21 frame boundary.

As an example, this means that if you complete a level in
• 1 frame, the level length will be N+21 frames
• 15 frames, the level length will be N+21 frames
• 20 frames, the level length will be N+21 frames
• 21 frames, the level length will be N+21 frames
• 22 frames, the level length will be N+42 frames
• 30 frames, the level length will be N+42 frames
• 42 frames, the level length will be N+42 frames
• 43 frames, the level length will be N+63 frames
And so on, where N is a constant minimum length of the black screen.
Therefore, the only part of the game that can be improved by a time less than 21 frames (=a frame rule) is the last level.

Flagpole jump

If you hit a flagpole at the highest possible position, Mario will enter the castle about 11 frames faster. In most levels this saves a frame rule.

Avoiding fireworks

The fireworks are set off when a level is completed with the last digit of the timer at 1, 3, or 6.
Getting them wastes time, so you should slow down instead of hitting a time that yields them.

Hitboxes

The visual appearance of an enemy does not perfectly show which part of it is actually lethal.
It is possible to stand on the edge of a pipe even when a plant has risen out of it. There are a few pixels of room on both sides of the pipe that you can land on and immediately jump off again.

Known pseudorandom enemy patterns

The random number generation in this game is purely frame-based. If you reach an enemy at the same frame from reset, it will behave the same. Due to the 21 frame rule (which also applies to the title screen), it is possible to know what frame rule you are on.
This can be used in 8-3 to safely avoid the Hammer Bros.

Jumping through hammers

How it's done: The game does a very poor job of detecting collisions with hammers, so sometimes you can go through a hammer without getting hit, and sometimes you can completely miss a hammer and still get hit.
Bowser will start throwing hammers beginning from 6-4. Even if it looks like there's no gap in the stream of hammers, it's still likely that you'll be able to get through without taking a hit.

"Stomping" enemies from below

You don't need to hit the top of an enemy to kill it. As long as you're moving downward as you hit the enemy, you'll kill it.

Useful Glitches

Alternate pipe glitches

The alternate pipe glitch occurs when a pipe takes you somewhere other than its intended destination.
Theory: The game can have only one "entry point" (a pipe or vine) per screen. The reason lies in how the game is designed: There is just one global variable in the game RAM that determines where pipes or vines in the current screen lead. Once the screen scrolls far enough for the next target label to be loaded from the level data, all entry points in the current screen will lead to that destination instead.

• If Mario is far on the right side of the screen, the entry point variable will be out of date, so a new entry point will lead to the target of the previous one (Example: In 4-2 of SMB1, if Mario is far enough on the right side of the screen, he can use the pipe to go to the warp room since the destination info of the vine is still valid. Making the vine appear is not required for this glitch. The only thing needed is that the screen hasn't scrolled too far when the pipe is entered.)
• If the screen is ahead of Mario (Mario is on the left side of screen), the variable will have updated too soon, so you can access a future entry point's target from an earlier entry point. (Example: In 8-4 of SMB1, in the area before the water area, instead of going in the pipe after the lava pit, go a little past the previous pipe, and then turn around and go in that pipe, and it will take you to the water area instead of taking you back to the beginning of the level.)

Methods of getting Mario to the left side of the screen

• Just move back.

Methods of getting Mario to the right side of the screen
• If you enter a wall, the wall will automatically transport Mario towards the right edge of the screen without scrolling.
• If Mario bumps into the left edge of an obstacle (wall, pipe, coin block etc.) while jumping, the screen scrolling will momentarily stop even if Mario continues to move to the right. Since Mario accelerates faster in the direction he isn't facing, you should use this trick while jumping backwards (with Mario facing left).

Walljump

A walljump is when you jump towards a wall and somehow Mario's foot catches the wall and allows to jump again, boosting from the wall.
Walljumps happen because the game does a floor check (a simple "is there a solid block below him?" test) even during a wall-ejection. Wall-ejection is SMB's mechanism for pushing Mario out of a wall he has partially entered. Mario is ejected in the direction opposite to which you are holding.

To perform a walljump, you need two things:
• Some horizontal speed
• Mario's feet must hit the wall exactly at a block boundary (every 16 pixels)

It's possible to perform walljump off any non-lethal solid material (bricks, pipes, etc.) and most notably in the second room of 8-4 to enter the next pipe quickly.

Flagpole glitch using an enemy

Koopa Troopas and Bullet Bills can be useful for flagpole glitching. When Mario enters the block at the flagpole at the proper height, the walk to the castle will be skipped. Landing on shells results in a higher bounce than on Bullet Bills, so in order to use shells for this version of the flagpole glitch, you need to be inside the block at the flagpole already at the moment you bounce off.

With a lucky Bullet Bill spawn this trick is possible in 8-2.

Going through walls as big Mario

When Mario is big, he can simply perform a duck-jump into the corner and start walking. This is because his head will be well inside the ceiling, enabling the ejection to the right. (If he ducks again before he is fully inside the wall, he'll be ejected to the left instead.)

Doing this at the end of 1-2 lets you reach the "Minus World".

Jump in mid-air

If you grab a mushroom in mid-air, you can jump again. To do this let go of A before you touch the mushroom and then hold A until the transformation is over.

The Minus World

This is a well-known glitch which occurs when Mario glitches behind the wall in 1-2 in SMB1 and enters the first pipe.
The minus world is basically just a random location of the game ROM, it is not a real world. It wasn't designed that way ― it's just an oversight of the programmers that you can get into the pipe before the correct warp labels are assigned.

In the NES version of Super Mario Bros., the "minus world" was a looping, uncompleteable copy of world 2-2. In the FDS version, however, it is an underwater 1-3, 2-3, and an underground 4-4, making it completable.
Completing the game this way would give the "in another castle" message, but would return to the title screen as if 8-4 had been beaten; hard mode and the level selection become accessible, as well.

Off-screen wall climbing

This trick is trivial to perform. When there is a hole on the left side of the screen, you can cram Mario in between the screen edge and the wall and climb up. Mario will be unable to fall down. It can be used to reach the ceiling of the dungeon in places where there normally is no way to do that.

By jumping repeatedly and steering to the left, the trick can also be used for entering the wall.

Application: In 5-2 of SMB2j enter the pipe before the vine using this glitch and hold down. Mario will enter the pipe in reverse direction and appear in the warp zone to world 8.

Tricks considered too difficult but theoretically possible

Backwards jump acceleration

When you need to accelerate from zero speed, you can do it faster if you jump a small jump backwards and steer to the opposite direction Mario is facing. This can be used to start a level faster, to accelerate faster after exiting a pipe and to complete a walljump faster.

Press "left" for 1 frame. Press the "A"-button for 3 frames to do a small hop to the right. This will leave you about two pixels farther than a normal start. (TODO: This method may be suboptimal.)

Flagpole glitch

Complete the level without lowering the flag by glitching into the base block of the flagpole and touching the flapole from inside. Doing so is faster than lowering the flag.

Going through walls as small Mario

Jump into a solid object below a floor

For the purpose of activating this glitch, any solid object (including pipes) counts as a floor. It is really difficult to perform (much harder than the walljump), but here are the instructions.

1. You need the right speed. If the object is only 2 blocks tall, such as the pipe in the end of 1-2, you can not jump into it while running. Deaccelerate before jumping. If you have too high speed, you'll just find yourself standing on top of the object instead of inside it.
2. You need the right position. The right position is: as near as possible. You are too near, if when you jump toward the object, you'll bump into it without getting ejected pixel by pixel.
3. Immediately when the wall starts ejecting Mario, start steering away from it. This causes the wall to pull you in instead of push you out.
4. Immediately after your vertical movement stops, start moving to the direction you want to go. If the wall is ejecting you now, you failed some of the previous steps.

The easiest way to perform this trick is into 2-block tall obstacles at walking speed.
1. Do a minimal height jump (hold A for 1 frame) at the exactly right distance.
◦ You're too close if you bump into the wall without a chance to counter the ejection.
◦ You held A for more than 1 frame (or your jumping platform was less than 2 blocks from the floor) if you land on top of the floor.
2. As the wall-eject is about to start, hold the opposite direction from the obstacle.
3. Once Mario lands in the wall, start walking normally.
◦ If the wall just ejects Mario, you were too far from the wall when you jumped.

Jump into a wall just below a solid ceiling and walk through it

To perform the trick, do a walljump at a position right below the ceiling. When you get foothold, jump immediately. When you land, jump again. When you land again, jump again. Each jump embeds you deeper into the wall. Usually three or four jumps are enough for passing through.

During each of the jumps, you need to steer heavily in the direction opposite to where you're traveling. Otherwise Mario gets ejected.

Note: Steering only has effect during a jump (i.e. when Mario is not standing or walking). If Mario is standing, the direction of ejection is determined by the location of his upper body in relation to the left edge of the wall. (If it's partially out from the wall, he'll be ejected to the left (unstoppable unless you jump). Otherwise, he'll be ejected to the right (stoppable, possible to speed up).


Jump into a solid wall and walk through it

It is possible to perform the wall-entry trick even without a ceiling. However, it requires extremely precise positioning and speed. This is the hardest of all of the tricks.

Instructions: You will need to have the right X-subpixel position for this to work. A subpixel is a position component which is not rendered onscreen. In this game a pixel is made up of 16 subpixels. Try jumping into a wall. You are either pushed out immediately without having entered the wall at all, or otherwise you might have been able to partially enter the wall. The latter is what you want when adjusting your X-subpixels. You can press "left" for 1 frame while running to the right to decrease your subpixel value by one unit. Do this until jumping into a wall results in Mario being partially inside. When this condition has been met, you can follow these instructions:

1. Jump towards a wall from a position as close to it as possible (but not touching it) with the goal to be embedded in it as deep as possible on the first frame you enter it. The required minimum depth is 3 pixels.
2. When the wall starts ejecting you, immediately start steering away from it. This causes the wall to pull you in instead of pushing you out.
3. As soon as you land inside the wall, jump while moving away from the wall for 1 frame. You have to hit the block above you inside the wall. You may have to repeat doing this until you are so deep inside the wall that you will not be ejected out while you are walking forwards inside the wall.
◦ If you can't hit the solid block above when jumping, you will get ejected. You will need to try again from the start.
4. After you have entered the wall deep enough, start moving in the direction you want to go as soon as you land. If the wall is ejecting you now, you failed the previous steps.

any% strategy

See i_o_l's WR video for the general strategy. This only goes into detail on the non-obvious things going on.

World 1-1

When you go into the underground section, start holding "right" when Mario has fallen about half the way down and jump as soon as you're able, trying to land on the very edge of the bricks in the middle. The farther to the left you land, the sooner you start accelerating to full speed. When the pipe transition happens, you should have 380 on the timer.

Later just hit the flagpole at the very top. If you have 370 remaining on the timer, the level is flawless.

World 1-2 (Warp to 4-1)

The first difficult part here is jumping over the Koopa with the Goomba directly behind it. The best way to do it is to run at full speed and do a jump where you hold A for 1 to 3 frames and then immediately jump again.

At the end of the level, when you go to the warp zone, you actually do not have to make tight turnaround. Unless you land on the very right edge of the rightmost pipe, you will not lose the framerule if you never slowed down elsewhere. The timer will show 346 on a perfect run.

World 4-1

This level is by far the easiest of the run. Jump at the top of the flagpole and you have a perfect time (340 remaining on the timer).

World 4-2 (Warp to 8-1)

In this level you need to do an alternate pipe glitch. To do this, you must scroll the screen farther to the right than usual so that both level exits are on the screen at once.

To scroll the screen, you must jump backwards into the corner of a block. If you just want to get the glitch, you can do as many backwards jumps as you like and will get the trick quite easily. For a good time you need to limit it to 3 backwards jumps. To save another framerule, that must be made 2 backwards jumps, but this almost requires perfection. A perfect run will show 354 or 355 remaining on the timer.

World 8-1

Even if you do not slow down at all in this level, you may lose a framerule. To get a perfect time in 8-1, you need to previously have altered the walking animation by hitting the star block around the middle of this level. (TODO: The precise mechanism needs to be figured out/explained.)

A perfect run will show 200 remaining on the timer.

World 8-2

A perfect run will end with a 342 on the timer, if you do not use the bullet bill glitch (343 is possible, but yields fireworks), and a high 337 or low 338, if you do use the bullet bill glitch.

A good bullet bill spawn can save up to 2 framerules by flagpole glitching using it.

World 8-3

In this level you need to slow down to prevent the fireworks. You should finish with 242 left.

If you know what framerule you're on, you can predict the pseudorandom enemy patterns. Otherwise you need to get lucky.

World 8-4

This is the only level where the framerule doesn't apply due to how the run is timed, so every frame matters.
Room 1
Just go right and enter the pipe. The piranha plant will mysteriously vanish when you touch it.
Room 2
This is the room with the walljump. When you run off the first pipe while holding B and right all the time, you only have 1 frame to make your next jump. If you briefly press left or just let go of right, you have more leeway at the expense of 1 or 2 frames lost.
The walljump is explained in detail above. You will save about 5 frames if you do the walljump facing left instead of right. Depending on how well you do the walljump, you can expect to lose between 1 to 7 frames if you were facing left.
Room 3
This room has another alternate pipe glitch, but it is much easier than the 4-2 one. It is surprisingly easy to lose lots of frames in this room. At the minimum expect to lose 2-5 frames.
Room 4
Hold A while you wait for Mario to get out of the pipe, this will give you a perfect start. It is easy to lose time on the pipe exit, but losing 0-2 frames is also possible.
Room 5
Hope Bowser doesn't kill your run due to pure randomness and hit the switch as far to the left as possible. To beat the World Record, you need to have 314 or 315 remaining on the timer. 315 is not neccessarily faster than 314. The World Record lost 16 frames in this level.

RTA WR and TAS comparison

RTA WR: 4:57.69 by i_o_l
"RTA rules" TAS: 4:54.28 by HappyLee (converted to RTA timing)
"left+right" TAS: 4:54.03 by HappyLee (converted to RTA timing, uses left+right)
"human theory" TAS: 4:57.07 by HappyLee (bullet bill glitch edited in)
It's important to note that RTA and TAS time the run differently. RTA timing starts when the timer appears in 1-1 and TAS timing starts on reset (197 frames difference). They both end on hitting the axe in 8-4.
Also TAS allows left+right, which is banned in RTA, but RTA allows waiting on the start screen for good RNG without time loss.

Comparison Table
All runs are compared level by level to the "RTA rules" TAS by the number of frames they are slower.

Level "human theory" TAS RTA WR best human level time
1-1 +21 +21 +21
1-2 +21 +21 +21
4-1 +21 +21 +21
4-2 +21 +42 +21
8-1 +21 +21 +21
8-2 +21 +21 +21
8-3 +21 +21 +21
8-4 +21 +37 +24/25
Overall +168 (4:57.07) +205 (4:57.69) +171/172 (4:57.12/4:57.14)


World 1-1
The "RTA rules" TAS saves 1 framerule by doing the flagpole glitch.
World 1-2
The "RTA rules" TAS saves 1 framerule by going through the wall and entering the warp pipe sooner.
World 4-1
The "RTA rules" TAS saves 1 framerule by doing the flagpole glitch.
World 4-2
The "RTA rules" TAS saves 2 framerule by doing a wallclip to get Mario ejected to the right side of the screen instead of doing backwards jumps against blocks. 1 framerule can be saved without a wallclip by doing 2 instead of 3 backwards jumps against blocks.
World 8-1
The "RTA rules" TAS saves 1 framerule by doing the flagpole glitch.
World 8-2
The "RTA rules" TAS saves 1 framerule in this level by using backwards jump acceleration at the beginning of the level.
World 8-3
The "RTA rules" TAS saves 1 framerule by doing the flagpole glitch.
World 8-4
The "RTA rules" TAS saves 37 frames:
21 frames come from backwards jump acceleration.
16 frames come from cleaner execution.

Links

SDA discussion thread
TAS resource page
All Top Times

Personal tools