After a whole decade, this run improves the obsoleted run by 75 frames. It wasn't long after that run was published here that a couple mistakes and a few tiny movement optimizations were noticed, but it mostly sat abandoned for some time. Eventually I got around to doing some preliminary debugging—which for the most part did little more than explain why certain things were already optimal—but did lead to some more minor tweaks. Later, xipo found a way to speed up one of the boss fights, and then Marx applied the same technique to another boss. After this, the run was again set aside for about four years until feos's and MESHUGGAH's work on a pacifist run supplied two new damage boosts that I had convinced myself couldn't work. Applying those improvements also changed some enemy behavior that had been costing time and made a few more new things possible. Finally we had a run that was different enough to be worth replacing the published run.
The submitted fm2 also includes subtitles with additional trivia about the run and about the game, as well as some technical notes targeted towards anyone who might attempt to improve it.

  • Emulator used: FCEUX 2.2.3 (and multiple versions since FCEU 0.98.16)
  • Aims for fastest time
  • Takes damage to save time
  • Manipulates [stuff that is unpredictable in real-time]

Programming quirks and errors taken advantage of to go faster[1]

  • Damage boosts: hardly seems worth mentioning here, but no harm in being thorough. Whether extending a jump or just speeding up a wall-climb a little, damage boosts are a huge part of playing this game fast. Some work so nicely that you might wonder if they're an intentional feature.
  • Slash-cancel: though it was probably intended simply as a way for the player to preserve Ninpo while possessing the Spin Slash attack, it lets you attack with the sword as often as Down+B can be pressed and released—which is every two frames in a TAS.
  • Left+Right / Up+Down+Left: these basically keep new horizontal speeds from being written. This can be applied to avoid the standard slow backwards movement during jumps or to keep the slower movement from jumping backwards or bouncing off an enemy for precise positional adjustments. Somewhat unusually is it? I don't know, Ryu's speed is only ever positive and the game uses which direction he's moving to decide whether to add or subtract.
  • Entry-ladder shortcuts: when Ryu enters an area where he starts on a ladder, a hard-coded value determines which direction he faces in the first frame of input, before he grabs it. If he's facing right then he can move far enough into the ladder to be inside it after jumping away—but only with frame-perfect use of L+R/U+D+L.
  • Special weapon persistence across screen transitions: used to score some extra damage on bosses (3-3, 6-4) and just to show off a bit a few times.
  • Drawing interrupts: every 16 pixels of scrolling, the game has to put most things on hold for a frame to load new stuff into memory. Ryu's movement is one exception, so he can go back and forth across such boundaries at will to, in effect, freeze time around him. In areas where the goal is to the left of the starting position, this can even line up with a wall that has to be climbed.
  • Randomness:
    • Enemy spawns: In areas with more than 8 enemy spawns, where exactly they spawn will vary as much as 3 frames. Simple delays, positional adjustments, or taking advantage of the interrupts mentioned above can all affect spawns.
      • Re-spawning enemies: the game uses a simple (and often very frustrating to casual players) system to re-spawn enemies when moving back through a level based on which direction the screen was last scrolled. These "re-spawns" look as you might expect for enemies which spawn ahead of Ryu and near the edge of the screen—they re-appear roughly where they first appeared. But for enemies which normally spawn behind Ryu, the re-spawn will place them ahead of him. It is those enemies, along with some that appear more towards the middle of the screen, which can be re-spawned with one frame of movement in the opposite direction and sometimes used for a damage boost.
    • Enemy subpixels: subpixel values are carried over from enemy to enemy, so paying attention to them when killing stuff can be pretty important. Most enemies only move in half-units, but for some—such as birds, which accelerate in sixteenths—very small differences in the value they inherit can make a significant difference in their path over the course of multiple screen-widths.
    • Enemy behavior: there is a constantly-running timer on a 256 frame cycle used to determine both how frequently and at what angle the tosser enemies (affectionately known as "hammer brothers" to speedrunners) will, well, toss things. The fact that nothing can be done to influence it beyond going faster or slower can be greatly frustrating, but can also be great motivation to find a way to squeeze out just one more frame to get them to provide a helpful boost or to simply stop being a jerk.
[1]This list primarily focuses on how things were applied to this submission. For a more generalized and comprehensive overview, see the game resources page, which also contains Lua scripts, RAM info, and symbolic namelists.

Level Comments

Acts I & II

Though there are no speed improvements here, all input has been redone. It is possible to complete Act II one frame faster, but a tosser providing a boost in 3-2 prevents that improvement from getting past him.

Act III

Ditching the Fire Wheel here means there's no need to waste time getting rid of the spare Ninpo left over after using the Throwing Star. That combined with not delaying the cut-scene skip after Act II and the improved boss fight gets us or first speed improvements.

Act IV

One of my earliest memories of learning the TAS ropes was checking if the bat boost in 4-1A was actually faster than climbing the wall and concluding that the bat was indeed about 30 frames faster. Obviously that was wrong, and it went unnoticed until some time after the old run was published that the bat is actually 4 frames slower.
At one point using a couple slash-cancels to get through 4-2 and its lack of Ninpo was replaced with turning around to provide an opportunity to freeze the level timer to save 3 frames at the Act V boss. Though the Act III improvements later made that unnecessary, it was kept in and eventually provided a key component of the setup when MESHUGGAH came along and applied the bird boost from the pacifist run here. 4-3 also gets a few single-frame improvements, and we get a more favorable timer going into the boss for another 3 frames.

Act V

5-1 sees the most significant changes. First, feos provided a way to include the longtime RTA-standard "5-1 manipulation" or simply, "the manip." This helped to set up a bird re-spawn that provided so many boosts that a health pick-up was needed. The one frame delay to knock down the health is even required for the final boost to be effective.
In 5-2, the Spin Slash is collected without wasting time, a new boost is added, and an old boost is improved by killing a bird. 5-3 gets a few minor wall-climbing improvements, a new tosser boost, one useless boost just because, and avoids some damage that wasted time.

Act VI

After all the consternation the various tossers in this level have caused, it's nice that the last round of improvements seems to have mellowed them out. Still a bit of a shame that they're so boring now though. 6-2 gets a not-so-new boost and a pair of one frame improvements. Same goes for 6-3, minus the boost. I put a fair amount of effort into trying to get through the final screen in 6-3 without using the hourglass and without losing time. Doesn't work: Ryu has to face left (which means continuing to face left after the wall-climb, or turning around would cost 2 frames) to throw the Fire Wheel before leaving, and the Windmill Star can't get low enough to kill the first enemy in his way after going over the wall. Okay, what if he could bring the Windmill Star from the previous screen and kill everything with that? Almost, but not quite! Finally, xipo's input helps bring Ken to his senses 4 frames faster.
LevelSavedTotal
Act III1313
Act IV1629
Act V3766
Act VI975
The removed instances of delayed cut-scene skips (for manipulation) from 562M are counted as improvements to the following level here.

Credits

BoltR: making the first TAS of Ninja Gaiden which established many speed-running strategies that would become standard at a time when there was little-to-no video of competent Ninja Gaiden game play to be found on the internet
Slotermeyer: expanding on BoltR's work and introducing left+right to NG1 TASing
Scumtron: writing this submission text; some other stuff
xipo: using special-weapon-persistence to kill the first of the final bosses faster
Marx: applying xipo's idea to the 3-3 boss
MESHUGGAH: figuring out how to boost from a bird at the end of 4-2; catching a one frame improvement that I missed at the last minute; creative consulting
feos: finding a way to use the RTA "5-1 manipulation" that didn't cost more time than it saved in a TAS; lots of thorough debugging/disassembly and Lua scripting; creative consulting

Suggested screenshot: 24016

Samsara: Hell yes.
Samsara: Fantastic work, deeply entertaining and insanely optimized. Accepting as an improvement to the published run.
feos: Pub.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
Joined: 7/2/2007
Posts: 3960
Huh. I don't remember the slash-cancel technique. That kind of renders the jumpslash ninpo kind of irrelevant for fast boss kills! Nice run. The playing with the Windmill Shuriken (and more generally with the environment and enemies) was well done, and of course it's faster than the previous run. Way to make a mockery of an infamously hard game!
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Alyosha
He/Him
Editor, Emulator Coder, Expert player (3827)
Joined: 11/30/2014
Posts: 2834
Location: US
Very impressive run, to have improved the previous one by over 1 second is quite the technical achievemnet. Any thoughts of working on the sequel as well?
Joined: 5/12/2009
Posts: 748
Location: Brazil
Great work! Amazing run! Yes vote.
Player (154)
Joined: 5/1/2006
Posts: 150
Derakon wrote:
Huh. I don't remember the slash-cancel technique. That kind of renders the jumpslash ninpo kind of irrelevant for fast boss kills!
It's a major part of RTAs for the final two bosses (along with a very awkward way of holding the controller), but it still can't match the 1 damage/frame of the spin slash—frame-perfect or not. There's also the fact that of the four bosses killed with spin slash, three are just dudes standing around where normal slashes aren't in range for most of the jump arc. Also, unlike its sequels, this game does take 3 frames to tally every point of ninpo left over after boss kills into the score.
Aloysha wrote:
Any thoughts of working on the sequel as well?
I'd like to put together a new TAS that includes xipo's improvements. Earlier this year I did some research into some of the glitches with that aim in mind so something new could be shown off too.
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Added subtitles to the encode.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 12/29/2014
Posts: 16
Thanks. Subtitles make everything better. Yes vote.
MESHUGGAH
Other
Skilled player (1919)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
It was a good experience to work on this with Scumtron. I hardly doubt it can be improved upon.
Alyosha wrote:
Any thoughts of working on the sequel as well?
If I ever finish the wonderful misery of pacifisting, you can count on me. All I ask is a fancy LUA script by feos :)
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11495
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
OH GOD NOT AGAIN Yeah............... sure...
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Editor, Skilled player (1824)
Joined: 8/25/2013
Posts: 1200
Gave this a Meh. I can see the amount of effort y'all put into this run, but I just didn't find it very entertaining.
effort on the first draft means less effort on any draft thereafter - some loser
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
This movie has been published. The posts before this message apply to the submission, and posts after this message apply to the published movie. ---- [3223] NES Ninja Gaiden by Scumtron, MESHUGGAH, feos, Xipo & Marx in 10:50.36
Samsara
She/They
Senior Judge, Site Admin, Expert player (2241)
Joined: 11/13/2006
Posts: 2822
Location: Northern California
This movie was flagged as console verified, but there doesn't seem to be a video attached, so I'm removing the flag. If a video exists or a new one is made, please post it in this thread and the flag will be re-added.
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family. Now infrequently posting on Bluesky
warmCabin wrote:
You shouldn't need a degree in computer science to get into this hobby.
Post subject: What is the RTA timing of this TAS?
Toms
He/Him
Joined: 5/14/2021
Posts: 11
Location: Argentina
RTA timing: 10:54.88 RTA timing (when the movie input stops): 10:47.43