Difference between revisions of "Super Mario Bros."

From SDA Knowledge Base

Jump to: navigation, search
m (Avoiding fireworks)
m (The Minus World)
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Sda run|http://speeddemosarchive.com/Mario1.html}}
+
{{Sda run|http://speeddemosarchive.com/Mario1.html}}{{contents}}
DISCLAIMER: This page is referring to the NES/Famicom original release, [[Super Mario Bros./Versions|not any of the remakes]].<br>
+
DISCLAIMER: This page is referring to the NTSC NES/Famicom original release, [[Super Mario Bros./Versions|not any of the remakes]].<br>
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).<br>
+
However many techniques still work in the same or a similiar way in the releases. Almost everything works exactly the same in the sequel [[Super Mario Bros.:The Lost Levels/Any% Strategy|SMB2j (aka Lost Levels)]].<br>
  
 
==General Game Mechanics==
 
==General Game Mechanics==
  
====The "21 frame rule"====
+
====General Movement Rules====
  
Every time you enter a new level, the game delays for a varying amount of time.  
+
• You accelerate faster in the direction you are not facing. So if you need to bump into a wall, do a backwards jump into it.<br>
The delay is actually calculated so that the current playing progress will be rounded up to the next 21 frame boundary. <br>
+
• Maximum walking speed is 3/5 of maximum running speed.<br>
 +
• If you fall under the maximum walking speed during a jump, you cannot go above it again until you touch the ground again.<br>
 +
• If you touch the ground while holding right and letting go off B, you will be immediately reduced to maximum walking speed. If you need to shoot just as you land, briefly let go off right.<br>
 +
• Shooting while running on the ground will not slow you down in the slightest, if you repress B quickly enough. If you let go off B for too long, you will be reduced to maximum walking speed.<br>
 +
• Acceleration in water is the same on the ground as in the water, but the maximum walking speed underwater is 2/3 of the maximum swimming speed.<br>
 +
• If you touch underwater ground while holding right, you will be immediately reduced to maximum walking speed. If you need to only briefly touch the ground, don't hold right and start holding right just after you press A to leave the ground again. Of course longer stays on the ground will reduce you to below maximum walking speed, so hold right in these cases to stay at maximum walking speed.<br>
 +
• You can let go off right while swimming or jumping.<br>
 +
• When you need to reverse direction and get below the platform, you are standing on, (for example when getting to the warp pipes in 4-2), you can reverse some of your speed by bumping into a wall and holding the opposite direction. If the gap between the platform, you want to fall off and the wall is less than 3 blocks, it's faster to do so than to just reverse at the edge of the platform.
 +
 
 +
====Framerules====
 +
 
 +
Every time you enter a new level, the game delays for a varying amount of time. The delay actually waits for a counter that loops every 21 frames (~0.35 seconds). <br>
 
<br>
 
<br>
 
As an example, this means that if you complete a level in <br>
 
As an example, this means that if you complete a level in <br>
• 1 frames, the level length will be N+21 frames <br>
+
• 1 frame, the level length will be N+21 frames <br>
 
• 15 frames, the level length will be N+21 frames <br>
 
• 15 frames, the level length will be N+21 frames <br>
 
• 20 frames, the level length will be N+21 frames <br>
 
• 20 frames, the level length will be N+21 frames <br>
Line 20: Line 31:
 
• 43 frames, the level length will be N+63 frames <br>
 
• 43 frames, the level length will be N+63 frames <br>
 
And so on, where N is a constant minimum length of the black screen. <br>
 
And so on, where N is a constant minimum length of the black screen. <br>
Therefore, the only part of the game that can be improved by a time less than 21 frames is the last level. <br>
+
<br>
 +
The only exception to this rule is the last level and certain events, during which the counter does not run, such as pauses, lag, transformations or entering pipes.<br>
  
 
====Flagpole jump====
 
====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 framerule.<br>
+
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.<br>
  
 
====Avoiding fireworks====
 
====Avoiding fireworks====
  
Fireworks come when a level is completed with the last digit of the timer at 1, 3, or 6.<br>
+
The fireworks are set off when a level is completed with the last digit of the timer at 1, 3, or 6.<br>
Getting fireworks wastes time, so you should slow down instead of hitting a timer at a time that yields fireworks. <br>
+
Getting them wastes time, so you should slow down instead of hitting a time that yields 3 or 6 fireworks. <br>
  
====Lip jumps====
+
====Despawning====
  
It is possible to stand on the edge of a pipe even where's a plant coming out of the pipe. There are a few pixels of room at both sides of the pipe. You can land on it, and jump immediately again. <br>
+
There can only be 5 "enemies" at once on the screen. The following count towards this total: living enemies, dead enemies as long as their sprite is still on the screen, all moving platforms, climbing vines<br>
 +
When there are already 5 enemies on the screen, further enemies will simply not appear. This can be to your advantage, but also to your disadvantage.
  
====Know pseudorandom enemy patterns====
+
Applications:<br>
The random number generation in this game is purely frame-based. If you reach an enemy at the same frame from reset, he 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.<br>
+
• In 4-2: Hit the vine block to despawn a piranha plant.<br>
This can be used in 8-3 to safely avoid the Hammer Bros.<br>
+
• In 5-3: Stomp (not shoot) either the Koopa or the Goomba before the 2 moving platforms, otherwise one of them will despawn.<br>
  
====Jumping through hammers====
+
====Hit Detection====
 +
[[File:Hitboxes.png|The visual appearance of an enemy does not perfectly show which part of it is actually lethal.]]<br>
 +
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. <br>
 +
<br>
 +
When a lot of hammers are on the screen, you can sometimes go through a hammer without getting hit, and sometimes a hammer can be invisible but still hit you. <br>
 +
<br>
 +
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. <br>
 +
<br>
 +
When entering a pipe with a piranha plant sticking out of it, jump into the middle and start holding down early, this will trigger the pipe transition and allow you to survive some encounters with the plant, which would normally kill you, if you did not hold down.
  
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. <br>
+
====Known pseudorandom enemy patterns====
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. <br>
+
  
===="Stomping" enemies from below====
+
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 you are on.<br>
 
+
This can be used in 8-3 to safely avoid the Hammer Bros.<br>
You don't need to land on the top of an enemy to kill it. As long as you're moving downward as you hit the enemy, you'll kill it. <br>
+
 
<br>
 
<br>
 +
 
==Useful Glitches==
 
==Useful Glitches==
  
====Alternate pipe glitches====
+
====Wrong Warp====
  
The alternate pipe glitch occurs when a pipe takes you to somewhere other than where it was intended to. <br>
+
The Wrong Warp glitch occurs when a pipe takes you somewhere other than its intended destination. <br>
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 place. <br>
+
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. <br>
 
<br>
 
<br>
 
• 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.) <br>
 
• 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.) <br>
Line 58: Line 78:
  
 
Methods of getting Mario to the left side of the screen<br>
 
Methods of getting Mario to the left side of the screen<br>
 
 
• Just move back. <br>
 
• Just move back. <br>
<br>
 
 
Methods of getting Mario to the right side of the screen<br>
 
Methods of getting Mario to the right side of the screen<br>
• Teleport to the right edge of the screen the vine glitch (explained below). <br>
 
 
• If you enter a wall, the wall will automatically transport Mario towards the right edge of the screen without scrolling. <br>
 
• If you enter a wall, the wall will automatically transport Mario towards the right edge of the screen without scrolling. <br>
• 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 into the direction he doesn't face to, you should use this trick while jumping backwards (Mario faces to the left). <br>
+
• 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). <br>
  
 
====Walljump====
 
====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.<br>
 
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.<br>
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 to push Mario out of a wall when he entered it partially. The game ejects Mario towards the opposite of his steering. <br>
+
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.<br>
 
<br>
 
<br>
 
To perform a walljump, you need two things: <br>
 
To perform a walljump, you need two things: <br>
• Some horizontal speed towards the wall <br>
+
• Some horizontal speed <br>
 
• Mario's feet must hit the wall exactly at a block boundary (every 16 pixels) <br>
 
• Mario's feet must hit the wall exactly at a block boundary (every 16 pixels) <br>
  
It's possible to perform walljump from any non-lethal solid material (bricks, pipes, etc.) and most notably in the second room of 8-4 to enter the next pipe quickly.<br>
+
Applications:<br>
 +
• Reach the pipe to the third room of 8-4 more quickly by walljumping off it saving about 0.7 seconds.<br>
 +
• only as Mario: Skip waiting for the elevator in 1-2 of SMB2j to reach the warp zone by walljumping off the big vertical pipe instead.<br>
 +
• only as Luigi: Skip hitting the invisible block and climbing up them just before the warp zone in 1-2 of SMB2j by walljumping off the wall instead.<br>
  
====Flagpole glitch using an enemy====
+
====Full flagpole glitch====
  
Koopa Troopas and Bullet Bills can be useful for flagpole glitching. When Mario enters the block at the flagpole with proper height, the "walking to the castle" sequence will be skipped. Landing on shells results in a higher bounce than 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.<br>
+
Enter the block below the flagpole and touch the flagpole from inside the block to skip lowering the flag and get ejected to the left side of the block, which then skips the routine of Mario walking to the castle and entering it.
With a lucky Bullet Bill spawn this trick is possible in 8-2.
+
 
 +
Enemies can be used for this glitch. Stomp a Bullet Bill just as it reaches the flagpole at maximum speed.
 +
 
 +
Applications:<br>
 +
With a lucky Bullet Bill spawn this trick is possible in 8-2 saving up to 0.7 seconds.<br>
 +
• Do this trick at the end of -1 in the Minus World to save several seconds.<br>
  
 
====Going through walls as big Mario====
 
====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.)<br>
+
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".<br>
+
 
 +
Applications in SMB1:<br>
 +
• In 1-2 this can be done to enter the wall at the end of the level and walk through it to get to the Minus World.<br>
 +
• In 4-4 this can be used to more quickly bypass the part of the maze, where you need to turn around normally saving 0.35 seconds.<br>
 +
• In -3 of the Minus World this can be done to skip having to turn around or break the ceiling.<br>
 +
<br>
 +
Applications in SMB2j:<br>
 +
''TODO''<br>
  
 
====Jump in mid-air====
 
====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.<br>
 
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.<br>
 +
 +
====Ducking while swimming====
 +
 +
Duck on the ground and start swimming, Mario will still look as usual, but his hitbox is as though he was small and he will be unable to shoot fireballs. The optimal way to start this is:<br>
 +
• accelerate to maximum speed<br>
 +
• let go off right and hold down (this will not slow you down)<br>
 +
• briefly touch the ground<br>
 +
• press A<br>
 +
• hold right until you are back to maximum speed<br>
 +
Repeat this each time you have to touch the ground.<br>
 +
To stop ducking and enable fireballs again simply let go off all directional buttons and touch the ground.<br>
 +
 +
====Ducking while falling====
 +
 +
Just hold down before sliding off a platform and Mario will have the small hitbox despite looking big.
  
 
====The Minus World====
 
====The Minus World====
Line 96: Line 143:
 
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. <br>
 
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. <br>
  
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. <br>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.<br>
+
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, 7-3, and an underground 4-4, making it completable. <br>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.<br>
  
 
====Off-screen wall climbing====
 
====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 of the screen edge and the wall, and climb upwards the hole. 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 route to the ceiling. <br>
+
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, it can also be used to enter the wall.<br>
+
 
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.<br>
+
By jumping repeatedly and steering to the left, the trick can also be used for entering the wall.
<br>
+
 
==Tricks considered too difficult but theoretically possible==
+
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.
 +
 
 +
==Advanced Techniques==
 +
 
 +
====Backwards jump acceleration====
  
====Accelerating faster====
+
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 and to accelerate faster after exiting a pipe.
  
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. <br>
+
Applications: <br>
Press "left" for 1 frame. Press the "A"-button for 3 frames to make a small jump to the right. This will leave you about two pixels farther than a normal start. (TODO: This method may be suboptimal.)<br>
+
• In the first room of 8-4 this can be used to save a tiny amount of time, which is only relevant for finishing the level with an ingame time of 316.<br>
In an any% run, this would only be useful in 8-4 due to the framerule.
+
• In the third room of 8-4 this can be used to save about 0.03 seconds.<br>
 +
In the fourth room of 8-4 in SMB2j this can be used to save about 0.1 seconds.<br>
  
====Flagpole glitch====
+
====Half 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.
+
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.<br>
 +
Extremely precise trick, which hasn't been done in realtime yet.
  
 
====Going through walls as small Mario====
 
====Going through walls as small Mario====
  
'''Jump into a solid object below a floor'''<br>
+
'''Jump into a solid object below a floor'''
  
For the purpose of this glitch, any solid object (including pipes) counts as a floor. <br>
+
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. <br>
+
It is really difficult to perform (much harder than the walljump), but here are the instructions.
  
1. You need proper 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. <br>
+
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. <br>
 
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.<br>  
 
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.<br>  
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. <br>
+
3. Immediately before the wall starts ejecting Mario, start steering away from it. This causes the wall to pull you in instead of push you out. <br>
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. <br>
+
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.  <br>
 
The easiest way to perform this trick is into 2-block tall obstacles at walking speed.  <br>
 
1. Do a minimal height jump (hold A for 1 frame) at the exactly right distance.<br>
 
1. Do a minimal height jump (hold A for 1 frame) at the exactly right distance.<br>
◦ You are too close, if you bump into the wall without a chance to counter the ejection. <br>
+
◦ You're too close if you bump into the wall without a chance to counter the ejection. <br>
◦ You held A for more than 1 frame (or your jumping platform was less than 2 block distance far from the floor), if you land on top of the floor.<br>
+
◦ 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.<br>
2. When the wall would start ejecting, hold to the opposite direction from the obstacle. <br>
+
2. As the wall-eject is about to start, hold the opposite direction from the obstacle. <br>
3. Once Mario lands into the wall, start walking normally.<br>
+
3. Once Mario lands in the wall, start walking normally.<br>
◦ If the wall just ejects Mario, you were too far from the wall when you jumped. <br>
+
◦ 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'''
+
Application: In 1-2 this can be done to enter the top of the pipe at the end of the level and walk through it to get to the Minus World as fast as possible.
  
To perform the trick, do a walljump into the wall position right below the ceiling. When you get foothold, jump immediately. When you land, jump again. When you land again, jump again. Usually three or four jumps are enough before you can walk through the wall. Each jump takes you deeper into the wall. <br>
 
  
During each of the jumps, you need to steer heavily to the opposite direction you're going to. Otherwise the wall will eject Mario. <br>
+
'''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.
  
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, speedable). <br>
+
During each of the jumps, you need to steer in the direction opposite to where you're traveling. Otherwise Mario gets ejected.
  
  
 
'''Jump into a solid wall and walk through it'''
 
'''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 efficient speed. This is the hardest of all of the tricks. <br>
+
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 a proper X-subpixel position value for this to work. A subpixel is a position component which is not rendered onscreen. In this game, 16 subpixels make up 1 pixel. Now when you jump into a wall (not doing this trick), you might be pushed out immediately without having entered the wall at all. At other times you might have been able to be inside the wall partially. This is the result that you want when optimizing your X-subpixel position. 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 will result in Mario being partially inside the wall. If this condition is met, you can follow these instructions. <br>
+
  
1. Jump towards a wall, approach its edge as closely as possible right before you enter it, and become embeded in it as deep as possible at the first frame you have entered it. The required minimum depth is 3 pixels. <br>
+
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, but there is no way to effectively influence the subpixel value besides holding left for a few frames while running and hoping for the best outcome.
2. Immediately when the wall starts ejecting you, start steering away from it. This causes the wall to pull you in instead of pushing you out. <br>
+
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.<br>
+
◦ If you can't hit the solid block above when jumping, you will be ejected out. You will need to try again from the start. <br>
+
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. <br>
+
<br>
+
==any% strategy==
+
See [https://www.youtube.com/watch?v=vqiEdTiT6s8 andrewg's WR video] for the general strategy. This only goes into detail on the non-obvious things going on.
+
  
====World 1-1====
+
1. Jump towards a wall from a position as close to it as possible (but not touching it).
When you go into the underground section, start holding right, when Mario has fallen about half the way down and try to touch the ground you jump to as far to the left as possible. The farther to the left you hit the ground, the sooner you start accelerating to full speed. When the pipe transition happens, you should have 380 on the timer.<br>
+
2. Before the wall starts ejecting you, immediately start steering away from it. This causes the wall to pull you in instead of pushing you out. <br>
Then just hit the flagpole at the top. If you have 370 remaining on the timer, the level is flawless.<br>
+
3. As soon as you land inside the wall, repeatedly jump while moving away from the wall.<br>
 +
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.
  
====World 1-2 (Warp to 4-1)====
+
Application: In 4-2 this can be done on the wall directly after the powerup at the start of the stage. The subpixel value you get by just holding right and B happens to work. The ejection from the wall can be used as an alternative way to get Mario to the right side of the screen to perform the Wrong Warp. However this is still a very hard trick and must also be done in a very optimized manner to match the time from the optimal backwards jumps method instead, so this is likely useless.
The first difficult part in this level is jumping over the Koopa with a 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.<br>
+
At the end of the level, when you go to the warp zone, you actually do not have to make tight turnaround. Unless you hit the pipe to the right on its very right side, you will not lose the framerule, if you do not otherwise slow down in this level. The timer will show 346 on a perfect run.<br>
+
  
====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).<br>
 
 
====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.<br>
 
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, it must be only 2 backwards jumps, but this almost requires perfection. A perfect run will show 354 or 355 remaining on the timer.<br>
 
 
====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 have previously altered the walking animation by hitting the star block in the middle of this level. (TODO: The precise mechanism needs to be figured out/explained.)<br>
 
A perfect run will show 200 remaining on the timer.<br>
 
 
====World 8-2====
 
A perfect run will show 342 remaining on the timer.<br>
 
If you have a lucky bullet bill spawn, you can save up to 2 framerules doing a flagpole glitch using it.<br>
 
 
====World 8-3====
 
In this level you need to slow down to avoid fireworks. You should finish with 242 remaining on the timer.<br>
 
If you know what framerule you are on, you can predict the pseudorandom enemy patterns. Otherwise you need to be lucky.<br>
 
 
====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.<br>
 
'''Room 1'''<br>
 
Just go right and enter the pipe. The piranha plant will mysteriously vanish, when you touch it.<br>
 
'''Room 2'''<br>
 
This is room with the walljump. When you go out of the pipe and hit the ground at full speed, you only have 1 frame to make your next jump. If you briefly press left, you have more leeway at the expense of 1 or 2 frames lost.<br>
 
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 do it backwards.<br>
 
'''Room 3'''<br>
 
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.<br>
 
'''Room 4'''<br>
 
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.<br>
 
'''Room 5'''<br>
 
Hope Bowser doesn't screw you over due to pure randomness and hit the switch as far to the left as possible. To beat the World Record or to get below 4:58, you need to have 314 or 315 remaining on the timer. 315 is not neccessarily faster than 314. The World Record lost 19 frames in this level. To get below 4:58, you may not lose more than 13 frames.<br>
 
<br>
 
==RTA WR and TAS comparison==
 
RTA WR: [https://www.youtube.com/watch?v=vqiEdTiT6s8 4:58.09 by andrewg]<br>
 
TAS: [http://tasvideos.org/1715M.html 4:54.03 by Happylee] (converted to RTA timing)<br>
 
human theory TAS: [http://dehacked.2y.net/microstorage.php/info/1873012636/SMB%20Perfect%20Console.fcm 4:57.77 by Happylee]<br>
 
RTA rules TAS: [http://dehacked.2y.net/microstorage.php/info/1472619153/rta-rules.fm2 4:55.61]<br>
 
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.<br>
 
Also TAS allows left+right, which is banned in RTA. But RTA allows waiting on the start screen for good RNG without time loss.<br>
 
'''World 1-1'''<br>
 
The TAS saves 1 framerule by doing the flagpole glitch.<br>
 
'''World 1-2'''<br>
 
The TAS saves 1 framerule by going through the wall and entering the warp pipe sooner. This may require left+right to do quickly enough (more testing needed).<br>
 
'''World 4-1'''<br>
 
The TAS saves 1 framerule by doing the flagpole glitch.<br>
 
'''World 4-2'''<br>
 
The TAS saves 1 framerule by using left+right to accelerate and change speed more quickly.<br>
 
'''World 8-1'''<br>
 
The TAS saves 1 framerule by doing the flagpole glitch.<br>
 
'''World 8-2'''<br>
 
The TAS saves 3 framerules in this level: 2 from the bullet bill glitch alone and an additional one from left+right acceleration<br>
 
'''World 8-3'''<br>
 
The TAS saves 1 framerule with left+right acceleration and thus avoiding the fireworks. This framerule can also be saved without left+right by doing the flagpole glitch.<br>
 
'''World 8-4'''<br>
 
The TAS saves 55 frames from better execution, left+right acceleration and left+right direction change. Off these 55 frames about 21 can only be saved with left+right.<br>
 
comparison to the human theory TAS: <br>
 
room 1: -7 frames<br>
 
room 2: -5 frames<br>
 
room 3: -16 frames<br>
 
room 4: -3 frames<br>
 
room 5: -5 frames<br>
 
<br>
 
 
==Links==
 
==Links==
 
[https://forum.speeddemosarchive.com/post/super_mario_bros.12.html SDA discussion thread]<br>
 
[https://forum.speeddemosarchive.com/post/super_mario_bros.12.html SDA discussion thread]<br>
 
[http://tasvideos.org/GameResources/NES/SuperMarioBros.html TAS resource page]<br>
 
[http://tasvideos.org/GameResources/NES/SuperMarioBros.html TAS resource page]<br>
[http://smb-leaderboards.wikia.com All Top Times]<br>
+
[http://speedrun.com/smb1 SMB1 Leaderboard]<br>
 +
[http://speedrun.com/smbtll SMB2j Leaderboard]<br>
  
 
[[Category:NES]]
 
[[Category:NES]]
 
[[Category:Virtual Console]]
 
[[Category:Virtual Console]]
 
[[Category:Games]]
 
[[Category:Games]]

Latest revision as of 04:46, 13 January 2016

SDAlogo runner.png This game has a run page on SDA!

DISCLAIMER: This page is referring to the NTSC 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

General Movement Rules

• You accelerate faster in the direction you are not facing. So if you need to bump into a wall, do a backwards jump into it.
• Maximum walking speed is 3/5 of maximum running speed.
• If you fall under the maximum walking speed during a jump, you cannot go above it again until you touch the ground again.
• If you touch the ground while holding right and letting go off B, you will be immediately reduced to maximum walking speed. If you need to shoot just as you land, briefly let go off right.
• Shooting while running on the ground will not slow you down in the slightest, if you repress B quickly enough. If you let go off B for too long, you will be reduced to maximum walking speed.
• Acceleration in water is the same on the ground as in the water, but the maximum walking speed underwater is 2/3 of the maximum swimming speed.
• If you touch underwater ground while holding right, you will be immediately reduced to maximum walking speed. If you need to only briefly touch the ground, don't hold right and start holding right just after you press A to leave the ground again. Of course longer stays on the ground will reduce you to below maximum walking speed, so hold right in these cases to stay at maximum walking speed.
• You can let go off right while swimming or jumping.
• When you need to reverse direction and get below the platform, you are standing on, (for example when getting to the warp pipes in 4-2), you can reverse some of your speed by bumping into a wall and holding the opposite direction. If the gap between the platform, you want to fall off and the wall is less than 3 blocks, it's faster to do so than to just reverse at the edge of the platform.

Framerules

Every time you enter a new level, the game delays for a varying amount of time. The delay actually waits for a counter that loops every 21 frames (~0.35 seconds).

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.

The only exception to this rule is the last level and certain events, during which the counter does not run, such as pauses, lag, transformations or entering pipes.

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 3 or 6 fireworks.

Despawning

There can only be 5 "enemies" at once on the screen. The following count towards this total: living enemies, dead enemies as long as their sprite is still on the screen, all moving platforms, climbing vines
When there are already 5 enemies on the screen, further enemies will simply not appear. This can be to your advantage, but also to your disadvantage.

Applications:
• In 4-2: Hit the vine block to despawn a piranha plant.
• In 5-3: Stomp (not shoot) either the Koopa or the Goomba before the 2 moving platforms, otherwise one of them will despawn.

Hit Detection

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.

When a lot of hammers are on the screen, you can sometimes go through a hammer without getting hit, and sometimes a hammer can be invisible but still hit you.

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.

When entering a pipe with a piranha plant sticking out of it, jump into the middle and start holding down early, this will trigger the pipe transition and allow you to survive some encounters with the plant, which would normally kill you, if you did not hold down.

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 you are on.
This can be used in 8-3 to safely avoid the Hammer Bros.

Useful Glitches

Wrong Warp

The Wrong Warp 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.

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)

Applications:
• Reach the pipe to the third room of 8-4 more quickly by walljumping off it saving about 0.7 seconds.
• only as Mario: Skip waiting for the elevator in 1-2 of SMB2j to reach the warp zone by walljumping off the big vertical pipe instead.
• only as Luigi: Skip hitting the invisible block and climbing up them just before the warp zone in 1-2 of SMB2j by walljumping off the wall instead.

Full flagpole glitch

Enter the block below the flagpole and touch the flagpole from inside the block to skip lowering the flag and get ejected to the left side of the block, which then skips the routine of Mario walking to the castle and entering it.

Enemies can be used for this glitch. Stomp a Bullet Bill just as it reaches the flagpole at maximum speed.

Applications:
• With a lucky Bullet Bill spawn this trick is possible in 8-2 saving up to 0.7 seconds.
• Do this trick at the end of -1 in the Minus World to save several seconds.

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

Applications in SMB1:
• In 1-2 this can be done to enter the wall at the end of the level and walk through it to get to the Minus World.
• In 4-4 this can be used to more quickly bypass the part of the maze, where you need to turn around normally saving 0.35 seconds.
• In -3 of the Minus World this can be done to skip having to turn around or break the ceiling.

Applications in SMB2j:
TODO

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.

Ducking while swimming

Duck on the ground and start swimming, Mario will still look as usual, but his hitbox is as though he was small and he will be unable to shoot fireballs. The optimal way to start this is:
• accelerate to maximum speed
• let go off right and hold down (this will not slow you down)
• briefly touch the ground
• press A
• hold right until you are back to maximum speed
Repeat this each time you have to touch the ground.
To stop ducking and enable fireballs again simply let go off all directional buttons and touch the ground.

Ducking while falling

Just hold down before sliding off a platform and Mario will have the small hitbox despite looking big.

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

Advanced Techniques

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 and to accelerate faster after exiting a pipe.

Applications:
• In the first room of 8-4 this can be used to save a tiny amount of time, which is only relevant for finishing the level with an ingame time of 316.
• In the third room of 8-4 this can be used to save about 0.03 seconds.
• In the fourth room of 8-4 in SMB2j this can be used to save about 0.1 seconds.

Half 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.
Extremely precise trick, which hasn't been done in realtime yet.

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

Application: In 1-2 this can be done to enter the top of the pipe at the end of the level and walk through it to get to the Minus World as fast as possible.


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 in the direction opposite to where you're traveling. Otherwise Mario gets ejected.


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, but there is no way to effectively influence the subpixel value besides holding left for a few frames while running and hoping for the best outcome.

1. Jump towards a wall from a position as close to it as possible (but not touching it). 2. Before 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, repeatedly jump while moving away from the wall.
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.

Application: In 4-2 this can be done on the wall directly after the powerup at the start of the stage. The subpixel value you get by just holding right and B happens to work. The ejection from the wall can be used as an alternative way to get Mario to the right side of the screen to perform the Wrong Warp. However this is still a very hard trick and must also be done in a very optimized manner to match the time from the optimal backwards jumps method instead, so this is likely useless.

Links

SDA discussion thread
TAS resource page
SMB1 Leaderboard
SMB2j Leaderboard

Personal tools