Darkwing Duck TAS by AnS & Randil

This run is 2141 frames (35.68 seconds) faster than the currently published run of this game. A lot of things count for the improvement, such as a new route, better use of arrows, faster boss fights, lag-reduction, and more. More details can be found under the "Improvements" section below.
  • Emulator used: FCEU 0.98.16
  • Aims for fastest possible time.
  • Takes damage to save time.
  • Manipulates luck.
  • Abuses programming errors in the game.

New tricks:

  • Constant jumping all the way - actually it's needed always, not only after first jump (as explained in current movie description), but from the first frame when you're able to control DW. Darkwing waits 4 frames not after landing, but before walking
  • Strategically using arrows to hit hidden enemies/bosses below DW, or to deliver double damage (-6HP means instant kill for most of them) with single arrow
  • Taking damage while being ejected from a wall (usually spikes) - this way you don't lose control for dozen of frames
  • Shooting last frame before catching bottom of platform/hook (and releasing A button in that frame). This way you can press A again next frame - 1 frame earlier to make next jump!
  • Abusing object collisions to quickly eject DW up - frequently used with arrows and platforms, at some cases this even helps to skip catching bottom of platforms)
  • Abusing background collisions to get stuck in a wall and eject DW forward (Megaman-like wallzipping) - very difficult to achieve, strongly connected with subpixel coordinates and vertical acceleration. Used only once, with little effect (frames 25757-25762)
  • Abusing collision detection bug: falling arrow can hit enemy on the top of screen (see Moliarty tower)
  • Reducing lag and rearranging unavoidable lag to get some indirect benefit - with LagMeter tool it was quite easy, although little tedious
  • Jumping up before the game realises you're standing on air (intro scene at Bushroot battle, just frame-perfect input)
  • Taking damage at the moment when boss dies - helps to jump down quickly, instead of waiting for automatic movement (see Bushroot battle)
  • Managing health by manipulating refill drops just in time (Liquidator level)
  • Manipulating boss to die near the bottom of screen, so that it doesn't need to fall all the way down (Megavolt battle, seems impossible in Bushroot case)
  • Heavy subpixel optimization for creating perfect collisions with background landscape (was put in practice only after 4th level) - nfortunately, even huge amounts of rerecords can shave only few frames per level

Lag-comparison table:

Lag comparison Table:
LevelOld movieNew movie
Wolfduck48 frames16 frames
Quacker21 frames1 frame
Liquidator25 frames0 frames
Moliarty46 frames30 frames
Megavolt38 frames4 frames
Bushroot6 frames2 frames
Beak54 frames0 frames
Total238 frames53 frames

AnS' comments:

At the beginning of the year I was involved in little Darkwing Duck ROM hack project, so I learned a lot about the game structures. But somehow I didn't think about obsoleting old Famtasia movie here, mostly because Walker Boh's movie looked very solid, and I don't like obsoletions that are less than 10 seconds improvements.
Then, after some forum discussions Randil PM'd me and asked about teaming up, so here we are.
To say the least, it was very interesting experience. Randil makes challenging WIPs, and it was fun to search for improvements in runs that seem unimprovable at first.
From the very beginning I knew that the game can provide more arrows than we can use, so I never traded time for item drops, instead I frequently used 2-3 arrows (6-9 points) even for 1-frame timesaver.
At first I though that final record was gonna be 11:05+, but after discovering several big timesavers (like Bushroot battle) a little hope to cross 11 minutes mark has appeared.
Then I revised my old Choujin Sentai TAS and thus learned about subpixel optimization (plus became even more obessed with polishing up things). Because first three levels of DW run were made without this knowledge, I think the submission can be improved by more than dozen of frames. Plus, today I know how to reduce lag in third level even more. Also there still may be something we didn't notice. For example, there may be some other way to get stuck inside a wall, or whatever.
Right now I'm little tired of the game, so I don't think I'll be improving the run in observable future. How about you, Randil? ;)

Lag Counter Tool:

In this project we used rather interesting way to deal with in-game lag.
When Randil started tasing 1st level (Liquidator's sewers), he searched if there's strict memory address to determine moments of lag. Of course each game has RAM values that can be used as lag indicators, but it would be much better to have lag counter instead of just indicator. When the game carefully keeps track of all frames with lag, you can see whole picture, and on such "macro level" you'll be able to act strategically, and to find solutions that were much less obvious on micro-level.
At first sight, it's not really difficult to notice lag without tools, and even remember quantity of lagframes within some period of gameplay. But it's much harder to remember such quantities for each of, say, 10 input strategies, and it's even more impossible to analyze differences between these 10 fragments and to find key factors.
If humans had perfect memorizing ability, they could easily manipulate lag on macro level without tools. But that's not the case, so here's the receipt we used for handling lag in Darkwing Duck:
  • 1st part is lag Counter - simple counter which increases every time when there's frame of lag.
  • 2nd part is counter Storage. It's important (if not critical) to store lag counter somewhere in savestate, so that it will be automatically saved and loaded alongside with savestate. Not only it frees TASer from wasteful actions, but also it's very important to assotiate particular state of the counter with unique state of game. (helps to compare things and to find best input, just like with luck manipulation)
Oh well, too much theory. As clear from part2, implementing such tool on emulator level would bother with current FCM format, so I inserted this tool inside game code (also at first I didn't beleive this tool can really help much, and that was single trial).
According to my modifications, lag counter was stored in unused RAM address, NMI handler was constantly increasing this value, while joystick read subroutine was constantly decreasing it. When there's no lag, lag counter value (observed through Memory Watch) shouldn't change.
So! in fact, this whole movie was recored with hacked ROM, but as the hack was pretty accurate, it wasn't too difficult to make movie that syncs with both original and modified ROM. Well, there were two cases of desync, but that's even less than I expected (emulation is emulation, after all).
Everything was initiated with Randil inspiring me with idea of some natural lag counter being made by game developers for us. :) Using LagMeter ROM, we saved 185 frames of lag (comparing to currently published movie). That's 3 solid seconds of freezed picture! Seems, this tool really worked good.
I hope in future we'll have similar tool implemented in FCEU. You can read some more info about my dreamtool here.

Randil's comments:

This was one very long project. I started this somewhere in April, almost exactly 4 months from now, so this was a long project. After doing a testrun, AnS appeared and showed in-depth knowledge of the game, as well as quite a few new tricks. I asked him to help me out on this, which was a good choise - it turned out that AnS was awesome on TASing this game, and it was much thanks to him that it's as optimized as it is.
Personally, I TASed this game as I TAS most games - frame by frame, constantly looking at memory watcher. I had memory watcher full of addresses this time, and I also optimized subpixels. This wouldn't have been possible at all without memory watching.
Although I started this project, AnS did most work on this run, so I'm putting him as main-author and myself as co-author.
All in all, I don't think I've ever worked so hard to frame perfect a game, only to see AnS improve it even more. :) It's not perfect though, since we found ways to improve the first few levels by a few frames. But neither of us feel like redoing it for those frames anyway, so we'll let it be. To put things short, here we have a very optimized run, which I'm proud of being part of.

NesVideoAgent: Hi! I am a robot. I took a few screenshots of this movie and placed them here. Here goes! Feel free to clean up the list.



TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15601
Location: 127.0.0.1
This topic is for the purpose of discussing #1673: AnS & Randil's NES Darkwing Duck in 10:59.50
Skilled player (1605)
Joined: 6/11/2006
Posts: 818
Location: Arboga, Sweden
Woho finally :D Yes yes very much yes :D
Warp wrote:
omg lol this is so fake!!!1 the nes cant produce music like this!
Emulator Coder, Former player
Joined: 10/2/2005
Posts: 563
Location: Toronto, Ontario
All I can say is WOW :) DWD was one of my favourite runs on this site and your improvement is far beyond what I thought was possible for this game. Two huge thumbs up Randil. You just keep setting the bar higher :D Edit: Three thumbs up to Ans. Sorry for not giving you props in the original post :P
Skilled player (1827)
Joined: 4/20/2005
Posts: 2161
Location: Norrköping, Sweden
Maximus wrote:
All I can say is WOW :) DWD was one of my favourite runs on this site and your improvement is far beyond what I thought was possible for this game. Two huge thumbs up Randil. You just keep setting the bar higher :D
You should note that it was AnS who did most of the work here, so you should give a big thumb up for him, and a smaller thumb up for me. But thanks anyway. :)
Skilled player (1410)
Joined: 5/31/2004
Posts: 1821
Hadn't seen the previous movie, but this is very nice. Great job :)
Active player (437)
Joined: 4/21/2004
Posts: 3517
Location: Stockholm, Sweden
Yes vote. Solid performance. Nice work Ans and Randil.
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
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3574)
Joined: 11/3/2004
Posts: 4754
Location: Tennessee
This is a masterful piece of work. It is literally what a good TAS should be striving for. There is so much happening here. Evening the simplist run and shoot events are happening in the context of constant jumping, subpixel management, lag management, and extreme luck manipulation. My favorite level was the 3rd one. It was a massive slaughter. Carnage everyhwere. And of course gas cansiter drops falling constantly. This gets a 10 in entertainment for me.
It's hard to look this good. My TAS projects
Senior Moderator
Joined: 8/4/2005
Posts: 5777
Location: Away
I'm so voting yes on this! Simply excellent.
Warp wrote:
Edit: I think I understand now: It's my avatar, isn't it? It makes me look angry.
Joined: 2/1/2007
Posts: 245
Location: Israel
I really enjoyed the run, though I'm embarrassed to say that I don't think I've noticed the similarities to the Megaman games before now. Anyway, voting yes.
Joined: 12/28/2004
Posts: 210
I don't know if you were jumping on beat to the songs or if it was just in my head. Either way, the entire run was a huge surprise. Yes vote.
Player (21)
Joined: 10/14/2005
Posts: 317
Looks good. Great work guys.
nesrocks
He/Him
Player (246)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Clever movie, there's always a lot going on, I like the game's graphics and music and I loved the dancing! So yes. About submission text: I'm impressed, Ans. I wish you best of luck with your tool!
Player (89)
Joined: 11/14/2005
Posts: 1058
Location: United States
Great run. I really enjoyed the jumping matching the timing of the music. Nicely done AnS & Randil.
They're off to find the hero of the day...
Morrison
He/Him
Former player
Joined: 8/2/2006
Posts: 195
Location: USA
Job well done!
twitch.tv/Retrogaming2084
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15601
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. ---- [951] NES Darkwing Duck by AnS & Randil in 10:59.50
Player (88)
Joined: 1/15/2006
Posts: 333
Location: Bangkok, Thailand
I was quite entertained. I even laughed during the boss battle at around 4:30. The levels and bosses seem very tightly optimized as well. Great work.
print reduce(lambda x,p:p/2*x/p+2*10**1000,range(6643,1,-2))
Site Admin, Skilled player (1255)
Joined: 4/17/2010
Posts: 11486
Location: Lake Char­gogg­a­gogg­man­chaugg­a­gogg­chau­bun­a­gung­a­maugg
Suddenly, HD encode! Link to video
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 (1918)
Joined: 11/14/2009
Posts: 1353
Location: 𝔐𝔞𝔤𝑦𝔞𝔯
According to many year old notes of mine, this TAS can be improved at the very beginning of the 1st level by 1 frame. I only have "optimized movement" as details, but I remember the powerup should be within this time save, so the improvement is located between jumping on the first pipe and picking up the powerup.
PhD in TASing 🎓 speedrun enthusiast ❤🚷🔥 white hat hacker ▓ black box tester ░ censorships and rules...