- Game objectives
- "New" Tricks and Glitches
- Time Comparison
- Section by section comments
- Known/Potential Improvements
- Extended Comments - The Guts of the Game
- Memory Addresses
This is a further improvement on my previous Blaster Master submission, saving an additional 45.18 seconds through further optimization and a significant shortcut in Area 7. The total improvement over the currently published movie is 163.73 seconds.
- Emulator used: FCEUX 2.1.6-interim svn2724
- Aims for the fastest time
- Defeats all bosses, acquires all upgrades
- Manipulates luck
- Takes damage to save time
- Uses death as a shortcut
- Uses continues as a shortcut
- Actually uses the homing missiles
- Doesn't break the game in half over its knee, but still puts it in a headlock and gives it a loving noogie
Thanks to Twisted Eye for discovering/clarifying glitches and improving the route in Area 4. I was originally planning to do a run including the Area 4 skip, but when I was stuck at one point, I came back and tried his route and came to the conclusion that actually beating Area 4 would make a significantly more interesting run that is only slightly slower.
Thanks to Uranium Anchor for demonstrating that it is possible for Jason to enter dungeons during the time you retain control after falling to your death, leading to a significant improvement in the Area 7 shortcut.
Thanks to namflow for creating the most recent US run. I repeatedly referenced his run and compared times to make sure I wasn't missing obvious improvements or being too clever for my own good.
And a very special thank you to the FCEUX developers for the built-in TAS Editor. Being able to tweak individual frames of input and jump back and forth was incredibly helpful. I would never have made it the whole way through with just save states, rerecords and frame advance. As a sidenote, it seems that FCEUX 2.1.6 never got an official release and they instead moved to 2.2.0, so finding the exact version I was using may be a bit tricky. Hopefully that won't be a problem.
"New" Tricks and Glitches
Many of these were discovered quite a while ago, but they're still worth mentioning/explaining.
Jason Door Glitch
In platformer sections, if you turn around the frame you would go through a horizontal door as Jason, Jason undergoes his usual "walking through a door" animation but in the wrong direction. This results in him teleporting almost a screen away from the door, and offsets his visual and map position by one tile. I take minor advantage of this in Area 4 and Area 5 to save a few frames, and then use it for a major shortcut in Area 7.
Boss Death Glitch
There is a narrow window during a boss's death sequence during which you can die and the game will save that the boss is dead. When you respawn, you can just go pick up the upgrade in the boss room. This saves a lot of time using continues, since the two long death animations can be made to overlap.
Boss Door Glitch
When you enter the boss's room in a dungeon, an alarm sound plays, then the screen fades out and the boss fades in. This is so that the tile graphics from the level can be replaced with the graphics for the boss. Normally, if you leave before it fades out then the entire process is cancelled, and after the fade-out occurs the exit disappears as well. However, there's a one-frame window during which you can leave without interrupting the process. This leads you to a very glitchy version of the previous room, now with a glitchy boss. If the previous room has harmful terrain, this can facilitate the Boss Death Glitch mentioned above.
Mega Man-Style Pause Glitch
It has long been known that the bosses in areas 2, 4, 6 and 7 have a glitch wherein if the game is paused while an exploding grenade is damaging the boss, the boss will continue to take damage while the game is paused, trivializing those bossfights. However, I discovered that, like in Mega Man, boss invulnerability timers still tick down while the game is paused. By pausing and unpausing the game with proper timing, you can get a boss with a longer invulnerability timer to be damaged up to 5 times with a single grenade, and with only 10 frames of in-game time passing. The Area 1 boss has too short an invulnerability timer for it to save any time, and the area 3 and 5 bosses are too hard to hit (moves too much, hitbox too small). Thus I use it only against the first boss in Area 8 since the second Area 8 boss is trivial anyway.
In platformer sections, if you come very close to a wall as you jump or fall, the game considers you to have run into that wall even if you're actually travelling away from it. This resets your horizontal velocity to 0, which is often problematic, but can be useful when turning around in mid-air.
Like in many games, taking damage normally slows you down. In particular, when your tank takes damage you are instantly accelerated by a significant amount in the direction opposite your horizontal travel. This would usually slow you down, but is helpful when turning around in mid-air. If you are traveling very slowly to the right when you fall onto or jump into an enemy, it will result in you moving to the left at a moderate speed. Though this can't get you above your normal max speed, it still greatly decreases the time it takes to turn.
Offset Vertical Shooting
When you hold up for several frames, the tank's turret rotates upward and you can fire vertically. For the first few frames of holding up, you will still fire forward, but depending on how long you hold up the vertical shooting persists. This system is useful in normal play because your tank's special weapons are fired by holding down and pressing B; by holding up for a while, then quickly pressing down+B, you can fire your special weapons upward. This only actually matters for the dumbfire missiles.
However, under TAS conditions this has an additional application: The frame on which your tank's firing direction changes is sometimes different from the frame on which the firing position changes. In particular, it's possible for your tank to fire upward from further forward than a normal vertical shot. This allows you to shoot some overhead targets significantly earlier than you would otherwise be able to, allowing for lag reduction and faster "digging." Further analysis in the in-depth comments.
When using the hover mechanics, you can save fuel while flying horizontally if you press A only every other frame, given certain starting conditions. This allows me to get a lot of "mileage" out of my hover fuel in stages 7 and 8. Further explanation in the in-depth comments.
Prior to getting the dive mechanics, your tank moves, jumps and falls much more slowly underwater than in the air. Your falling speed is checked strictly, but for horizontal movement you can keep your old speed by just releasing right or left at the right time. Prior to getting the dive mechanics this is just a parlor trick, but once you have them the old restrictions apply for the first frame after you enter the water. Thus, by releasing left or right for a frame, you can save the time it would take to get back up to speed.
In the dungeons, water and lava won't kill you if you're invincible from having taken damage recently. Any time Jason spends over these terrains he behaves as though he is sliding on ice. On ice Jason's movement is a lot more "slippery," but his top speed is also 33% higher. So in addition to being able to take shortcuts by using invincibility to cross these terrains, it's actually faster to keep floating over deadly liquids for as long as possible. A bit more explanation in the in-depth comments.
Though you can only face/shoot 4 different directions, there are about 36 different spots you can throw a grenade to from your current position. This is because the A button, which throws grenades, doubles as a strafe button, and the position of your grenades are influenced by both your facing and the directions you're pressing. So, for example, throwing a grenade while facing right and pressing up and left will cause it to land slightly to the right of you and a bit further above you. This is helpful all over in the dungeons, especially a few of the boss fights.
The Ejection Seat
Jason can jump on the frame immediately after exiting the tank, launching him even higher than his jump would normally take him. I'm pretty sure this is only useful for killing yourself faster, since it's still not as high as your tank can jump.
This compares the times of this submission to my last. To see the comparison between the previous submission and the currently published run, view its submission page.
|Section||Old End||Old Length||New End||New Length||Saved/Lost||Cumulative|
|Area 1 - Side||4051||3434||3957||3340||94||94|
|Area 1 - Over||6304||2253||6205||2248||5||99|
|Area 1 - Boss||7564||1260||7462||1257||3||102|
|Area 1 to 2||10071||2507||9952||2490||17||119|
|Area 2 - Side||16900||6829||16630||6678||151||270|
|Area 2 - Over||19067||2167||18797||2167||0||270|
|Area 2 - Boss||20390||1323||20052||1255||68||338|
|Area 2 to 3||23526||3136||23158||3106||30||368|
|Area 3 - Side||32928||9402||32248||9090||312||680|
|Area 3 - Over||35044||2116||34368||2120||-4||676|
|Area 3 - Boss||36214||1170||35536||1168||2||678|
|Area 3 to 2||36971||141||36293||141||0||678|
|Area 2 to 1||38901||1930||38223||1930||0||678|
|Area 1 to 4||42891||3990||42179||3956||34||712|
|Area 4 - Side||46575||3684||45833||3654||30||742|
|Area 4 - Over||49084||2509||48344||2511||-2||740|
|Area 4 - Boss||50587||1503||49848||1504||-1||739|
|Area 4 to 5||54127||2702||53313||2627||75||814|
|Area 5 - Side||58358||4231||57508||4195||36||850|
|Area 5 - Over||60296||1938||59445||1937||1||851|
|Area 5 - Boss||61399||1103||60532||1087||16||867|
|Area 5 to 6||62743||814||61876||814||0||867|
|Area 6 - Side||70742||7999||69875||7999||0||867|
|Area 6 - Over||73130||2388||72263||2388||0||867|
|Area 6 - Boss||74352||1222||73485||1222||0||867|
|Area 6 to 5||76385||2033||75518||2033||0||867|
|Area 5 to 4||77158||773||76290||772||1||868|
|Area 4 to 1||78655||1497||77784||1494||3||871|
|Area 1 to 2 (b)||81959||3304||80984||3200||104||975|
|Area 2 to 7||86257||4298||85305||4321||-23||952|
|Area 7 - Side||94843||8586||92120||6815||1771||2723|
|Area 7 - Over||96388||1545||93976||1856||-311||2412|
|Area 7 - Boss||98093||1705||95369||1393||312||2724|
|Area 7 to 2||98754||141||96030||141||0||2724|
|Area 2 to 3 (b)||101582||2828||98860||2830||-2||2722|
|Area 3 to 8||104182||2600||101460||2600||0||2722|
|Area 8 - Side||109495||5313||106774||5314||-1||2721|
|Area 8 - Over||109942||447||107218||444||3||2724|
|Area 8 - Boss 1||111213||1271||108502||1284||-13||2711|
|Area 8 - Boss 2||112713||1500||110002||1500||0||2711|
Section by section comments
Again, these comments compare this submission to my last. To compare the my previous submission to the published run, see its submission page.
More optimized movement and better lag reduction are the source of a lot of improvements in side-scrolling areas. Overhead areas were already pretty well-optimized, though I gain or lose a few frames here and there due to mystery lag or to coming in with a different RNG state or frame counters. In several cases, I adjust the RNG state at the beginning of dungeons by immediately throwing a grenade, since grenades call the RNG repeatedly while exploding.
Area 1 - Platformer
Here in particular, I reduce lag quite a bit by manipulating luck so that fewer enemies drop items. I also take a slightly different route through the third room due to a different RNG state.
Area 2 - Dungeon and Boss
This time I take more damage during the dungeon and then don't leave the boss room. Dying on a projectile and not having to re-enter the boss room after dying saves about a second.
Area 3 - Platformer
Enemies disappeared or failed to spawn in a few convenient places this time around, reducing lag quite a bit. I wish I could take credit for it, but I really have no idea what happened. Something I can take a bit of credit for, at least, is manipulating so many of those fliers to immediately fly or get scrolled off the top or bottom of the screen.
Area 3 to Area 4
After the continue, the frame counters and RNG state are reset, so this is copied from the previous run verbatim up until about halfway through the first room of the game. Better hover technique on the way up to Area 4 saves about half a second. I tried making some changes earlier to better optimize movement and save time that way, but that put the RNG in a much less favorable state for the drop manipulation.
Area 4 to Area 5
A faster way to suicide ends up saving over a second here.
Area 5 - Platformer
I tried various amounts of door glitching on the way through Area 5, with the best result coming from door glitching in the final room only.
Area 5 - Boss
Though it saves 16 frames over the previous run (entirely due to reduced lag during the boss death sequence), this boss fight is both more boring and sloppier looking than my previous one. I'm not too happy with it, but it's the best I came up with. At least the fact that the boss randomly decided to sit still the entire fight is kind of amusing?
To Area 6 and Back
After the continue, the stars aligned such that I could actually copy/paste a 14456-frame swath without mystery lag making anything desync. Fascinating! As soon as I get back to Area 5, though, something makes the lightning go a different direction and I actually go back to making changes, though not particularly significant ones.
To Area 7
The new shortcut in 7 means that I don't need anywhere near as much hover fuel while I'm there, letting me save about 100 frames picking up less of it. I only pick up 2 Hs on the way rather than the equivalent of 6, so I lose a few frames here and there saving a bit of fuel to make sure I can take all the shortcuts I want to...
Area 7 - Platformer
...but as it turns out, just before I get to the point where I wanted to make sure I had at least 13 units of fuel left, a ceiling turret drops an H. As it turns out, the tweaks I had made to save 10 fuel or so also put the RNG and frame counters in a good state to save a bunch of time earlier in Area 7, but I'm almost positive there'd be a way to save more time and still have things turn out favorably when I get here.
The big change in this version of the run comes in toward the end of Area 7. Repeated door glitching, followed by abusing the screen boundary to make the game desperately try to load the surrounding terrain, allows me to fall through the floor and reach the dungeon much earlier. My original plan involved safely reaching the gap above the ceiling in the final room, then abusing screen boundaries some more to fall through the roof and reach the dungeon entrance without dying, but UraniumAnchor showed it was possible to more quickly reach the dungeon with a fatal fall. This version of the route saves about 160 frames over my version, which saves about 1600 frames over the old version.
Area 7 to End
Again, the continue allows me to copy and paste a good section of the previous submission, though this time some mystery lag means I need to make some minor tweaks, and the fight with Underworld Lord had to be completely redone... though I still spend most of that fight spinning.
It's obvious there are a good number of minor improvements possible; I'm sure fuel management and movement heading to Area 7 could be improved, but since the real issue is RNG and frame counter manipulation, it would require a lot of work leading to not much gain. There are similar issues involved in trying to reduce lag from boss death sequences and trying to clean up the Area 5 boss fight. As of right now, however, there aren't any obvious large improvements... hopefully? Perhaps Twisted Eye or Uranium Anchor will prove me wrong, but for the moment this is all I have.
Extended Comments - The Guts of the Game
This is where I get into all the cool number-crunching and stuff that you're probably not interested in unless you're into how old games are programmed or are planning to run Blaster Master at some point. This is also basically all copied and pasted from my previous submission, so if you already read them there don't worry about reading it again.
Basic Tank Physics
Your tank has a maximum horizontal speed of 24 sp/f (subpixels/frame). When grounded, you accelerate at 2 sp/ff (subpixels/frame^2) when holding left or right, and you are decelerated at a rate of 1 sp/ff if holding neither. In the air, holding a direction accelerates you at 1 sp/ff, and your horizontal velocity does not change when you release both directions. You count as grounded on the frame you press A but not after it, despite your tank having a fairly lengthy jump startup.
When jumping, there's a 4-frame delay between pressing A and the jump starting, e.g. if you press A on frame 771, your velocity variable won't become nonzero until frame 776 rather than frame 772. During this time the jump can be interrupted by falling, walling, or damage. Once it kicks in, your vertical velocity is set to -66 sp/f. After this point, there is a further delay of 16 frames before the game will count you as having released A for the purposes of jump height. As long as you hold A (or this delay continues to apply) gravity applies as normal. Once the delay has ended and you have released A, if your vertical velocity is still negative it is reset to 0. The acceleration of gravity is 2 sp/ff, and terminal velocity is 64 sp/f. So, e.g. if you tap A for one frame on frame 771, your velocity will be -66 sp/f on frame 776, -36 sp/f on frame 791 assuming you haven't hit a ceiling in the interim, and 0 on frame 792.
Offset Vertical Shooting
The point at which the offset occurs is if you hold up for 8 frames, then release up and press B, or any equivalent. "Equivalent" referring to the fact that the "up"-ness of your gun goes up when holding U at the same rate as it goes down when not holding U, so pressing and releasing U for the same amount of time will return you to the same level of "up"-ness as before, assuming it does not reach its maximum or minimum in the interim. Notably, the offset vertical shot is only possible when not pressing U, i.e. when your "up"-ness drops from 8 to 7 rather than vice-versa.
Once you have the capability, pressing A in midair will activate the hover mechanics, but not use any fuel or provide any acceleration. After the mechanics have been activated, pressing or holding A will consume 1 fuel/frame and accelerate the tank upward at a frame of 1 sp/ff, to a "maximum" upward velocity of -16 sp/f.
If you activate the hover mechanics before the minimum jump height applies, you can be traveling upward more quickly than 16 sp/f. In this case, the "acceleration" will actually reset your velocity to -16 sp/frame when the maximum is checked. If you activate the hover mechanics after the minimum jump height has ended, your velocity will necessarily reset to 0 because you must release A before you can press it again to activate the hover mechanics, and in fact will reach 2 on the next frame because the mechanics take 1 frame to activate. By tapping A to jump, then pressing and holding A exactly 20 frames after that (e.g. 42027 and 42047), your velocity will actually be -34 for one frame before being reset to -16. This is because your hover mechanics have not yet activated, but you are holding A, so normal acceleration of gravity applies rather than either being reset to 0 or capped at -16.
If you are hovering, the 16-frame delay from jumping has expired (or never applied to begin with, i.e. you drove off a cliff rather than jumping), you release A, and your velocity is negative, then your velocity will be reset to 0 just like when jumping. If your velocity was 0 or positive, normal acceleration of gravity will apply.
- Application 1
When attempting to reach a vertical destination, there are three potential techniques to get ideal ratios of either height/frame or height/fuel:
- Tap A, then press and hold A 20 frames later.
- Press and hold A until your vertical velocity reaches -16 sp/f, then release A for one frame before pressing and holding A again.
- Press and hold A until your vertical velocity reaches -2 sp/f, then release A for one frame before pressing and holding A again.
Assuming an arbitrarily high destination, the first gets the best height/frame ratio, the last gets the best height/fuel ratio, and the second is a good compromise. For further analysis:
- Assuming an arbitrarily high destination, after all three techniques have achieved a velocity of -16 subpixels per frame while hovering, the first technique is 115 subpixels higher than the second, which is in turn 54 subpixels higher than the third.
- Once all three techniques have reached or exceeded the height at which the third technique achieves a velocity of -16 subpixels per frame (1239 subpixels), the third technique has used 18 fuel, the second has used 22 fuel (and is 6 subpixels higher and 3 frames earlier), and the first has used 26 fuel (and is 9 subpixels higher and 10 frames earlier than the third technique at this point). Apologies if this doesn't make sense to you, if you're really interested PM me and I'll try to add some more detailed tables.
Given a sufficiently high destination such that all these restrictions apply, the second technique spends at least 3 more fuel to reach the destination at most 4 frames earlier, and the first technique spends at least 3 more fuel to reach the destination at most 8 frames earlier than the second technique, or at least 7 more fuel to reach the destination at most 11 frames earlier than the third technique.
One can further compromise between the second and third techniques by simply releasing and pressing A somewhere between those two times, allowing a more precise fuel/time tradeoff. However, the first technique must be activated at a specific time and thus more precise tradeoffs between the first and second technique are not possible.
- Application 2
When attempting to reach a horizontal destination, one can take advantage of a slight oversight in how gravity is applied. As mentioned, releasing A while hovering will reset your vertical velocity to 0 rather than applying gravity as normal. This means that releasing A while your vertical velocity is -1 will result in your velocity becoming 0 rather than 1. As such, when your velocity reaches -1, releasing A every other frame gets you near-horizontal (and actually slightly upward) travel with only half the fuel expenditure of actually holding A.
Prior to receiving the Dive Mechanics, your tank's maximum horizontal speed in the water is 8 sp/f, as well as your maximum vertical velocity. Jumping has a similar 4-frame startup delay, after which your vertical velocity becomes -46 sp/f (rather than -66 sp/f on land). Acceleration due to gravity is still 2 sp/ff, and the minimum number of frames until your velocity is reset to 0 is 6 rather than 16. This means that a high jump is about 2 tiles high rather than 4 like in air, and the minimum jump is about 1 tile rather than 3. Underwater, when touching ground or otherwise, your horizontal acceleration is only 1 sp/ff. When sinking your horizontal velocity remains constant when you release both directions, but when touching the ground you decelerate at 1 sp/ff until you reach 0. After receiving the Dive Mechanics, your maximum horizontal speed is 32 sp/f, strangely faster than your land speed, and your acceleration is 2 sp/ff. Your max vertical velocity is 24 sp/f while pressing up or down and your acceleration is 2 sp/ff. When pressing neither up nor down, your minimum velocity is -24 but your maximum is only 4, and your rate of vertical acceleration is 1 sp/ff. When not pressing left or right, you decelerate at a rate of approx. 0.25 sp/ff.
I'm not 100% sure here, but it seems like, while on ice, the game only actually reads your horizontal input once every 16 frames and otherwise keeps your velocity constant. Strangely, the "once every 16 frames" counter seems at least partially independent of lag. Some things actually manage to change when your left/right input actually matters, but I'm not sure what, since at least once in my run there's an area where it's reading ice input only on frames that are congruent to 3 mod 16, and then there are 8 frames of lag, and then it continues reading only on frames that are congruent to 3 mod 16, rather than 11 mod 16.
I haven't put as much effort into studying this since it comes up a lot less often, but I have at least a few useful tidbits pertaining to Wall.2.
- When driving off an edge, you can avoid driving down the wall by releasing left/right for the two frames before the process would visibly begin. It's easy to identify when it begins because during the animations where you drive onto or off of walls, the lines through your tires are actually parallel, when normally they're 45 degrees different.
- The above becomes even easier when you're trying to jump as late as possible without sticking, since the frame after you press A you can release left/right without losing speed in midair.
- In Area 8, when driving down a wall into some spikes, you can actually begin falling one frame earlier by pressing A on the correct frame rather than just taking damage from the spikes.
On land, platformer Jason moves similarly to platformer Sophia with a few exceptions. His maximum horizontal speed is 16 sp/f rather than 24. His jumps have no startup delay, and his vertical velocity is initially set to -46, after which acceleration due to gravity is applied whether A is being held or not.
While swimming, Jason's horizontal max speed is still 16 sp/f. His vertical velocity can range between -16 sp/f and 32 sp/f. His rate of horizontal and vertical acceleration while pressing a direction is 1 sp/ff. When not pressing left or right, he decelerates at approx. 0.5 sp/ff, and when not pressing up or down he accelerates at 1 sp/ff toward a target velocity of 16 sp/f.
In a dungeon, Jason's maximum speed is 24 sp/f in any direction, and acceleration and deceleration are instantaneous. When on ice, his maximum speed increases to 32 sp/f, but his acceleration is only 1 sp/ff and he does not decelerate if he releases the D-pad.
Grenades spend 10 frames in transit before exploding (e.g. if you press A on frame 60764, it will start damaging enemies on 60775), at which point their explosion remains and does damage for 9 frames (e.g. 60775-60783). The Area 1 boss's invulnerability timer is only 3 frames, so it can be hit 3 times with one grenade. Most bosses have an 8 frame invulnerability timer, so they can generally be hit twice with one well-timed grenade. However, this isn't important against the Area 2, 4, 6, or 7 bosses, and generally doesn't work out against the Area 5 boss because of its tiny weak point. Both Area 8 bosses have a 16-frame invulnerability timer.
As a final note, switching weapons as you go through doors (sometimes even "unnecessarily", like from one weapon to itself) can affect lag in the future, sometimes even reaching out through basically the entire rest of the video. It's usually just a couple of frames gained and lost here and there, but sometimes it seems to actually have a significant positive or negative effect at some point in the (fairly) near future. Manipulating this is theoretically possible, but seriously annoying.
A few other actions add or remove lag mysteriously; For example, I tried removing the "tank dancing" in Area 2 and found that taking it out added a few lag frames in the near future, and continued changing things positively and negatively for a good while after that. Seriously strange stuff.
- 0x0402 - X position (subpixels)
- 0x0403 - X position (tiles)
- 0x0404 - Y position (subpixels)
- 0x0405 - Y position (tiles)
- 0x0406 - X velocity (subpixels/frame)
- 0x0407 - Y velocity (subpixels/frame)
- 0x0013 - RNG
- 0x0092 - Hover fuel
Previously, I had some memory addresses listed for boss HP totals, but it seems that boss HP values use the same memory space as other enemies, and that seems to be dynamically allocated to some extent, so they won't reliably show up in the same addresses.
Merry Christmas, to anyone who cares! Running Blaster Master has been a great experience and I'm quite happy with how this run has turned out. For a screenshot, I'd recommend something like 6800, 52980 or 92000 to show what's newly broken in this version of the run.
Ilari: Uploading what I have...