TASVideos

Tool-assisted game movies
When human skills are just not enough

Submission #1673: AnS & Randil's NES Darkwing Duck in 10:59.5

Console: Nintendo Entertainment System
Game name: Darkwing Duck
Game version: USA
ROM filename: Darkwing Duck (U).nes
Branch:
Emulator: (unknown)
Movie length: 10:59.5
FrameCount: 39570
Re-record count: 94129
Author's real name: Андрей Стребков & Johan Södling
Author's nickname: AnS & Randil
Submitter: Randil
Submitted at: 2007-08-23 11:17:42
Text last edited at: 2010-11-12 15:43:39
Text last edited by: feos
Download: Download (4050 bytes)
Status: published
Click to view the actual publication
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:

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:

Level Old movie New movie
Wolfduck 48 frames 16 frames
Quacker 21 frames 1 frame
Liquidator 25 frames 0 frames
Moliarty 46 frames 30 frames
Megavolt 38 frames 4 frames
Bushroot 6 frames 2 frames
Beak 54 frames 0 frames
Total 238 frames 53 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.


Similar submissions (by title and categories where applicable):