How to Defeat the "Judges" in 8-1
8 years ago
California, USA

Preface:

This post contains a LOT of details. If you're just looking to learn how to play 8-1 optimally without randomly losing time, then read the "TL;DR" section. However, the details afterwards will help you understand ¤why¤ the game works this way, and will certainly prove useful for anyone who wishes to perform further TAS research on this problem (such as finding a visual cue that tells you ahead of time whether the new frame-perfect jump is necessary and/or getting rid of it altogether).

TL;DR:

The number of frames from the beginning of the 8-1 title screen until you reach the Star Block is what matters. Normally, the length of the title screen would be constant, but when you use the Warp Zone from 4-2, the title screen length varies (because frame rules). This means your exact timing in 4-2 matters (though there's nothing in 4-2 that you can actually do about it, as we will see).

When you reach the end of 4-2, every 4th frame is bad. If you enter the warp pipe on frames "1", "2", or "3", then you will get "nice" judges who ¤always¤ give you the 8-1 frame rule. However, if you enter the pipe on frame "4", then you will get "mean" judges. These judges want to be impressed! In order to impress them, you need to begin your jump towards the Star Block on the first possible frame. And that's it! Anything else, such as enemy kills, Mario's running animation, Mario's sub-pixels, or how long you hold A while jumping towards the Star Block do not matter. As long as you perform the Star Jump on the first frame, you will always get the 8-1 frame rule (assuming you grab the flagpole high enough and don't slow down at all, of course). ;)

Visual cue for the first frame: http://imgur.com/a/S5ch2

(Mario has 3 different sprites for his running animation, so I made an image of each one, since his position can appear to be a bit different. Your exact visual cue may vary, depending on the platform you play on and other factors, but this should give you a good starting point.)

Flagpole:

First, some background on what happens after Mario grabs the flagpole at the end of each level (some of you will know most of this, but I have some new info as well). Step 1, the flag moves downward for 61-62 frames (62 frames = "bad" judges, so this is the key). Step 2, Mario dismounts and walks to the castle. If you grab the flagpole high enough, then Mario will be higher up when he dismounts, which causes him to accelerate faster to the castle (and the higher you grab, the more time you save). Thus, in order to get the optimal Castle Walk, it turns out you need to grab the pole at one of the highest 3 possible spots. In other words, you need to jump from the staircase during one of the last 3 possible frames (and hold A until you grab the pole to guarantee a max height jump).

However, optimizing the flag animation itself turns out to be the tricky part. The game keeps track of the Y position of the flag (measured from the top of the screen) via the variables we shall call "YPixel" (memory address 0x00D4) and "YSubPixel" (address 0X041C). For anyone who is not familiar with sub-pixels, each sub-pixel = 1/256th of a pixel (basically, the NES hardware does not have floating point numbers, so it has to simulate any fractions via integers). When the flag at the end of the level loads, the game sets YPixel = 48, but it doesn't bother initializing YSubPixel. (The game only sets YSubPixel = 0 at the beginning of each level and when Mario uses a pipe.) Under some circumstances, we will still have YSubPixel = 0, so for now let's assume that the flag starts at a height of exactly 48.0 pixels from the top of the screen.

When Mario touches the pole, the flag starts moving downward at a rate of 1 + 255/256 = 1.99609375 pixels/frame (note that this is exactly 1 sub-pixel less than 2 pixels/frame... please don't ask me why they would do something like this). Also, the game requires the flag to reach a position of at least 170.0 pixels before it stops moving. Thus, after 61 frames, the flag will reach a position of 48 + 61¤1.99609375 = 169.76171875 = 169 + 195/256, which is not far enough. As a result, the game will spend an extra frame moving it to the position 171 + 194/256. However, if we could somehow manipulate the game into setting YSubPixel = 61 before the flag starts moving, then after 61 frames it will reach a position of 169 + 195/256 + 61/256 = 169 + 256/256 = 170.0! (This YSubPixel value of 61 is no coincidence, since the flag moves for 61 frames in our ideal situation, and the flag "loses" exactly 1 sub-pixel per frame.) In other words, as long as YSubPixel ≥ 61 before we reach the flag, then it will reach a position of at least 170.0 after only 61 frames, thus saving a frame (and therefore, the frame rule).

Powerups:

When there's a "powerup" on screen (mushrooms, 1UPs, and stars are the ones that move... I haven't bothered checking fire flowers), the game has to keep track of 4 main things as it moves around: its X position, X speed, Y position, and Y speed. The X values don't seem to directly affect the flag (though they could be useful in future investigations), but the Y values are "YPixel" (address 0x00D4), "YSubPixel" (addr. 0x041C), "YSpeed" (0x00A5), and "YSubSpeed" (0x0439). In particular, notice that YPixel and YSubPixel use the same memory locations as the position of the flag! (Hence giving them the same names shouldn't cause any confusion.) After the powerup despawns, the values YPixel and YSubPixel stop changing. So the basic idea is to hit the Star Block, then keep running to the right and hope that YSubPixel ≥ 61 when the star despawns. (And if you recall, the game does not bother initializing YSubPixel when we reach the flag, so this value will stay the same.) However, is it possible to guarantee a good YSubPixel value such as this? As it turns out, the answer is "yes", but it's a bit tricky...

Powerup Rules:

So you've heard of Frame Rules, those annoying 21 frame windows that govern almost everything in this game? Well now there's "Powerup Rules", which are equally annoying 4 frame windows that govern when powerups are allowed to start moving. When Mario hits a powerup block, the powerup can only start moving on the last frame of the current Powerup Rule. However, Powerup Rules reset at the beginning of each level. In particular, they start on the first frame of the title screen, which means the length of the title screen matters. If you reach 8-1 via 7-4, then the title screen will always be 141 frames long (from the first frame to the frame Mario's sprite disappears, inclusive). However, if you reach 8-1 via the 4-2 Warp Zone, then the screen goes blank "immediately" after Mario enters the Warp Pipe. This means frames rules have not been accounted for yet, so the title screen will be anywhere from 128 - 148 frames long. The exact length determines which Powerup Rule you'll be on when you reach the Star Block.

Actually, "which" Powerup Rule you're on is not what matters (e.g., if you lose exactly 4 frames, then the star will animate in exactly the same way, and you'll end up with the exact same YSubPixel value). However, what does matter is how these 4 frame windows line up with your Star Jump. When Mario reaches the Star Block, you have exactly a 6 frame window to start your jump towards it. Let's call these Frames #1-6. First, let's suppose that the title screen is of a length such that Frames #1-4 form one Powerup Rule, and Frames #5-6 fall in the next one. Then you'll get something like this:

|========|====| |.......144.......|..236..| |========|====| .........(4)............(2)...

The number below each rectangle shows the length of each range mentioned (Frames #1-4 and Frames #5-6), and the number inside each rectangle shows the YSubPixel value that you will obtain (after the star despawns) if you hit the Star Block during one of those frames. In this case, if we jump during Frames #1-4, then we will get YSubPixel = 144, whereas if we jump on Frames #5-6, then we will get YSubPixel = 236.

Next, if we have a title screen that is one frame longer, then it would basically gobble up one frame compared to the diagram above. In other words, Frames #1-3 would fall into one Powerup Rule, and Frames #4-6 would fall into the next, which would give us:

|======|======| |.....252....|.....236....| |======|======| .......(3)...........(3)......

Continuing this pattern, we would get Frames #1-2 and Frames #3-6, like this:

|====|========| |..216..|........64........| |====|========| ....(2)............(4)........

And lastly, we would get 3 different groupings, Frame #1, Frames #2-5, and Frame #6:

|====|========|====| |..240..|.........4.........|...16...| |====|========|====| ....(1)............(4)............(1)...

(Btw, don't ask me how to "predict" these final values for other situations. I can easily calculate the YSubPixel values as the star moves, but the frame during which the star despawns changes in weird ways...)

Notice that in the first 3 diagrams, all of the YSubPixel values are ≥ 61. This means that, for these 3 title screen lengths, we have the "nice" judges who let us jump towards the Star Block whenever we want!

However, in the last diagram, we see a very different story. If we jump on the very first frame, then we get a good YSubPixel value, and we still save time. But if we jump any later, then we get a very small value (either 4 or 16), which is not enough to save us a frame on the flag animation at the end of the level. (Stupid "mean" judges...)

So the upshot is that about 75% of the time you don't have to do anything special (aside from just hitting the Star Block), whereas the other 25% of the time your Star Jump has to be frame-perfect. But is there a visual cue to determine whether you are in the 25%? (Not yet. And maybe never? See below.)

Visual Cues:

Here's the visual cue for when the first "Star Jump" frame is: http://imgur.com/a/S5ch2

(Mario has 3 different sprites for his running animation, so I made an image of each one, since his position can appear to be a bit different. Your exact visual cue may vary, depending on the platform you play on and other factors, but this should give you a good starting point.)

Unfortunately, there currently is no visual cue for determining whether or not you have the mean judges ahead of time (which would be nice to know, so that you could skip the frame-perfect jump 75% of the time). If there were, it seems like it would have to depend on powerups in some way, since that seems like the only thing that Powerup Rules affect. But the star is the only powerup in 8-1 that we can activate without losing time... So yeah.

(Btw, 1UPs count as a "powerup" for the purposes of our discussion, even though colloquially I wouldn't really call it one. I only mention this because there's a hidden 1UP in 8-1, but unfortunately it's between two pipes that are too close to each other, so we can't activate it without slowing down.)

However, there is a visual cue to help you determine after the fact whether you jumped on the first frame or not. If you play the level "normally" (no fast acceleration at the beginning, no losing time before the Star Block), then the Star Block will disappear for a certain number of frames as Mario nears the ground, depending on when you jumped. If you jumped on Frame #1, then it will disappear for 3 frames (you will just see blue sky where the block should be); jumping on Frame #2 = it disappears for 2 frames; and jumping on Frame #3 = it disappears for 1 frame. (If you jump any later than that, then it won't disappear at all.)

(Note to self: Maybe you should add screenshots of these things?)

During my own practice, I tend to be off by only one frame if I miss the frame-perfect jump, so it's basically a matter of telling the difference between a 2 frame flash and a 3 frame flash. It's a little tricky, but with some experience you'll start to notice the difference, and you'll be shouting "Got it!" during runs in no time. ;)

Another interesting thing to note is that if you have the "mean" judges AND you jumped on the first frame, then you will actually see the star against blue sky on the 3rd frame of the block disappearing, rather than just the sky (which is what happens with the "nice" judges). This may make the 3 frame flash a bit more noticeable in the case of mean judges, but I haven't done much comparison yet.

(Note to self: Yeah... screenshots. And videos!)

Comparison Video:

Speaking of comparison, Kosmicd12 went and made an amazing comparison video as soon as I described the above details on darbian's stream. The video compares what happens when you have mean judges and perform the Star Jump on the first frame, versus jumping much later. Although he performed both runs of 8-1 on console, they are nearly identical. You won't notice any real difference (aside from the Star Jump) until the flagpole at the end.

At that point, watch Mario closely. If you pause the video when Mario is about half way down the pole, you may notice a small difference between the two videos. Although Mario's position is exactly the same in both videos (actually, the video on the right seems to be a few frames ahead, but just imagine that we corrected for this desync), you may notice that he seems to cover more of the flag in the video on the right (e.g., there are fewer white pixels between Mario's butt and the green pixels of... whatever that symbol actually is). What this means is that the flag on the right must be higher up on the screen! In particular, the flag on the right is exactly one pixel higher than the flag on the left (thus losing a frame on the flag lowering animation, which ultimately costs Mario a frame rule). Check it out:

(Note that if you pause the video too early during the flag's animation, then both videos will look exactly the same, aside from the aforementioned desync. The reason for this is that the flag on the right has not had enough time to fall behind by a pixel. Please see the "Flagpole" Section above for further details.)

Miscellaneous:

For Warpless, the 8-1 title screen will always be the same length (since we're coming from 7-4). Luckily, that length happens to give us nice judges, which is why some people may have noticed that they never seem to lose the 8-1 frame rule during Warpless. (It's also why I initially had some trouble investigating this issue, since most of my practice save states were designed for Warpless.) Indeed, if you do lose time on 8-1 during a Warpless run, then it will never be due to the flag animation at the end of the level (unless you either didn't hit the Star Block at all, or did something weird like fast acceleration).

Speaking of fast acceleration, this whole issue of "judges" and trying to save a frame on the flag animation is moot for anyone who wishes to try fast acceleration at the beginning of 8-1... All you need to do is save 1 frame, and if you do, then you don't even have to hit the Star Block at all. Kappa

A few interesting numbers: The star we activate starts at a height of YPixel = 120 (unless you hit it on the last frame of a Powerup Rule, in which case it immediately starts at a height of 119, since it's supposed to start moving on that frame). Also, before the star is completely out of the block, it moves directly up at a rate of one pixel every 4 frames (probably part of the reason for the "Powerup Rules"). Once the star reaches YPixel = 103, the star is officially free, and the game gives it a non-zero YSpeed so that it can start bouncing around. When it's rising/falling, it always seems to accelerate at a rate of 28 sub-pixels/frame^2 = 0.109375 pixels/frame^2, with a max speed of +/- 3(.X?) pixels/frame. (Sometimes it maxes out at a speed of 3.0, but other times the sub-speed keeps changing. And if it reaches something like 3.9 pixels/frame, then on the next frame it will loop back around towards 3.1 pixels/frame.)

編集者 投稿者 8 years ago
AntimonySM51, yelir64 そして 30 その他 これを好き
California, USA

Thanks, PackSciences! :)

I just added Kosmicd12's comparison video... I almost forgot, after all the explanations and editing. :P

California, USA

Bump for recent edits.

Most are rather minor changes to improve flow/clarity, though under "Comparison Video" I added an explanation of what the flag looks like when you get Bad Judges (i.e., what it looks like when the flag loses a pixel).

At some point, I may also add a few more screenshots for various visual cues (but no promises).

P.S. How has everyone been? I haven't been around Twitch much lately. I heard darbian got the ultimate time or something? :P

Also, I'm sure someone found a nice way around this frame-perfect Star Jump in 8-1 by now... Right? Kappa

編集者 投稿者 8 years ago
ゲームスタッツ
フォロワー
8,168
走行
9,323
プレイヤー
1,904
最新ニュース
Requirements for High-Level Any% Runs

Any% (NTSC) runs below 4:57.000 must now fulfill additional requirements in order to be verified.

  • The run's full session must be included in the submission description.
  • For emulator runs below 4:57.000, some form of input display must be visible for the duration of the run. A hand-cam or input
1 year ago
最新スレッド
投稿日 4 months ago
30 返信
投稿日 5 years ago
1 返信
投稿日 1 day ago
4 返信
投稿日 1 day ago
3 返信