Locked

A new TAS of Shadow of the Ninja is right here. This time it is faster by 1018 frames over the current published run, 894 frames faster than my cancelled submission and 277 frames than xipos unsubmitted run. Improvements come from ultra optimizing every detail of the game.

Game objectives

  • Emulator used: FCEUX 2.2.2
  • Uses glitches to save time
  • Takes damage to save time

Comments

Improvement table

StageklmzxipoTASeditorRelative(klmz)Absolute(klmz)Relative(xipo)Absolute(xipo)
1-1233323172307-26-26-10-10
1-2332832893275-27-53-4-14
1-348244834482150-31-13
1-4605458095799-252-2553-10
2-1898586908648-82-337-32-42
2-21028299859940-5-342-3-45
2-3113071099810944-21-363-9-54
3-1180771769817556-158-521-88-142
4-1205632015919971-71-592-46-188
4-2235642301422787-185-777-39-227
4-3251222454824313-32-809-8-235
5-1279982743927167-22-831-37-272
5-2352993455834281-187-1018-5-277

Tricks and Glitches

The game uses an unique system for position units - called "u" from now on - 1u is equal to 1/16px.
Odd Rule
The odd rule is the ability to move at 25u/f, instead of 24u/f.
Getting Odd Rule
Acceleration is at 2u/f while walking or in mid-air, but deacceleration is at -4u/f on ground and -1u/f in mid-air when releasing R/L button. Being in mid-air and releasing the R/L button for one frame, causes the X velocity to be 25u/f. Or after doing an Item Boost before landing so that X velocity is (oddnumber + 1)*2u/f will result in the X velocity to be 25u/f too.
Holding Odd Rule
The Odd Rule can be kept by never releasing the R/L button during climping ladders and platforms, ducking, charge attack and level transitions.
Item Boost
With all items and weapons it's possiple to speed up X velocity by attacking in mid-air. The first optimal frame to initiate and Item Boost is when X velocity is at least 23u/f, X velocity will be 25u/f when the boost actually starts. In general it is (Xv-1)*2u/f and then it decreases 2u/f until the end of the animation. When it hits that point X velocity will be (Xv/2+2)u/f. With sword animation length is 11f, shuriken and bombs have a lenght of 4f and hook is 19f. Odd Rule is lost when animation length is an even number. When landing while boosting the X velocity will be (Xv-2)/2u/f, it is the best to start the Item Boost before landing so that (Xv-2)/2 is a odd number. To optimize Item Boosts level layout is a key factor.
Item Boost Half Interupt
When relasing R/L button while boosting the resulting X velocity will be (Xv-2)/2u/f. Useful for positioning and thus lag reduction.
Item Boost Full Interupt
When pressing the opposide R/L button of the currently held R/L button while boosting X velocity will be 0u/f. Again useful for postioning and lag reduction.
Item Boost Delay
Sometimes it's not the most optimal to start an Item Boost on the first possible frame, but to delay it for reducing lag.
Landing
While holding R/L button and not boosting the resulted X velocity will be 0u/f, (Xv-1)u/f when releasing R/L button and not boosting and (Xv-2)/2u/f when boosting.
Climbing platforms
Climbing a platform can cause being higher or lower afterwards depending on the Y position. Being higher is better when moving horizontal and camera scroll has no optimality priority, so a single frame Item Boost can be added. A lower Y position is better for vertical movement or when camera scroll has priority.
Frame-Rule
The game has a frame-rule of 16 frames. After each boss fight the game start the explosion animation if the frame-rule is 0xF and then the animation counter increases each time the frame-rule is 0xF until the animation timer is 0x10. The frame-rule is counting up and halts on lagframes, which means 1. A frame is lost when a lagframe occurs and position optimality decreases; 2. A frame is gained when a lagframe is removed and position optimality increases; 3. 16 frames are lost when removing a lag frame and decreasing position optimality and the frame-rule goes from 0xF to 0x0 on the last hit on the boss; 4. 16 frames are gained when adding a lag frame and increasing position optimality and the frame-rule goes from 0x0 to 0xF on the last hit on the boss.
Camera scroll
The camera will scroll horizontally while on ground or in mid-air, it will scroll vertically while on ground or climbing platforms. Horizonatal scroll speed is the same as characters horizontal speed. The camera scrolls horizontally until the player is in the middle of the view, even when the player is not moving.
Input processing causes lag
Sometimes when doing R+L or U will cause the game to lag, even if these buttons don't change anything. Releasing buttons can also cause lag.
Moving further when ducking
Holding R/L when ducking sets X velocity to 0u/f, releasing R/L causes the X velocity to be (Xv-4)u/f on the first frame.
Jumping
There are 4 different jump heights, 1f, 3f, 4f and 5f, the A presses cannot be distributed.
Double jump with charge attack
After a charge attack there's a one frame window to jump in mid-air.
Zipping
Climbing a plaform which has a adjacent wall to it will cause the player to zip upward with the right positioning and R/L are held.
Level transitions
When the player can move after a level transition is not constant, it's each third frame.
Double damage
Attacking an enemy whose variables are in odd RAM addresses with level 2 or 3 sword and the right position hitting the enemy twice.
Vertical ledge boosting
The player can boost up a ledge by holding R+L or Item Boosting, which normally can't be with a normal jump.
Collision detection
Interaction between enemies and player is every other frame. When the player collects a power up or after being hit, he's invunerable. Attacked enemies can't harm the player for some frames.

Stage by Stage comments

Stage 1-1

Frame 690 contains the only time releasing R/L to get odd rule, 4-3 has it too, but there it doesn't matter. Climbing up the first platform later at frame 948 requires to slow down at first, but saves time afterwards. Falling down into the gap at frame 1085 to add an Item Boost. Killing the monkey is needed to not have it in the way and to reduce lag. Doing the Item Boost at frame 1334 cause to lose Odd Rule, but it's still most optimal. Very long Item Boost delay on frame 1351 and interrupting it at frame 1356. Another delay at frame 1367. Loosing Odd Rule doing Item Boost at frame 1385, the lag didn't allowed anything else. Delaying the Item Boost at frame 1578 to make the boss appear sooner. The boss is manipulated in such way that he stops sliding as soon as possible by positioning.

Stage 1-2

Jumping through the enemy at frame 2636 gives a small boost, at first dropping to (18->16)u/f then going to (46->44->42->31->33->35->37)u/f. Delaying climbing at frame 2901 for one frame to make the next missle launcher not attack. Good vertical positioning saved frames. Attacking the running enemy at frame 3098 to make him turn around, as well as getting hit at frame 3117 to efficiently bypass the enemy at frame 3172. Also good positioning after getting hit to reduce lag. Turning left at frame 3152 and pressing D next frame for better position and lag reduction.

Stage 1-3

The rotating platforms depend on a local timer when they're loaded. Getting the sword upgrade which is needed later in 2-1. Jumping higher at frame 3930 to make the enemy not fire antother bullet. Getting bombs at frame 4050 for faster boss fight. Killing the enemy with the bombs to prevent him from shooting and causing lag. The next enemy will fire towards the right in an optimal way, so that the bullet doesn't hit the player when climping the last platform, but also to be as far to the right to reduce minimal speed. The bullet has priority, any added lag which causes better player position wont save time. Some glitchy hanging at fram 4586. Picking up the health item to be invunerable. Not doing an Item Boost at the end wastes one frame, but let's the player and boss start moving earlier.

Stage 1-4

Using bombs for this boss saves a lot of time. The frame-rule in this stage is one frame away from beeing beaten.

Stage 2-1

Getting the second sword power-up to have homing-shurikens for the mid-boss. It's needed to delay a frame spawning the mid-boss to prevent collision at about frame 7094, also some delay of throwing the shurikens to prevent lag. Massive amounts of reduced lag to the last attack. Some short interrupting of gameplay at frame 7237. The steam cycles depend on local timer and fire two steams each time, the timers have proirity so the fire as soon as possible. Deaccelerating on ground at frame 7443 and 7445 to be able to jump over the enemy. Delayed the Item Boost at frame 7742 for two frames to reduce lag. Climbing at frame 7830 was delayed for lag reduction too. Getting a second set of shurikens for faster movement and better lag reduction. The second thrown shuriken is killed by the steam at frame 8101 to prevent lag. Doing R+L to take the upper platform, benefits are not waiting for the steam cycle and lag reduction due to the shurikens not spawning off screen. Running both legdes and doing Item Boosts at frame 8491 was faster in this case, with different positioning it would be more optimal to only run down one.

Stage 2-2

Starting an Item Boost with sword at frame 9117 right before collecting the bombs let's it last longer than just with bombs, but it's stopped earlier due to bombs animation. Jumping and pressing R at frame 9306 to move 3u. Throwing bombs at the enemies at the end of the stage to not get hit.

Stage 2-3

Firing a sword beam at the boss after the second bomb throw hits him at frame 10221, right before the first bomb hits him, which was enough to beat the frame-rule once more. Pressiong D at frame 10533 to reduce lag, as well as at frame 10857, the rest of them don't reduce lag.

Stage 3-1

Attacking the first enemy so he wont fire to the right, which saves lot of time when jumping over the third enemy at frame 11843. The section after frame 12005 is tricky, an enemy who has priority spawns in the right upper corner at frame 12095, but he's stuck there for a while and moves back and forth, adjusting camera is needed to make him just not lose his low position when he can move. Also not causing any lag until the enemy is hit is always better. Some reduced lag afterwards doing jumping at frame 12274. More reduced lag by delaying jumping at frame 12403 for one frame and not Item Boosting, causes to hit ceiling and loosing vertical momentum at frame 12417, but it was still the most optimal. Reducing lag by good jump height adjustment at frame 12473 and delaying the Item Boost at frame 12501. Getting shurikens and charging attack at frame 12928 to perform double jump, attacking the box from the left corner of the platform and starting the charge from there isn't working, the camera has priority and needs all the way to the right when performing the zip. Manipulating the little enemy so he wont be on screen when the charge attack fires to reduce lag. Pressing L at frame 13281 to reduce lag, pressing R at frame 13328 and then releasing it for positioning. At frame 13354 getting odd rule. At frame frame 13666 the camera needs to be first shifted all the way to the right. Killing the enemy, instead of getting hit. The box with the shurikens at frame 13814 is destroyed in such way that falling into the platform where the box is is unnecessary. Killing the enemy at frame 14033 to jump low and thus adding one more Item Boost and having the next one delayed for long. Delaying the last Item Boost at frame 14208 for 8 frames to make the boss appear earlier. The frame-rule is one frame away from getting beaten again.

Stage 4-1

Saved some frames by vertical positioning when climbing. Camera has priority until frame 18547 to make the missle launcher fire as soon as possible. Hitting the missle launcher at frame 18679 with the sword beam, so the next sword beam passes through enemies which let's the enemies at frame 19110 killed in two slashes instead of three. The upper section is really laggy and requires delaying Item Boosts. Doing the second slash at frame 19124 while standing and pressing R+L to move 2u to the right, instead of continue ducking. Killing the enemy at frame 19356 with double hit to reduce lag. Speaking of lag the next section is still very laggy and applied the usual lag reduction techniques to it. Killing the missle launcher at frame 19562. Collecting the health item at frame 19694 to bypass the next missle launcher efficiently.

Stage 4-2

Caused losing odd-rule at frame 20226 for positioning to extend walking on the conveyor belt. Saved some frames when jumping at frame 20352 due to prior vertical positioning, as well as when jumping up the next round platform. Firing a sword beam to the enemy at frame 20529 to make him move. Waiting on the platform at frame 20916 to avoid death, also camera has priority and thus minimal air time is optimal. Extended walking on the conveyor belt by interrupting movement by releasing R on frame 21007. Collecting bombs at frame 21440 for boss fight. Waiting for the elevator to be high enough without spawning the moving box enemy. It's possible to jump up to the ledge at frame 21666 earlier and boost up vertically, but it requires a bomb which can't be wasted there and R+L trickery doesn't work since this isn't a ledge to the right. The spawning of the box enemy is delayed for so long that jumping into the middle hole is possible. The next box enemy has priority and removed lag is always better. Now R+L allows a ledge jump, but it isn't useful. Coming up a laggy section after climbing the elevator. Throwing a bomb to the enemy at frame 22244 to prevent getting hit. Instead of jumping once more at frame 22311, climbing down the platform at frame 22335 to make the enemy attack and not move to the right. To move in the elevator cutscene R+L is pressed at frame 22436, which causes the camera to stay in place horizontally. After the zipping a the camera needs to be high enough in order to die when jumping down, so the player actually spawns at the right side of the screen where the exit is and exiting the stage.

Stage 4-3

After throwing the last bomb attacking the boss with sword slashes to make the bombs cause damage faster.

Stage 5-1

Jumping over the first enemy is not possible, so waiting until he jumps is needed, his actions depend on global timer. The second enemy is hit to delay his attack. Good positioning saved a frame on the third enemy. Delayed jumping to the platform at frame 25371 for one frame to make the camera scroll vertically when climbing up. Saved some more frames due to vertical positioning. Getting the sword upgrade at frame 25806 to bypass the enemy, unfortunately the invincibility time doesn't last long enough to bypass the second enemy more efficiently. Getting hit by the enemy 25926 is unavoidable. Manipulation camera scroll as far to the right by letting Item Boosts last as long as possible without losing player position. Since the player is in the right side of the screen the camera will always scroll right no matter which direction the player takes and Item Boost make the camera move faster to. Good examples for moving the camera faster are the Item Boosts at frame 26209, 26223 and 26250, these only benefit camera position. Getting shurikens at frame 26442 to move faster.

Stage 5-2

Pressing R+L at frame 27476 gives a small boost to 55u/f due to the enemy reverse ejecting the player, same with the enemy at frame 27619. When entering the auto scroller, the camera needs to be so much to the right that the boss isn't to much to the left when he jumps to the left. Getting the hook for optimal boss fight. Killing all enemies possible before collecting the bombs to reduce lag. Pressing down at frame 30337 reduces lag, aswell as at frame 30400, 30464, 30496 and 30541. Moving back and forth to make the enemy on the right not throwing his spear. Releasing D on frame 30561 reduces lag, same as frame 30657 and 30689. A down press at frame 31010 reduces lag. Another one at frame 31072. And more at frame 31201, 31232, 31264, 31296, 31328, 31360, 31391, 31424 and 31457. Getting the scroll item to fully power-up the hook, throwing the second bomb through the wall due to fully powered-up items and collecting the health item on the other side to be able to perform a charge attack. When attacking the boss with the hook double damage can be caused by good positioning. The hook will fire a beam each time up is pressed when attacking in mid-air and thus causing damage to the boss. Landing on the ledge at frame 33909 was enough to sqeeze out two frames from the boss fight.

Other comments

Thanks to

  • klmz the previous run
  • xipo for his TAS, new tricks and being helpful
  • not mtvf1 for pointing out xipos run to late

Samsara: I love SotN runs. Judging.
Samsara: Accepting as an improvement to the published run.
fsvgm777: Processing.


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15619
Location: 127.0.0.1
This topic is for the purpose of discussing #5130: TASeditor's NES Shadow of the Ninja (Japan) in 09:30.41
Experienced player (691)
Joined: 11/23/2013
Posts: 2238
Location: Guatemala
It must have been very tiring to improve such an already tight run, but it payed off! It was very entertaining for me, so I vote yes.
Here, my YouTube channel: http://www.youtube.com/user/dekutony
fcxiaopengyou
He/Him
Experienced player (559)
Joined: 7/25/2015
Posts: 123
Location: Republic of China
nice, yes.
Working on: [NES] Downtown Special - Kunio-kun no Jidaigeki Dayo Zenin Shuugou! (J) ''2 players 100%'' Plan: [SNES] Kenyuu Densetsu Yaiba (Japan) _________________ My English is pour. 
mklip2001
He/Him
Editor
Joined: 6/23/2009
Posts: 2227
Location: Georgia, USA
Wow! I had been fairly excited about this, but I didn't have anything to comment in the forums during its development. I'm very glad to see how smoothly this came out. I also see you mostly stayed away from doing charge attacks right before boss fade-outs: does that help reduce lag? All of Stage 4 was incredible, and the music playaround in 5-2 totally made my day. Thank you for making this (and its encode).
Used to be a frequent submissions commenter. My new computer has had some issues running emulators, so I've been here more sporadically. Still haven't gotten around to actually TASing yet... I was going to improve Kid Dracula for GB. It seems I was beaten to it, though, with a recent awesome run by Hetfield90 and StarvinStruthers. (http://tasvideos.org/2928M.html.) Thanks to goofydylan8 for running Gargoyle's Quest 2 because I mentioned the game! (http://tasvideos.org/2001M.html) Thanks to feos and MESHUGGAH for taking up runs of Duck Tales 2 because of my old signature! Thanks also to Samsara for finishing a Treasure Master run. From the submission comments:
Shoutouts and thanks to mklip2001 for arguably being the nicest and most supportive person on the forums.
Editor, Skilled player (1537)
Joined: 7/9/2010
Posts: 1319
mklip2001 wrote:
I also see you mostly stayed away from doing charge attacks right before boss fade-outs: does that help reduce lag?
Charge attacks cost energy, but only when it actually starts attacking not the animation of the sword holding up. So I started the charge when it doesn't waste energy. Edit: Oh, I first thought you meant by stayed away delaying the charge. It reduces lag, but the lag can usually be removed by pressing down too.
Favorite animal: STOCK Gt(ROSA)26Sortm1.1(rtTA,EGFP)Nagy Grm7Tg(SMN2)89Ahmb Smn1tm1Msd Tg(SMN2*delta7)4299Ahmb Tg(tetO-SMN2,-luc)#aAhmb/J YouTube Twitch
Active player (437)
Joined: 4/21/2004
Posts: 3517
Location: Stockholm, Sweden
It was my absolute pleasure watching your run. You really got the sense that you put a lot of work into it. In the end, hard work pays off and your end product speaks for itself. I wouldn't object letting your run even get a star because it has it all, zipping, lag reducing, super optimized and whatnot. This game usually lags a lot but not once did I felt lag upon when I watched your run. Here is my yes vote and I would like to nominate your run for a shiny star :D Edit: fsvgm777, I humbly request a lossless encode :P
Nitrogenesis wrote:
Guys I come from the DidyKnogRacist communite, and you are all wrong, tihs is the run of the mileniun and everyone who says otherwise dosnt know any bater! I found this run vary ease to masturbate too!!!! Don't fuck with me, I know this game so that mean I'm always right!StupedfackincommunityTASVideoz!!!!!!
Arc wrote:
I enjoyed this movie in which hands firmly gripping a shaft lead to balls deep in multiple holes.
natt wrote:
I don't want to get involved in this discussion, but as a point of fact C# is literally the first goddamn thing on that fucking page you linked did you even fucking read it
Cooljay wrote:
Mayor Haggar and Cody are such nice people for the community. Metro City's hospitals reached an all time new record of incoming patients due to their great efforts :P
fsvgm777
She/Her
Senior Publisher, Player (226)
Joined: 5/28/2009
Posts: 1215
Location: Luxembourg
AngerFist wrote:
Edit: fsvgm777, I humbly request a lossless encode :P
I guess this means I'll also encode this TAS when it gets accepted. It will come after Mega Man X, though (I actually have my encoding script set up for Mega Man X, so....yeah).
Steam Community page - Bluesky profile Oh, I'm just a concerned observer.
Skilled player (1005)
Joined: 10/13/2014
Posts: 409
Location: nowhereatthemiddleofnoone
playing this game with the music is very funny :) yes vote
GAW sms... Totally destroyed
fsvgm777
She/Her
Senior Publisher, Player (226)
Joined: 5/28/2009
Posts: 1215
Location: Luxembourg
AngerFist wrote:
Edit: fsvgm777, I humbly request a lossless encode :P
And done: http://www.mediafire.com/download/dic910q5h633c2a/shadowoftheninja-tas-taseditor_lossless.mp4
Steam Community page - Bluesky profile Oh, I'm just a concerned observer.
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15619
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. ---- [3153] NES Shadow of the Ninja (Japan) "1 player" by TASeditor in 09:30.41
Post subject: I loved it!
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
Just saw this today. This run was absolutely incredible. One of the best TASs I've seen all year and an amazing improvement to an already great run. Much more entertaining too, and I loved how you danced to the music in the scrolling section. Big yes vote!
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
dart193
He/Him
Player (35)
Joined: 1/20/2013
Posts: 63
I absolutely would like to thank the author for 5-2. I am totally crazy about making sound effects play in rhytm with music, and given the length of the autoscrolling section... In my opinion, that is how you should do autoscrolls in every game.
Noxxa
They/Them
Moderator, Expert player (4128)
Joined: 8/14/2009
Posts: 4090
Location: The Netherlands
Locking until further notice.
http://www.youtube.com/Noxxa <dwangoAC> This is a TAS (...). Not suitable for all audiences. May cause undesirable side-effects. May contain emulator abuse. Emulator may be abusive. This product contains glitches known to the state of California to cause egg defects. <Masterjun> I'm just a guy arranging bits in a sequence which could potentially amuse other people looking at these bits <adelikat> In Oregon Trail, I sacrificed my own family to save time. In Star trek, I killed helpless comrades in escape pods to save time. Here, I kill my allies to save time. I think I need help.

Locked