TASVideos

Tool-assisted game movies
When human skills are just not enough

Submission #3776: BrotherMojo's NES Blaster Master "All Bosses" in 31:15.48

Console: Nintendo Entertainment System
Game name: Blaster Master
Game version: USA
ROM filename: Blaster Master (U).nes
Branch: All Bosses
Emulator: FCEUX 2.1.6
Movie length: 31:15.48
FrameCount: 112714
Re-record count: 39417
Author's real name: Gus Wellman
Author's nickname: BrotherMojo
Submitter: BrotherMojo
Submitted at: 2012-12-01 09:31:46
Text last edited at: 2012-12-09 21:36:27
Text last edited by: BrotherMojo
Download: Download (16591 bytes)
Status: decision: cancelled
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:

Last time we saw a Blaster Master run was the extremely buggy European version in '09, and the US version hadn't been TASed since 2005. Many bugs have been discovered since then, so it was past due for a new run.

This is an improvement of 118.55 seconds over the previous run by use of new routes, new glitches, and improved optimization.

UPDATE: Cancelling this due to new discoveries leading to massive potential improvements. Looks like the ride's not over yet.

Game objectives

  • 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

Encode by feos:


(Link to video)

Acknowledgements

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 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 only take advantage of this once because of the fairly heavy cost of leaving behind your tank. A run that skips bosses would make more significant use, such as in the European version run.

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

Corner Braking

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.

Damage "Boosting"

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.

Horizontal Hovering

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.

Tank Diving

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.

Icy Water/Lava

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.

Precision Grenades

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.

Time Comparison

Section Old End Old Length New End New Length Saved/Lost Cumulative
Title Screen 636 636 617 617 19 19
Area 1 - Side 4180 3544 4051 3434 110 129
Area 1 - Over 6503 2323 6304 2253 70 199
Area 1 - Boss 7458 955 7564 1260 -305 -106
Area 1 to 2 10061 2603 10071 2507 96 -10
Area 2 - Side 17035 6974 16900 6829 145 135
Area 2 - Over 19204 2169 19067 2167 2 137
Area 2 - Boss 20267 1063 20390 1323 -260 -123
Area 2 to 3 23471 3204 23526 3136 68 -55
Area 3 - Side 33062 9591 32928 9402 189 134
Area 3 - Over 35220 2158 35044 2116 42 176
Area 3 - Boss 36588 1368 36214 1170 198 374
Continue? 1 37961 1373 36830 616 757 1131
Area 3 to 2 38102 141 36971 141 0 1131
Area 2 to 1 40062 1960 38901 1930 30 1161
Area 1 to 4 44286 4224 42891 3990 234 1395
Area 4 - Side 50549 6263 46575 3684 2579 3974
Area 4 - Over 52467 1918 49084 2509 -591 3383
Area 4 - Boss 53805 1338 50587 1503 -165 3218
Continue? 2 54982 1177 51425 838 339 3557
Area 4 to 5 57868 2886 54127 2702 184 3741
Area 5 - Side 62156 4288 58358 4231 57 3798
Area 5 - Over 64177 2021 60296 1938 83 3881
Area 5 - Boss 65373 1196 61399 1103 93 3974
Continue? 3 65905 532 61929 530 2 3976
Area 5 to 6 66739 834 62743 814 20 3996
Area 6 - Side 75270 8531 70742 7999 532 4528
Area 6 - Over 77694 2424 73130 2388 36 4564
Area 6 - Boss 79073 1379 74352 1222 157 4721
Area 6 to 5 81172 2099 76385 2033 66 4787
Area 5 to 4 81944 772 77158 773 -1 4786
Area 4 to 1 83453 1509 78655 1497 12 4798
Area 1 to 2 (b) 86814 3361 81959 3304 57 4855
Area 2 to 7 91367 4553 86257 4298 255 5110
Area 7 - Side 100444 9077 94843 8586 491 5601
Area 7 - Over 102017 1573 96388 1545 28 5629
Area 7 - Boss 103410 1393 98093 1705 -312 5317
Continue? 4 104650 1240 98613 520 720 6037
Area 7 to 2 104791 141 98754 141 0 6037
Area 2 to 3 (b) 107725 2934 101582 2828 106 6143
Area 3 to 8 110449 2724 104182 2600 124 6267
Area 8 - Side 116085 5636 109495 5313 323 6590
Area 8 - Over 116575 490 109942 447 43 6633
Area 8 - Boss 1 118164 1589 111213 1271 318 6951
Area 8 - Boss 2 119850 1686 112713 1500 186 7137

Section by section comments

Power On

Oddly, I save 19 frames at the title screen by pressing start 6 frames later.

Area 1 - Platformer Section

More optimized movement and better lag reduction are most of the improvements here, but I also drive the tank closer to the end of the pier and do more to abuse the game's awkward ladder mechanics to squeeze a few more frames out.

Area 1 - Dungeon

Better lag reduction, and I take a slightly faster route through the destructible block section.

Area 1 - Boss

I glitch my way out of the boss room so I can die on spikes in the previous room. I lose a few frames to lag during the glitched boss fight, but I "lose" a bunch more frames from dying. I'll recover those frames plus interest in Area 3, so no big deal.

Area 1 to Area 2

...just assume I say "more optimized movement, better lag reduction" at the beginning of each of these blurbs. Anyway, I abuse the ladder again, the tank's position saves me a few more frames, and I save a bunch of frames on the mini-boss by unloading 1 hyper shot and 6 dumbfire missiles straight into its eyes.

Area 2 - Platformer

Nothing interesting to say here.

Area 2 - Dungeon

...yeah, this dungeon practically plays itself.

Area 2 - Boss

I once again glitch my way out to die on some spikes, and I get to use the pause trick to boot. I tried killing myself on one of the projectiles the boss shoots, but I wasn't able to get one to stick around when I tried that... maybe I was standing too far forward. Anyway, this was the best I could come up with. Again I lose frames for dying, but they'll be coming back in Area 3.

Area 2 to Area 3

Not that interesting. When breaking through the destructible blocks, I jump with precise timing, allowing me to fall one frame earlier. Other than that, just the basics.

Area 3 - Platformer

I make significantly different use of my dumbfire missiles than in the old run. Since they're always fired in threes, are pretty slow, and make smoke and noise, the dumbfire missiles are usually quite laggy. On the plus side, they do huge damage. I tried to use them when it would save more time than it costs. Also, in several rooms I'm doing things that normally wouldn't be exactly ideal, but generally this is because doing what would be the best at that time would screw things up later. On a final note, the last room before the dungeon entrance is where I get my first good damage boost.

Area 3 - Dungeon

That red guy next to the spikes shaped like a + decided not to shoot at me for some reason. Not that I'm complaining or anything, it saved me a bunch of lag frames. Also, I get to demonstrate Jason's ability to throw grenades at all sorts of crazy angles.

Area 3 - Boss

The first boss which I fight as intended! Jason really gets to strut his stuff as he precisely throws grenades at each copy of the boss at the moment it appears. Damn, that boy's got one hell of an arm.

Area 3 - Continue?

I already died twice, making continuing much faster. This is what those deaths were saving up for.

Area 3 to Area 4

The usual two, plus "better RNG manipulation."

Area 4 - Platformer

Here, I use an alternate route Twisted Eye found allowing me to spend a lot less time in the tank, a little more time in the dungeon, and reach the boss a lot faster. The fact that I have a bit of fuel left over, combined with an abundance of falling sections, means I get to use the hover mechanics to fall faster by avoiding touching the ground. Pretty cool if you ask me. At the end there's a long unobstructed fall, so Sophia takes this opportunity to get into the music a bit.

Area 4 - Dungeon

As mentioned above, I do have to spend longer in the dungeon since I came in much further from the boss. However, Jason has his waterskis on so he'll still get there in a snap.

Area 4 - Boss

I use the pause glitch on this boss, but I wait a bit to pause so that he'll flick his tongue out just as he dies. The tongue keeps moving and doing damage after the boss is dead, so I can position myself to get hit on just the right frame and die. This sets me back a little bit, so it takes me longer to get the... upgrade...?

Speaking of which, the Key was the primary motivating factor in my initial drive to make a run that skipped this boss. Every other boss gives you some cool new thing you can do with your tank, and from the boss just prior you even got the ability to fly... yet the Area 4 boss gives you a key with which you can open two little padlocks that are 10 feet apart. That was such a letdown when I got there the first time, and I still hold a grudge. But at least it was fun to TAS, and hopefully is fun to watch too.

Area 4 - Continue?

And, like in Area 3, dying during the boss fight means less time spent drowning myself.

Area 4 to Area 5

Jason finds Sophia's ejection seat, and the discovery is so exciting he launches himself off a cliff twice rather than just once! In the next room, the door glitch allows him to skip the entire ladder/platforming section, so he doesn't need to use his second life to plummet to his death to save time. All in all, I save 2346 frames in Area 4 over the previous run. To put that in some perspective, that's almost twice the total frames I had saved in Areas 1 to 3 (1395). Thanks again, Twisted Eye.

Area 5 - Platformer

I was hoping to use the door glitch here to save some time during all that swimming, but unfortunately every time when it feasibly could have saved time, it instead launched me into a big pile of lag. Oh well. At the beginning I send Sophia zipping through the water just for fun... but I think it also puts me in a better position to shoot the scuba guys and saves me some lag frames.

Area 5 - Dungeon

Not much to talk about, really.

Area 5 - Boss

Another boss I fight as intended. Like namflow, I want to be at low health at the end of this fight. He stood on top of the crab to have an easier time hitting its eyes with grenades, but with Jason's amazing throwing arm that isn't really necessary. To reduce lag, I instead stand him directly in front of the crab's face, soaking up as many bubbles as he can with his body. The grenade control really comes in handy here, since it allows me to run around to catch almost all of the bubbles while still throwing a grenade into the crab's eyes once every 8 frames. This was my favorite bossfight in the whole run.

Area 5 - Continue?

For a while I was really confused as to why namflow had this convenient enemy to kill himself on after killing the boss, yet I had to go out of the dungeon and come back in before the enemies would spawn. Then I realized he just didn't kill that guy when he came through the first time. I felt dumb, but can you blame me? Who expects an NES game to remember things like that?

Area 5 to Area 6

I don't lose speed when I get in the water.

Area 6 - Platformer

The ice level. For added fun, I tried to make my tires rotate as little as possible without losing time... Sophia, get your skates on! I make some significant use of jumping in a one-tile-high passage to start falling faster. I manipulate some mines to spew less debris. I also do some more of those things that should lose me time but gain me time later for some reason, like going through the wall of destructible blocks rather than over it in the sixth room. On another note, offset vertical shooting speeds up the "digging" portions quite nicely.

Area 6 - Dungeon

Remember when I said Jason's speed is higher on ice? I try to stay on the ice.

Area 6 - Boss

Though this boss is basically just the Area 2 boss but powered up, I still take a different strategy for it. If you recall, I said that the Area 2 boss's projectiles were cleared when it dies. That's not true this time, so I don't even have to leave the room to die at the right time. A good thing, too... for some reason glitching out of this boss room generates a ton of lag... possibly because of the horizontal door? Also, even despite dying, I save a bunch of frames over namflow's run because he caused a bunch of unnecessary lag. Whoops?

Area 6 to Area 7

So namflow and I both picked up some lightning and some homing missiles near the end of Area 6, but it seems like he just forgot about the homing missiles. This is a travesty and I sought to correct that... especially since it saves me some time! I also take a ~100-150 frame detour at the beginning of the big outdoor room in Area 1 to grab one of the 4-block hover items. That much fuel will easily make up for that time in Areas 2 and 7. I also manipulate enemies to drop a couple more hover items for me. On the way through Area 2, there's a big empty hallway on the way to Area 7, so Sophia rocks out to the music.

Area 7 - Platformer

Area 7 was one of the tougher parts to optimize because of resource management. I come in with a bit less than 5 bars of hover fuel, 10 homing missiles, and 14 charges of lightning. I'll be out of both fuel and homing missiles by the time I leave. There were sections where I had to cut shortcuts I took because they used fuel that could be better spent elsewhere. At one point a turret on the ceiling drops hover fuel in a position which I can't reach without a significant expenditure of time and fuel. I felt like the game was taunting me.

On the plus side, though, I had hover and I was using my homing missiles, and just those facts were able to save me a ton of time. For example, I took some faster routes through the "digging" sections because I had hover fuel. Some routes that would normally be fast cause problems because they lead to two-space gaps with no ceiling clearance to jump over it. However, with just 1 point of hover fuel, I can float over such a gap... for reference, each bar on the left represents 32 points of fuel, so 1 point is an amount I'm happy to spend anywhere it saves time. And though homing missiles have odd pathing and are potentially very laggy, they still allow me to hit enemies I can't normally reach. The sometimes-alternative, lightning, tends to cause about the same amount of lag any time you fire it so it can be better or worse for killing an Enemy Below you.

That last room with the green background was a monster to TAS, as well as the primary reason why I wanted to slow down and pick up fuel in Area 1. I use it in 5 places in the room; most notably, to speed up a falling section so I don't need to jump at the beginning (there are a lot of enemies above, causing lag), as an alternative to Wall.1 near the end, and to let me get over the last barrier more cleanly and spend less time out of the tank. Of those three, the last was least expensive, but it still took 8 points of fuel which, when I first got there, I didn't have. There were a few more nifty hover tricks I was using earlier in the area, but they didn't save enough time to be worth their cost. They will be missed.

Area 7 - Dungeon

This is basically the same stuff as the Area 4 dungeon; spend as long as possible lava surfing at every opportunity. I tried for a while to skip past the wall north of me right at the start, but the flash time seems to be just a few frames too short.

Area 7 - Boss

Like with Areas 2 and 6, the situation is opposite for the Area 4 and 7 bosses. The Area 4 boss has a nice, slow tongue for me to kill myself on after I kill it. By contrast, the Area 7 boss spits fireballs that move too quickly. No matter how I tried, by the time it was late enough I could die without the boss coming back, anything he had shot was offscreen, or at least in the impassible area around the outside. So, instead, I glitch back out, shoot a grenade kind of near some orange blocky things, and then disappear into the void.

Area 7 - Continue?

And again, dying during bossfights saves me time in the long run.

Area 7 to Area 8

Wall.2 is generally a lot more annoying than it is helpful, but you need it in order to get to Area 8 so I had to get it. From now on, I have to put effort into not sticking to the floor when I don't want to, but that should be basically invisible to the viewers. Anyway, Wall.2 does manage to be useful once prior to my ceiling adventure, and as I cross the ceiling in Area 3 I manipulate some enemies to give me two bars of hover. The turret was pretty easy, but getting that flier to carry some fuel directly to me was tricky, since there's no way I could jump and collect it. Anyway, that saves me some time ascending the last wall before the Area 8 door, and leaves enough for some occasional time-saving maneuvers in Area 8.

Oh, and on the way back through that empty hallway, since Jason complained of motion sickness last time, Sophia rocked out much more gently.

Area 8 - Platformer

Who let the composer get away with writing only 4 bars of music for the entire final area? Anyway, to demonstrate how far you can stretch your hover fuel if you know what you're doing... I come into area 8 with zero bars of fuel displayed on the left, yet still make pretty extensive use of hover without picking any up. Outside of that, there's not much to say. Area 7 was a lot more interesting.

Area 8 - Dungeon

Yep.

Area 8 - Plutonium Boss

Those boulders get in the way and make a ton of lag, so instead I used Mega Man-style pause glitching. With some manipulation, I could have fought it normally without losing time, but I wanted to show off this glitch and this was the best place to do it.

Area 8 - Underworld Lord

Oh man does he have a lot of HP, but he's so dumb I can just spin around and he still can't figure out how to hit me with that whip thing. I spend some time mimicing his movements first, but once he gets stuck that gets dull. I could have used Mega Man-style pausing, but that'd be even more boring than spinning given how long this guy takes to die.

Known/Potential Improvements

There are some improvements that are known, and there are a ton of theoretical improvements, so let's start with the known ones:
  1. In Area 2, stay in the boss room and preserve one diamond-shaped projectile to kill yourself. This would require entering the boss room at one less HP, but given the rooms with convenient enemies to bump into, that shouldn't be a problem.
  2. In Area 4, jump up above the door and exit the tank rather than waiting to reach the upcoming ledge. This unfortunately obsoletes the ejection seat. ;_;
  3. In Area 5, use the door trick once or twice to advance more quickly through the swimming section. Finding the best timing for other uses of it would be difficult, but it definitely saves frames in the final room. (I had assumed it wouldn't based on some testing of a similar concept in Area 3.)
  4. In Area 7, the door glitch can be used to save at least 20 seconds or so! Well, looks like I'll have to redo it.
And here are the more theoretical ones, in order from least difficult and time-consuming to most:
  • It's unverified, but if you can get the Area 7 frog boss far enough into a corner and then grenade it from far enough away, you may just barely be able to kill yourself on a fireball late enough to Boss Death Glitch. I never managed it, but my testing wasn't completely exhaustive.
  • When tapping the opposite direction to shoot an enemy behind you, it's usually better to do so in mid-air than on the ground, because grounded acceleration is better than aerial acceleration, slowing you down more. This is true even on ice, but that's because ice makes it practically impossible to do because of how often it just ignores your left/right input.
  • Movement could be more optimized when turning around in mid-air. There are generally three basic techniques: just plain holding the other direction, using corner braking, and using damage boosting. Theoretically the second and third can be combined but opportunities for that are rare if they're even present. Generally it's preferable to use a technique when possible, but I'm fairly certain this isn't always the case and I didn't test extensively. Also, there are definitely a lot of places earlier in the run where I should have used corner braking and didn't (at the time, I was assuming corner braking would slow me down overall), and probably a lot of places where I should have used damage boosting but didn't. Also, in several cases whether or not damage boosting is possible/efficient depends on the positioning of an enemy with at least partially random behavior, so RNG manipulation could matter as well.
  • Resource management of hover fuel could be improved. There are more places where hover fuel could be used to save time, only some of which I take advantage of. They have various costs associated with them, and many have further ways in which they could be adjusted to save more time for a greater fuel cost or vice-versa. Combined with the delays necessary to acquire hover fuel at the various points in the game it's possible to do so, there is a lot of potential for more time savings. In particular, the first technique for ascending which I mention in the extended comments is never used and likely could be to save significant numbers of frames at a few points without much fuel cost. Also, I wasn't examining memory as heavily when I did the section where I hover up to Area 4, so that could probably be further optimized in either direction.
  • Lag could be better managed by prioritizing the appropriate technique for shooting enemies. Sometimes it's best to kill them as early as possible, sometimes it's best to minimize the time your shots remain on screen, and sometimes it's best to minimize maximum processor load by decreasing the maximum number of bullets you have onscreen at a time. Of course, sometimes it's best to just not destroy an enemy. Figuring out what is best where isn't always obvious, and there are also issues of prioritizing which enemies should be destroyed first and so on. This could be managed a lot better than I did, and that's not even including the lag tradeoffs and resource management involved in special weapon use.
  • The random number generator could be better manipulated for a multitude of purposes. Ideally, enemies wouldn't ever drop powerups you don't need. Failing that, enemies would only drop powerups that you could pick up without losing time. Enemies that randomly appear wouldn't when it wasn't necessary, and those that appear at random positions or move in random directions would all do so in the most convenient ways. Oh, and enemies would randomly decide not to shoot when that's a possibility. Of course, accomplishing all this would be impossible, but it could certainly be optimized better than I managed to.
  • Boss death sequences tend to be fairly laggy, but your character's precise position onscreen seems to change how laggy they are. This could probably be further tested and better manipulated.
  • Mystery lag could be better manipulated. More on mystery lag in the extended comments, but the amount of trial and error this would require is pretty ridiculous.
All of this would be important in an improvement to this run, either if I end up coming back to this or if someone else decides to run Blaster Master and clean it up further.

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.

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.

Hover Mechanics

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:

  1. Tap A, then press and hold A 20 frames later.
  2. Press and hold A until your vertical velocity reaches -16 sp/f, then release A for one frame before pressing and holding A again.
  3. 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.

Underwater/Dive Mechanics

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.

Ice

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.

Walling Mechanics

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.

Platformer Jason

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.

Swimming

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.

Dungeon Jason

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

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.

Mystery Lag

As a final note, I sometimes switch weapons "unnecessarily" while going through doors, sometimes even from one weapon to itself. This is because something (I assume the sound effect it makes) manipulates lag in the future, and the effects of which reach 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.

Memory Addresses

  • 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
  • 0x047D - Area 1, 2, 4, 5, 7 Boss HP
  • 0x0499 - Area 3*, 8 Boss HP Area 3 tracks HP for each copy of the boss individually. They start with 8, and the frame after it reaches 0 the next copy appears. If you're already hitting it by that time, its HP will be seen as 6 immediately after 0.
  • 0x04D1 - Area 6 Boss HP

Conclusion

Canceled... I'm going to redo it with some major improvements as well as better optimization the whole way through. Look forward to it!

Similar submissions (by title and categories where applicable):