1 2
8 9 10 11 12 13
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
feos wrote:
As for myself, I will debug enemy spawn time and position. Will be obvious why.
The time of finishing 2-3 boss alters it (boss has 6th slot like knife throwers). Should be a good place to test spawn differences. Notes on my WIP? (I think boss 2-3 is now perfect, and I tried a lot of variations for 2-2 last screen, but none of them was better, I had very good half pixels and luck for my test run =) ) edit: but not good enough User movie #14043550826460899
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
This function (add it to whatever framely function you run) will read object configs for the current room and show all that will be used. First line is at what block it will spawn. Second line is position: left nibble is Y, right nibble*15 is X. Third line is ID. When the screen is at the same block where there is an object in config, it will get colored in green. Note that once the screen is at that block, the new object instantly spawns. Under the "ENEMY" there is a display of the current block. But it's tricky. Subpixel (third value) is normal, pixel (middle value) is ANDed with 0xF (showing only the right nibble). One would assume that block number increases whenever pixel overflows, but nope. After pixel overflows, there's an interrupt, loading the new block set into RAM. So the value is written to the current block only after that interrupt.
Language: lua

function Spawns() local SubCur= memory.readbyte(0x50)/25.6 local PosCur= AND(memory.readbyte(0x51),0xF) local BlCur = memory.readbyte(0x4E) local Blptr = memory.readword(0x96) local Yptr = memory.readword(0x98) local IDptr = memory.readword(0x9A) local Count = memory.readbyte(0xB4) local Interrupt = AND(memory.readbyte(0x4C),0x40) if (memory.readbyte(0x1FC) == 0x87) then for i = 0,Count-1 do block = memory.readbyte(Blptr+i) ypos = memory.readbyte(Yptr +i) id = memory.readbyte(IDptr+i) if (block == BlCur) then color1 = "green" else color1 = "white" end if (Interrupt > 0) then color2 = "red" else color2 = "#44ffffff" end gui.text(i*16%256+1,57+math.floor(i/16)*30, string.format("%X\n%X\n%X",block,ypos,id),color1) gui.text(128,49,string.format("B: %X.%02d.%d",BlCur,PosCur,SubCur),color2,"#000000ff") end end end
Will figure out the spawn differences tomorrow.
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.
Player (153)
Joined: 5/1/2006
Posts: 150
Looks like you've got $B4 in there, but no $B5. B5 cycles through some values at preset increments for each stage, and is compared to B4 to determine if an enemy spawns, which I think can be up to three or so frames difference in stages with a lot of objects. This is also why, for example, saving or losing a frame before a stage (only $BF affected) or during a stage ($B5 and $BF affected) get different results.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
$B5 is an iterator. It rolls through all units that are available for the given room, and compares their spawn blocks with the current block. This way, the order in configs doesn't matter, it may load unit 15, then unit 5, then unit 80, if that's how many units are available for that room, and the current block picks them up in that order. But what's interesting, it increments only by 8 each frame. Which means, you can delay object spawns by a frame or more, depending on how the total amount of room spawns divides by 8. Throughout the game, it's never more than 30, and varies all the way. Most importantly - this may need manipulation only with enemies that force you to lose frames, otherwise not, since all manipulation is done by delaying your progression. So each enemy that delays you, must be checked on whether it would save time to delay its spawn (which is possible to do by 0-3 frames, depending on the room). Updated the function. The spawn will occur when the current block matches the unit block from config AND iterator rolls though those 8 units.
Language: lua

function Spawns() -- feos, 2014 -- uncovers which spawns will occur per frame local SubCur= memory.readbyte(0x50)/25.6 local PosCur= AND(memory.readbyte(0x51),0xF) local BlCur = memory.readbyte(0x4E) local Blptr = memory.readword(0x96) local Yptr = memory.readword(0x98) local IDptr = memory.readword(0x9A) local Count = memory.readbyte(0xB4) local Iterator = memory.readbyte(0xB5)-8 local IteratorLast = memory.readbyte(0xB5)-1 while (Iterator < 0) do Iterator = Count+Iterator end if (IteratorLast < 0) then IteratorLast = Count+IteratorLast end local Interrupt = AND(memory.readbyte(0x4C),0x40) if (memory.readbyte(0x1FC) == 0x87) or (memory.readbyte(0x1F3) == 0xD8) then for i = 0,Count-1 do local color1 = "white" local block = memory.readbyte(Blptr+i) local ypos = memory.readbyte(Yptr +i) local id = memory.readbyte(IDptr+i) local x = i*16%256+1 local y = 57+math.floor(i/16)*30 if (block == BlCur) then gui.box(x-1,y-1,x+12,y+23,"#00ff0088") end if (i+1 >= Iterator) and (i+1 < Iterator+8) or (i+1 < Iterator+8-Count) then color1 = "#ffccaaff" end if (Interrupt > 0) then color2 = "red" else color2 = "#44ffffff" end gui.text(x,y,string.format("%X\n%X\n%X",block,ypos,id),color1) gui.text(108,41,string.format("Block: %X.%02d.%d\nIterator: %02d-%02d/%d", BlCur,PosCur,SubCur,Iterator,IteratorLast,Count),color2,"#000000ff") end end end
Whole script: http://pastebin.com/48RmPqJR
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
I've tried to put delays randomly, but I need much more delays now with my fastest one. So I'm going to continue with the wrong one and upload it once I polish it.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Sometimes it will kill some improvements. For example the thing where it all started: I'm 1 pixel ahead of you after the first bat in 2-2, but I get worse spawn of the warrior. I delay myself by half-pixel - no luck. I delay half-pixel more - and my time matches yours. Half-pixel more - and I'm behind again. You got very lucky with not perfecting the bat damage boost, and that all got discovered. But now we'll need to check several half-pixel delays each time something similar happens...
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.
Player (153)
Joined: 5/1/2006
Posts: 150
Don't forget you can use the interrupts to manipulate stuff without losing time during some wall jumps and when jumping from the first platform at the start of 4-3d and 6-2e.
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Oh, I forgot! MESHUGGAH: use Marx's last WIP for level 3. Marx: you may redo the later levels while we are shaving the earlier ones.
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
feos wrote:
MESHUGGAH: use Marx's last WIP for level 3.
Link?
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
edit: WIP22: User movie #14115623151560684
feos wrote:
http://tasvideos.org/userfiles/info/4225147722799884
My WIP21 22 2-2 last screen is ~22+4 frames faster, 3-1 is 5+6 frames faster, 3-2 is 12+13frames faster. Most of the tricks can't be reimplemented (mostly because of knife throwers).
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Regarding "that one thing where you pass through an enemy or grab a power-up and graphics glitch out for a frame" on Wiki: GameResources/NES/NinjaGaiden: I believe it's a lag frame thing which probably doesn't gets a lag flag (but it should I think). I've tried different half pixels with and without losing time, but none of them were "more favorable" than current ones from 1-1 to 2-2 2nd screen. Moving on, editing this post later when found/did something. edit1: the "luck destroyer" RWJ improvement for 2-2 2nd screen saves 1 frame but gives much worse 7th slot enemies (which we need to manipulate and impossible to do it before next screen 2nd enemy without losing this improvement). Remanipulating good luck later (on next screen) will lose a frame because then it's impossible to remanipulate both the soldiers' and bullets positions... so I'm going to test some delays and half pixels before 2-2. edit2: looks like impossible to resync with that 1 frame improvement because of timing dependent knife throwers. Going to optimize from 2-2 last screen to few levels into stage 4. linky: http://docs.google.com/spreadsheet/ccc?key=0AjzBXzk5TnLYdE8ybHpRZTFVNWI4bEZwWTFqZ0I0Y1E&usp=sharing
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
I missed some point. Are you already trying those delays that can be added whenever the enemy holds you back? Because if you are making the test-final whole run, to check for tiny improvements, it's one thing, and I can do that while you're redoing the whole game now. But if you already did it all, I dunno how I can help at all, you're a tougher TASer. Yeah, I was largely distracted by the branching thread, but still. Also, if you appear to make it finally perfect, do you want the submission to mention you first? Or my contribution and the initial flow matters more? Or you don't care?
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
I tested from 1-1 through 3-1 end:
    * half pixel differences at different times for sub slot manipulation and spawn manipulation * frame delay at different times (same as above) * route changes
I've documented on the above linked google drive spreadsheet's "delay route" page. What would save me time is obviously a hitbox lua (mostly for easier missile guy manipulations) and commenting on my WIPs route. Yes, I don't care about TASer's name order/authorcoauthor. edit2: last WIP (28): User movie #14199772614626834
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
ars4326
He/Him
Experienced player (776)
Joined: 12/8/2012
Posts: 706
Location: Missouri, USA
The run looks very smooth! I like how you were able to manipulate a lot of the (for lack of a better word) 'softer' hits when jumping on enemies. I remember only rarely seeing those back when I played the game on console.
"But as it is written, Eye hath not seen, nor ear heard, neither have entered into the heart of man, the things which God hath prepared for them that love him." - 1 Corinthians 2:9
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Pasky13 made hitbox lua for NG1. It's not perfect, but it works. Do you want me to try make a new one?
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
feos wrote:
Pasky13 made hitbox lua for NG1. It's not perfect, but it works. Do you want me to try make a new one?
Yes, I would like to ask you to do it (edit: ryu and enemy hitboxes lua). I will recheck everything again from start to make sure early improvements are unimprovable once you made it.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Mostly copied from Pasky13's script. Do you really need all the messy sword+boss hitbox stuff? Didn't do it yet.
Language: lua

Xrads = {0x0A,0x0A,0x14,0x0A,0x0A,0x10,0x10,0x0A,0x14,0x14,0x0A,0x0C,0x0C,0x0C,0x0C,0x14, 0x14,0x14,0x14,0x0C,0x0C,0x14,0x14,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0C,0x0A,0x0A,0x16,0x16,0x16,0x0C, 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0C,0x0A,0x0A,0x0A,0x0A,0x14,0x0A,0x14,0x14,0x14,0x14,0x0A,0x0A,0x0A, 0x0A,0x0A,0x14,0x14,0x0A,0x0A,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x1C,0x18,0x0A,0x0A, 0x0A,0x0A,0x1C,0x1C,0x1C,0x1C,0x18,0x18,0x0C,0x14,0x14,0x14,0x0C,0x10,0x10,0x18,0x18,0x18,0x18,0x18, 0x10,0x10,0x10,0x0C,0x10,0x18,0x10,0x18,0x00,0x10,0x18,0x18,0x1C,0x20,0x20,0x1C,0x1C,0x10,0x10,0x10, 0x10,0x10,0x10,0x0C,0x00,0x00,0x00,0x00,0x18,0x18,0x10,0x10,0x10,0x10,0x18,0x10,0x1C,0x10} Yrads = {0x18,0x18,0x18,0x10,0x10,0x18,0x18,0x28,0x18,0x18,0x20,0x10,0x10,0x10,0x10,0x10, 0x10,0x10,0x10,0x08,0x04,0x08,0x08,0x18,0x18,0x18,0x18,0x10,0x10,0x08,0x18,0x18,0x18,0x18,0x18,0x08, 0x08,0x08,0x18,0x18,0x18,0x18,0x08,0x08,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x10,0x18, 0x18,0x18,0x18,0x18,0x18,0x18,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x28,0x28,0x28,0x28,0x28,0x28,0x28, 0x28,0x28,0x18,0x18,0x18,0x18,0x28,0x38,0x08,0x14,0x14,0x20,0x08,0x08,0x08,0x38,0x38,0x38,0x38,0x38, 0x63,0x48,0x08,0x18,0x08,0x10,0x08,0x10,0x00,0x08,0x38,0x38,0x18,0x38,0x38,0x48,0x48,0x08,0x08,0x08, 0x08,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x38,0x38,0x08,0x08,0x18,0x18,0x18,0x18,0x18,0x08} function Hitboxes() for slot = 0,7 do local RyuYrad = memory.readbyte(0x90) local RyuX = memory.readbyte(0x86) local RyuY = memory.readbyte(0x8A) local Active = AND(memory.readbyte(0x73),memory.readbyte(0xE66F+slot)) if (Active > 0) then local Mov = memory.readbyte(0x438+slot) local X = memory.readbyte(0x460+slot) local Y = memory.readbyte(0x480+slot) local Xrad = Xrads[Mov+1] local Yrad = Yrads[Mov+1] gui.box(X-Xrad,Y-Yrad,X+Xrad,Y,"#00ff0050") end gui.line(RyuX,RyuY,RyuX,RyuY-RyuYrad,"#00ff00ff") end end
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Hitbox lua seems more than enough for my purposes. I had enough luck to remove the magical delay before 2-1 first black screen by adding it before the first Tyson (edit: and removing 1 empty frame for 2nd Tyson) which also manipulated the guardian of ladder Tyson. Adding the 1.0px RWJ improvement to 2-2 second screen and sacrificing 1.0px after the bird let me to save 2 frames overall before 2-3 boss. Will edit post once I resynced/reoptimized as far as I can (currently need to remanipulate subposes for 3-1 fast recovery to platform from dog without that idiot knife thrower walking too close to us). edit: currently a bird doesn't leave the screen 3-2 User movie #14376570241371213 edit2: magically fixed and improved (yes, it was subpos problem) User movie #14488312589394167
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Player (153)
Joined: 5/1/2006
Posts: 150
Thought I should mention that the sword-guy at the end of 3-2 can be jumped over from the high platform with the right values for $B5 and Ryu's position. For various reasons it isn't useful for any%, but pacifist should give ample opportunity for the needed manipulation, though I can't say if it would save time without testing.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Scumtron: nope, we have a bird there Don't hesitate to write if you see or think of any bizarre thing that would manipulate anything. Currently I highly optimized a lot of things, mainly the subpositions (both X and Y subs for enemies), recoveries and positioning (hitbox lua + interrupt juggling) and compared routes with different half pixels. edit: latest wip, 2 frames saved User movie #14507550577629635
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
Tried various different positioning for 3-2 green soldier - bird - ladder - sword guy - missile guy, but the improvement always lost due to "random characters" lag frame or much worse missile guy positions. Currently the dog at 4-1 follows us. If I sacrifice 1.5px, the missile guy sits on the corner... is the dog timer dependent, feos?
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
You mean, why does it sometimes turn back?
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.
MESHUGGAH
Other
Skilled player (1917)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
feos wrote:
You mean, why does it sometimes turn back?
Yes. I need to remanipulate that so I can dodge the missile guy and move onward but with current improvements, I need to sacrifice 1.5 px before it's only works so far after the dog spawned on 4-1 after 1st knife thrower. Probably I will try to add a magical delay before levels and see if I can find something.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...
Site Admin, Skilled player (1251)
Joined: 4/17/2010
Posts: 11475
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
It seems to depend on the same thing that makes Ryu freeze for 1 frame when jumping onto corners. If the leopard hits the red block while his forward BG collision hitbox if far enough into that ejecting block, he will run over it. If he jumped into its beginning, he will turn back. $488 - BG collisions address. 0 - in air. 30 - normal ground. 20 - farther half of the red block, keep running. 70 - closer half of the red block, run back. So you need to try spawning him at different screen positions (spawns+interrupts) and make run into that red block somewhere.
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.
1 2
8 9 10 11 12 13