Posts for Scumtron


Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Marx wrote:
And yes ng1 must take damage in 4-1c from that soldier ... ng1 cannot be done without getting hit.
Incorrect!
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
moozooh wrote:
I believe nowadays NG2 can be beaten even faster, though; ask Scumtron if unsure.
I actually haven't touched NG2 since my last submission for it, but Xipo recently mentioned that he's found an additional 18 frames of improvement since this submission.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Pacifist NG is not interesting. No-damage NG is not interesting. Pacifist+damage-boosting might be slightly more interesting, but not by much. No sub-weapons is not interesting either: most existing runs use them almost exclusively for boss fights already, and replacing the spin-slash with normal sword slashes just results in repeated jumps with a few slashes while near the ground. (and using a different sub-weapon would be similarly boring) In my opinion, the only viable alternative category for Ninja Gaiden would be 'minimum in-game time', but this would probably only differ from 'fastest real time' run by letting cut-scenes play 1-255 frames to manipulate the main RNG ($BF) for ideal weapon-tosser behavior, and some extra 30hz wiggling in a few screens to freeze the fractional component of the level timer ($62). But as the game doesn't display this time when you beat it, I wouldn't expect many people to care. Also! Please stop making new threads for existing topics.
Post subject: Re: Time saving glitch in ninja gaiden 3
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Marx wrote:
Oh yeah! I found new glitch in Ninja gaiden 3. It is possible to zip inside the wall. It is somehow hard to explain how did this happen.
Then let the input do the explaining for you. You were recording, right? ;p
Marx wrote:
I was screwing around in 1-2a then i stuck in the platform allowing me to zip directly to exit.
1-2a would be the boss room, and a quick look at RAM shows no scene change objects on screen there. I am intrigued!
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Well, here's a rundown of the fastest strategies I've come up with for each different weapon: windmill star: 89 frames small star: 92* sword only: 93 fire wheel: 96** spin-slash: 55*** *89 frame boss fight, plus 1 frame to turn around and 2 frames to throw stars before leaving 3-2. **89 frame boss fight, plus 5 frames to knock down the power-up and expend the extra ninpo before picking up the firewheel so it doesn't waste 6 frames tallying into the score, then 1 frame to turn around and 1 frame to throw a fire wheel before leaving 3-2. ***just some fun with the hex-editor. :p And this is also ignoring any manipulation necessary to get the knife-boost in 3-2, and getting the firewheel totally screws that up. EDIT: The quickest firewheel strategy also necessitates taking a hit on the same frame the boss dies (also the case with sword-only), which glitches out the music and the boss's dying/exploding animations — both of which would be mildly neat to include in a TAS, but don't appear to influence anything on their own — and sets $75 (normally always 00) to 04. This somehow effects a machine-gunner in 4-1A, resulting in the bullet that boosts Ryu to the exit being a couple pixels back and costing one frame. I've experimented a little with this address and have not found any other instance where it can cause a desync by being non-zero. In short, it really needs more in-depth investigation, and possibly debugging expertise that I currently lack.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Marx wrote:
I think windmill star will faster in 3rd boss since you use start dealing damage to him by using it at the end of level in 3-2 (xipo's idea)
I should not have dismissed this thought so quickly! Improved on the 39119 WIP by five frames (13 frames faster than published run). No time is lost throwing the star at the end of 3-2 since landing on certain tiles stops Ryu for a frame, which is a perfect time to use a special attack. Yay.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Marx wrote:
So you haven't work on your ninja gaiden 2 run.
Not at all. Xipo has shown that it's improvable, but I just haven't been interested in messing with that game.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
feos wrote:
Replaced Nahoc's encode for publication, because it was done in pure 30 fps, partially killing the shadows. Now no action is missing and no blending is applied either.
Glad you did this, much more watchable now.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
When? I've been poking and prodding at this game, off and on, over that last six years, and I'm in no particular hurry about it. There are still many little things that need more investigation before I'd be content submitting a new version here. That being said, I don't anticipate coming up with anything that differs much from the 39119 WIP I already posted in this thread.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Yeah, that's what I meant. Like this, right? But I don't think it can save time here since turning around costs time, and in this case those ''free'' hits take just as much time as the finishing blow(s) will take in the boss room. It works out for the 6-4A boss because Ryu can turn around without losing time there, and because the position of the boss there. EDIT: Gosh dang it, turns out that this can kill the 'Basaquer' two frames faster. It looks super-boring too.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Regarding secret-bird boosts in 3-2: Yep, I never did manage to get that to be even close to being faster than the 20 frames of forward movement lost by going over that wall normally, but I can't entirely rule out the possibility. Another obvious candidate for backwards-movement-summoned enemy-boosting would be the birds on the bridge in 4-2 and the ladder leaving the stage, which I've also spent a lot of time trying to make work with no success. It's difficult to say for certain that these will never work due to the number of variables involved: initial enemy x-subpixel position, the two RNGs, Ryu's movement from when the enemy is brought on screen and where the boost is desired. lvl 3 boss: you can actually get in two preemptive hits with the small star that way, but I was unable to save time by doing so. I would expect the windmill star to be slower no matter what since you can only have one on screen at a time, but I'd love to be proven wrong.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Marx wrote:
Anyway i guess no one like the movie .but i think i can improve it to 10:51 third boss has complete 5 frame faster than scumtron's published run.
Keep in mind that to improve level 3, you have to consider the end-level score-tally, which is why the published run wastes time unloading the extra special attacks in 3-1, and why I since improved on that by simply using the throwing stars on the boss — which just so happens to kill him just as fast as the firewheel does in the published run. Other significant improvements made since that run was published: * the bat-boost in the middle of 4-1A was slower than dropping down and climbing the wall * dropping to the floor before climbing the wall and getting the spin-slash was slower than jumping directly to the wall. * adjust the wall-climb in 5-3C so that Ryu goes back and forth across a tile-boundary freezes the enemies so they can be avoided * applying xipo's idea of abusing the persistence of special attacks from screen to screen to get early hits on a boss worked to kill the first of the three final bosses five frames faster So, if you do intend to make further improvements, do compare to this 39119 WIP. If anyone is curious as to why I haven't submitted this yet, I'm still holding out hope that I can make this 2nd bird-boost in 5-1 work, but it's like totally complicated.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Mr. Kelly R. Flewin wrote:
...never thought about zipping being possible...
Reading that got me all excited, then I watched the run and saw that the "zipping" was just the same thing as in the published run. Rough breakdown of where this run loses time compared to the published run and my 39119 WIP:
	   Marx	  Pub.	39119 WIP
lv1	3151	 -2  	-2
lv2	9711 	-31 	-33
lv3	14510	-79	 -87
lv4	22136	-127	-148
lv5	30254	-277	-313
lv6	39541	-380	-422
Good effort if this is your first try at a TAS, Marx. But there are lots of mistakes that could have been avoided with closer scrutiny of the published run (and WIPs that have been posted around here since). You seemed to get particlurly sloppy starting around level 5, and the hit taken from the tossed club in 6-2A should have been entirely avoidable by grabbing the spin-slash in 6-1 or possibly by killing a frame or two before that enemy appears on screen. If you want to continue working at this game, don't hesitate to post any thoughts/ideas/questions in the thread for it!
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Here's a short... eh, let's call it a 'concept demo'. Just run this Lua script (please forgive my ridiculous IF abuse) with this .fm2.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Entertaining so far. I enjoyed the ammo-conservation tactics in the Meryl! fight. The way Snake tends to take the corners wide during the opening credits: can't be helped? Seems like this game can feel sub-optimal at times no matter what you do
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Aha! If it can effect the level timer then this could indeed make sense. Though based on everything I think I know about the game it seems very unlikely, but I certainly can't rule out the possibility. Thanks for the reply! Another possibility: rarely, grabbing a power-up on the wrong frame can 'lag' the game and glitch the graphics for one frame. This doesn't seem to fit what you describe though. (also, i'm not sure if i've seen this happen since moving from fceu to fceux) Edit: take the published run (hey look, typo in that file name) and slash on any frame 22598 to 22614. Ryu grabs PU at 22615 and at 22621 this happens: Problem there is that pretty much everything freezes for that frame: player, enemies, the 'level-based' RNG ($B5), timer fractions ($62). Just about everything but sound and the 'global' RNG ($BF) — which only ever seems to stop on actual 'lag' frames.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Xipo wrote:
I am interested in some strange Randomness.Getting the tool in left picture can add some frame after hero entering room (right picture)
Do you have a movie file that shows this?
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
* 1436: Jumping later does indeed put Ryu half a pixel forward, which unfortunately isn't enough to reach the level exit sooner. * Boss: Watch $045F when the middle boxer at the end of the level dies; this is enemy X position subpixel. If $045F=0x80 when entering 1-2 then the Boss will be a half-pixel to the right and Ryu will take an extra frame to reach him. (btw, all other bosses appear to write there own subpix values when spawning) * 5104: It puts Ryu a half-pixel right and he reaches the platform and jumps at frame 5141 instead of 5142. First frame of input on a new screen allows one button press only and on ladder entrances Ryu is actually in the air for that frame. Ryu will also be facing either left or right on this frame, which is what determines whether he can get inside the wall when he jumps or not: if facing right, he'll move 1.5 px right; if facing left he'll simply move 0.5 px right but otherwise climb/wall-jump as normal. *screenshots/randomness: I'm not sure what you mean here. Do you have a movie file that demonstrates it? Cutting down the lantern there should not effect anything, but jumping from the platform and killing the enemy when cutting it down can result in a different enemy subpixel value ($045D in this case), but that just goes back to the same value after killing the jet-ninja around frame 32460. My current WIP finishes in 39119 frames. Turning around at frame 18087 instead of 18088 stops the level timer for 2 frames which allows one second to tick down during the lvl 5 Boss fight, saving three frames. That combined with some enemy sub-pixel manipulation gains back some frames lost to enemy behavior in stage 6, woo.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
I wanna play too.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Here are a few scripts I've made for Ninja Gaiden along with a few questions! After reloading a script a few times emulation slows down, getting progressively worse with successive reloads. Is there something I should be doing differently to prevent this? This one just shows some basic position and speed info and was mainly made as a learning tool, I never actually need to see any of this crap on the game screen.
 local xpix = 0x0086; xsub = 0x0085; ypix = 0x008A; ysub = 0x0087; yspd = 0x0089; screen = 0x00A3; scrnsub = 0x00A2
 local xpos, ypos, scrnpos, yspdd
 local function show_coords()
  yspdd = memory.readbytesigned(yspd)
  xpos = memory.readbyte(xpix) + (memory.readbyte(xsub)/256)
  ypos = memory.readbyte(ypix) + (memory.readbyte(ysub)/256)
  scrnpos = memory.readbyte(screen) + (memory.readbyte(scrnsub)/256)
  gui.text(2,10,"Ryu:" .. xpos)
  gui.text(49,10,"," .. ypos)
  gui.text(205,24,"Y-speed:" .. yspdd)
  gui.text(192,10,"Screen:" .. scrnpos)
 end
 emu.frameadvance()
 gui.register(show_coords)
This is for macro'd 30hz wall-climbing. It could be a bit smarter: interrupting the 'jump, grab, jump...' pattern throws it off, and it doesn't account the different values for which direction Ryu is facing during damage flicker. But it does what it's supposed do to nicely enough.
local qpress,ryuface,ysub
while true do
  qpress=input.get()
  ryuface=memory.readbyte(0x0084)
  ysub=memory.readbyte(0x0087)
    if qpress.Q then
     if ysub == 0 and ryuface == 68 then
      joypad.set(1, {left=1, right=1})
      end
     if ysub == 0 and ryuface == 4 then
      joypad.set(1, {up=1, down=1, left=1}) 
      end
     if ysub > 0 and ryuface == 68 then
      joypad.set(1, {left=1, A=1})
      end	 
     if ysub > 0 and ryuface == 0 then
      joypad.set(1, {left=1, A=1})
      end	 
     if ysub > 0 and ryuface == 4 then
      joypad.set(1, {right=1, A=1})
      end
     if ysub > 0 and ryuface == 64 then
      joypad.set(1, {right=1, A=1})
      end
    end
 emu.frameadvance()
end
This is where the speed thing becomes an issue, since I've been modifying and reloading stuff like this a lot. (in this example i was cycling a not-really-RNG to see which values resulted in ryu getting hit by a tossed ax if he followed a specific path, then writing the value to a .txt file if he did get hit(yeah i know 'attempt' is totally redundant here, but this is just an easily-edited template for the general approach i've been taking to finding if some particular desired outcome is even possible before attempting to manipulate anything))
local attempt = 0
local globtim = 0
local frame = 1
local gothit
results = io.open("NGresults.txt", "w")
NGtest = savestate.create()
savestate.save(NGtest)
while attempt <= 256 do
  attempt=attempt+1
  memory.writebyte(0x00BF, globtim)
  frame=emu.framecount()
   while frame < 20919 do
    frame=emu.framecount()
	gothit=memory.readbyte(0x0095)
	 if gothit == 60 then
	  results:write(globtim,",")
	  end
    emu.frameadvance()
   end
  globtim=globtim+1
  savestate.load(NGtest)
  gui.text(4,10,"" .. attempt)
  gui.text(4,20,"" .. globtim)
end
results:close()
And finally, this grotesquery... It's supposed to, in a pretty basic manner, do what I described in this post. One thing I'm not clear on is why it doesn't update like the show_coords example above.
local bg_obj1 = 0x0300; bg_obj2 = 0x0301; bg_obj3 = 0x0302; bg_obj4 = 0x0303; bg_obj5 = 0x0304; bg_obj6 = 0x0305
local xpos=0; cycle=0
local function view_bg()
 while cycle < 22 do
  Column01A = memory.readbyte(bg_obj1); Column01B = memory.readbyte(bg_obj2); Column01C = memory.readbyte(bg_obj3); Column01D = memory.readbyte(bg_obj4); Column01E = memory.readbyte(bg_obj5); Column01F = memory.readbyte(bg_obj6)
  gui.text(xpos,8,"" .. Column01A); gui.text(xpos,16,"" .. Column01B); gui.text(xpos,24,"" .. Column01C); gui.text(xpos,32,"" .. Column01D); gui.text(xpos,40,"" .. Column01E); gui.text(xpos,48,"" .. Column01F); xpos=xpos+12
  bg_obj1=bg_obj1+6;bg_obj2=bg_obj2+6;bg_obj3=bg_obj3+6;bg_obj4=bg_obj4+6;bg_obj5=bg_obj5+6;bg_obj6=bg_obj6+6;cycle=cycle+1
 end
end
emu.frameadvance()
gui.register(view_bg)
I started writing it with .readbyterange and tables in mind, but then I realized I had no idea what I was doing. Also, displaying it in hexadecimal and with zeroes with the single-digit values would have been ideal, but as someone whose only prior programming experience is some pretty basic BASIC from over a decade ago I'm finding the Lua documentation to be somewhat esoteric. Edit: on IRC amaurea kindly explained string.format, field widths, and how to get zero padding (and some other stuff!), which leaves my only remaining real question about the slowdown issue with multiple reloads. Edit2: It occurred to me that declaring the variables outside the function and then counting them to infinity was kind of moronic, so here's my glorified hex-viewer fixed:
local function view_bg()
local bg_obj1 = 0x0300; bg_obj2 = 0x0301; bg_obj3 = 0x0302; bg_obj4 = 0x0303; bg_obj5 = 0x0304; bg_obj6 = 0x0305
local xpos=0; cycle=0
 while cycle < 21 do
  Column01A = memory.readbyte(bg_obj1); Column01B = memory.readbyte(bg_obj2); Column01C = memory.readbyte(bg_obj3)
  Column01D = memory.readbyte(bg_obj4); Column01E = memory.readbyte(bg_obj5); Column01F = memory.readbyte(bg_obj6)
  gui.text(xpos,8,string.format("%02x",Column01A)); gui.text(xpos,16,string.format("%02x",Column01B)); gui.text(xpos,24,string.format("%02x",Column01C))
  gui.text(xpos,32,string.format("%02x",Column01D)); gui.text(xpos,40,string.format("%02x",Column01E)); gui.text(xpos,48,string.format("%02x",Column01F))
  bg_obj1=bg_obj1+6;bg_obj2=bg_obj2+6;bg_obj3=bg_obj3+6;bg_obj4=bg_obj4+6;bg_obj5=bg_obj5+6;bg_obj6=bg_obj6+6
  cycle=cycle+1; xpos=xpos+12
 end
end
emu.frameadvance()
gui.register(view_bg)
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
So, I've been doing a lot of poking around with RAM lately and realized that enemy sub-pixel values (458-45F=x, 478-47F=y) sometimes get inherited from previously killed enemies, and this explains a lot of the headache-inducing randomness that can get in the way of tight optimization. I haven't found any useful applications for this yet though, other that the few I stumbled onto long ago, mostly by dumb luck (like killing one of the boxers at the end of 1-1 on the wrong frame will make Ryu take an extra frame to reach the boss (also, all of the other bosses seem to write their own values when they spawn, oh well!)), but there is a good chance applying this info can still fix some things in stage 6. Moving on, I'd had the idea that memory relating to the background objects could be read and display something like this: ...and hopefully those elements without a graphical counterpart (and taken advantage of in the published run) would become visible, and maybe other unexpected oddities would appear too. It turns out this stuff is stored in block 3, in columns of six and starting in the upper left, so it could be interpreted like this: |300|306|30C| |301|307|30D| |302|308|30E| |303|309|30F| |304|30A|310| |305|30B|Well, you get the picture. So the hex values for the above picture would then be: |88|00|00|00|00|00|00|00|00|00|D9|00|11|00|00|88| |11|00|00|00|00|00|70|70|00|00|00|00|00|00|00|22| |11|00|00|63|00|00|00|00|00|00|00|00|00|00|00|22| |11|00|00|33|00|00|00|00|00|00|89|70|41|00|00|22| |88|07|07|07|07|07|07|07|07|00|99|00|11|00|07|88| |88|07|00|00|00|00|00|00|00|00|9E|00|11|00|07|88| 07=floor 70=standard platform 11=left wall 22=right wall 99=ladder 89=ladder/platform corner 41=grabbable wall/platform corner 9E=ladder to prev. area D9=ladder to next area FF=to next stage 63=narrow platform, connected to walls on each side 33=opposing walls (this and the above are the same as the signs in stage 1) 80=platform with corners below it 88=non-grabbable wall (with a weird little platform inside if you can get above it) 83=that weird-ass platform in 2-1b There are many more, of course, but that covers the most common ones. Anyway, what I had, perhaps naively, hoped to find was something directly corresponding to what is on screen at any given time, but this doesn't seem to be the case when the game is scrolling. Anyway, none of this really matters much since I couldn't see any evidence of my mystery platforms in memory, or at least why they seem to be in some places and not others. Actually, they're probably everywhere they could be expected, you just can't get inside every wall where they might be.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Brandon wrote:
why not submit?
It does fix some annoying little mistakes that are in the published run, but it also lacks my two favorite damage-boosts from the published run! I think it can be improved some more yet, there are around 20 frames of improvements here that get whittled back by various random crap too. Andandand Stage 6 is hell of sloppy, not that that isn't easily fixed.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Five years later, 33 frames faster.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Here's a c/p of my fceux memory watch file:
47D ?
47E ?
47F ?
C8 ?
C9 ?
CA ?
62 Timer
89 Y_speed
4C8 hourglass/fire
85 X_sub
86 X_pos
XA2 X_pos[scroll]
40A EnemyAtk6
40B EnemyAtk5
40C EnemyAtk4
40D EnemyAtk3
40E EnemyAtk2
40F EnemyAtk1
63 Timer
95 invulnerability
496 EnemyA
497 EnemyB
87 Y_sub
8A Y_pos
47A-F, and maybe C8-A (honestly can't recall why I was watching those), seem to have something to do with this game's frustratingly subtle randomness. "hourglass/fire" and "invulnerability" are frames until those effects end. "EnemyAtk1-6" are frames until an on-screen enemy that can throw something will throw something. Edit: 63 is the level timer and ticks down every time 62 cycles from 60 to 0.
Experienced Forum User, Published Author, Player (151)
Joined: 5/1/2006
Posts: 150
Awesome! Though I don't think it will help in stage 3, (throwing stars should be better here, as seen in this WIP, because using one to get the fire wheel wastes time due to the score tally at the end of the level) and using it with the throwing stars doesn't save (or waste) any time. If a way could be found to get more than one hit out of the fire wheel with that trick it might help. The trick will save at least 2 frames on the first of the final bosses though! The run I linked also shows most of the improvements I've found since the published run, but of course a lot of the gains are later lost due to that damned randomness. Can also save 8 frames by wall-jumping 'deeper' into the wall in 5-3, which freezes the running soldiers/football guys long enough that I don't have to take the hit.