Emulation details

  • Emulator: FCEUX 2.5.0
  • Region: NTSC
  • PPU: Old PPU
  • RAM Initialisation: Default
  • ROM Checksum: 1af3892e97a8253784778e0d3a190d83
  • ROM Name: Darkman (USA)

Movie objectives

  • Aims for fastest completion.
  • Aims for highest score in autoscroller levels
  • Takes damage to save time
This movie is a 1405 frames (23.38s) improvement over the current publication. A breakdown of this timesave is given below.
StagePreviousNewSavedTimesave
Introduction69169010.01s
Warehouse 197997540.07s
Warehouse 2100410040-
Warehouse 315951553520.87s
Photography - Pauley152012842363.93s
Park 11442143840.07s
Park 21386137880.13s
Park 312871211761.26s
Helicopter 1293129310-
Photography - Skip152512812444.06s
Carnival 11075107140.07s
Carnival 2136311711923.19s
Carnival 31159115540.07s
Photography - Smiley152412882363.93s
Chinatown 1119611960-
Chinatown 211071075320.53s
Chinatown 314791435440.73s
Helicopter 2231523150-
Photography - Durant153212882444.06s
Construction 1136313630-
Construction 2146914690-
Construction 317761764120.20s
Construction 422252213120.20s
Total3392332518140523.39s
Frame counts are based on the final lag frame before the next level, except in the case of Construction 4, where we use the final input of the movie.
StagePrevious (cumulative)New (cumulative)Saved (cumulative)Timesave (cumulative)
Introduction69169010.01s
Warehouse 11670166550.08s
Warehouse 22674266950.08s
Warehouse 342694212570.95s
Photography - Pauley578954962934.88s
Park 1722169242974.94s
Park 2860783023055.07s
Park 3989495133816.34s
Helicopter 112825124443816.34s
Photography - Skip143501372562510.40s
Carnival 1154251479662910.47s
Carnival 2167881596782113.66s
Carnival 3179471712282513.73s
Photography - Smiley1947118410106117.65s
Chinatown 12066719606106117.65s
Chinatown 22177420681109318.19s
Chinatown 32325322116113718.92s
Helicopter 22556824431113718.92s
Photography - Durant2710025719138122.98s
Construction 12846327082138122.98s
Construction 22992228541138122.98s
Construction 33169830305139323.18s
Construction 43392332518140523.38s
Frame counts are based on the final lag frame before the next level, except in the case of Construction 4, where we use the final input of the movie.
StagePreviousNewSavedTimesavePrevious (cumulative)New (cumulative)Saved (cumulative)Timesave (cumulative)
Introduction69169010.01s69169010.01s
Warehouse 197997540.07s1670166550.08s
Warehouse 2100410040-2674266950.08s
Warehouse 315951553520.87s42694212570.95s
Photography - Pauley152012842363.93s578954962934.88s
Park 11442143840.07s722169242974.94s
Park 21386137880.13s860783023055.07s
Park 312871211761.26s989495133816.34s
Helicopter 1293129310-12825124443816.34s
Photography - Skip152512812444.06s143501372562510.40s
Carnival 11075107140.07s154251479662910.47s
Carnival 2136311711923.19s167881596782113.66s
Carnival 31159115540.07s179471712282513.73s
Photography - Smiley152412882363.93s1947118410106117.65s
Chinatown 1119611960-2066719606106117.65s
Chinatown 211071075320.53s2177420681109318.19s
Chinatown 314791435440.73s2325322116113718.92s
Helicopter 2231523150-2556824431113718.92s
Photography - Durant153212882444.06s2710025719138122.98s
Construction 1136313630-2846327082138122.98s
Construction 2146914690-2992228541138122.98s
Construction 317761764120.20s3169830305139323.18s
Construction 422252213120.20s3392332518140523.38s
Frame counts are based on the final lag frame before the next level, except in the case of Construction 4, where we use the final input of the movie.

Comments

Many of the improvements in this movie come from a better understanding of when objects spawn, and the properties that are carried over between them. The latter was already used (somewhat by chance) in the current publication, such as at the end of Warehouse 3, but a few more applications were found. The former was mainly helpful for small optimisations, where the limiting factor was an object's position rather than that of the player.
The game has 9 object slots, but only the first 8 are often used in gameplay. The 9th is reserved for the players bullets (when appropriate) or when many enemies are loaded in photography levels. Many of the memory addresses related to them are stored in blocks. Some of the most important ones are in the table below.
AddressLengthDatatypeDescription
$00B7-$00BF, $00AD-$00B51 ByteSigned, UnsignedObject X (256 pixels, pixel)
$00CB-$00D3, $00C1-$00C91 ByteSigned, UnsignedObject Y (256 pixels, pixel)
$00D5-$00DD1 ByteUnsignedObject action timer
$03C3-$03CB1 ByteUnsignedObject ???
$03B9-$03C11 ByteUnsignedObject state
The other general improvements were a better understanding of frame rules. These are determined by a frame counter $0021 from the start of the level, which does not get reset at the start of helicopter or photography levels. Usual levels have a 4 frame rule if no potion is collected, and a 32 frame rule otherwise.

Stage-by-stage comments

Introduction

1 frame is saved by starting the game with B+down instead of A+down, allowing the cutscene to be skipped (which may only be done with A) 1 frame earlier.

Warehouse

  • Warehouse 1 - 4 frames saved by avoiding the potion on the rope (to force a 4 frame frame rule) and more optimised movement. In particular, the moving platforms were spawned on frames so that they could be mounted as early as possible, and give the most time in the air for uncapped speed (see the game resources page for more details on the physics in the game).
  • Warehouse 3 - 52 frames saved. Most objects either don't make use of Object ??? (I would refer to it as state, but the given state address acts more like an object state) or initialise it on object load. One of the few exceptions are the balloons in the warehouse stages. When Object ??? is zero, the balloons rise as normal, and otherwise turn into a falling potion. Coincidentally, many objects use Object ??? for their direction of travel, so if a balloon loads into a slot that previously had an enemy that despawned or died while walking left, it will turn into a falling potion.

    The first balloon is loaded as object 7, and its Objecct ??? is carried over from the first enemy in Warehouse 1 as in the current publication. Previously, we had to wait for the balloon over the rope, but killing the first enemy in the stage makes it turn into a falling potion on first spawn, allowing us to pass it. The other main improvement in this level is avoiding the potion by jumping over an enemy and getting them to hit us in the right direction. The final balloon, as in the current publication, inherits potion falling state by waiting for a few frames before despawning the previous balloon.

Park

  • Park 1 - 4 frames saved via more optimised movement. We take the lower route through the latter half of the level, as it is on faster ground (3 pixels/frame instead of 2; again see the game resources page). We manage to save 4 frames despite taking the potion, as the current publication does not.

    There are also potionless routes of the same speed - either with a more optimised version of the route taking in the current publication, or (1 frame faster) via a precise jump over the potion on the faster ground in the second half of the stage. We opt for the version with a potion, as we will need the HP in the later park levels to avoid dying. For similar reasons, the movement near the saw at the beginning of the stage was made slightly suboptimal to lose less HP, but this does not lose any time due to the frame rule.
  • Park 2 - 8 frames saved via optimising for object spawns when objects have to be waited for.
  • Park 3 - 76 frames saved. A small amount of this is via slight optimisations to movement and the wait for the bullet near the beginning. Most is due to a precise jump to avoid the ladder - this is much more precise than it looks, as the hitbox for the ladder extends quite far down, and the edge of the ground pushes you away. However, a jump from further away allows enough speed to be kept for the 'exclusion zone' at the edge to be avoided. As a result, we are forced to take much more damage from the saws, and as a result of the extra HP gained in Park 1, we survive with 0HP.

    The boss attacks on a 4 frame frame rule, with the large slide on the first hit allowing the level end zone to be reached while the boss still has 3HP. However, this slide is only possible on certain frames of the 4 frame cycle.

Carnival

  • Carnival 1 - 4 frames saved by waiting a few frames to avoid the potion by jumping over the clown.

    Unlike the balloons in the Warehouse stages, the blue balloons in the Carnival stages reinitialise Object ??? on object spawn. I have a vague memory from the creation of the first movie that one of them at the very end of the level was in my way in one attempt but not in another, but I had no success in replicating it. From my understanding of how despawning works, I don't believe it possible. My best guess is that at that time I was too slow to pass the penultimate balloon, and it was based on the final balloon spawning depending on where I waited for the penultimate balloon to rise.
  • Carnival 2 - 192 frames saved by making it up close and personal with the boss. A very precise jump allows us to jump onto the platform that the boss is on and shoot from point-blank range - this is so precise since colliding with the boss kills you in one hit, and your shots give you a lot of knockback towards the edge. Since only one bullet is allowed to be spawned at any point, this saves a lot of time. Furthermore, the knockback on the boss allows you to reach the level end zone while the boss has 1HP.

    Slowing down to avoid the potion after the rotating platform also put the clown just before the boss in a position to be knocked off the edge in 1 hit, saving a lot of time.
  • Carnival 3 - 4 frames saved by better movement. These are essentially lost due to a 16 frame rule in the following photography level.

Chinatown

  • Chinatown 1 - Although no frames were saved, we originally saved 8 frames due to more optimised movement. However, it saves more time to instead lose these 8 frames to prepare object timers by manipulating the slots various objects spawn in for the next level.
  • Chinatown 2 - 32 frames saved. Without the manipulations in Chinatown 1, I couldn't find a way to save this frame rule - there is a shuriken thrown that forces slower movement. In the movie, this is thrown by a ninja loaded into slot 6, which usually has its timer set to a very low value by a time bomb in Chinatown 1. By slowing down, we keep the spike in slot 7 onscreen, which forces a bullet to be loaded into slot 6. This sets the timer for slot 6 much higher, allowing the fastest movement through Chinatown 2, saving the 32 frame rule.

    The slots that objects are loaded into in Chinatown 2, such as the important ninja, are affected heavily by a shuriken thrown by a ninja in slot 3. This also has a timer set by a bullet in Chinatown 1, and we slow down sufficiently that we don't get hit by the shuriken and the later ninja spawns in slot 6 as desired. If this doesn't happen, it is spawned in slot 8, which necessarily has its timer set by a time bomb early on in Chinatown 2, with the same detrimental effect.

    It is also possible to complete the level without getting any potions, by a precise jump up from the bottom platform at the end of the level. However, this loses 20 frames to this 32 frame rule, and since we only lost 8 frames for the manipulation in Chinatown 1, the potionless route ends up being 12 frames slower overall.
  • Chinatown 3 - 44 frames saved. A series of precise jumps allow us to avoid the two potions previously collected.

Construction

  • Construction 1 - It was not previously understood why it was necessary to collect the potion in this level. If the potion is not collected, then the next moving platform moves into slot 6. This inherits an Object ??? of 255 from a piece of bomb shrapnel from the previous helicopter mission, which causes it to get stuck.
  • Construction 3 - 12 frames saved. The moving platforms in the construction stages are very different from those in other stages. The main difference is a 'fuel' system - when travelling vertically, the platform accelerates if it has fuel, and otherwise decelerates. The fuel ticks down on a 2-frame frame rule, so landing on the platform on the correct frame allows for more acceleration before fuel runs out.

    Very unusually, these moving platforms have subpixel carryover from level to level. I take a slower platform in Construction 1 (without losing a frame rule) in order to get a better subpixel carryover for this level where the frame rules are shorter due to not collecting any potions. There is very little in the way of manipulation of the subpixels, since the movement is all automatic. However, I tested carefully to try to get all possible values, and this was the fastest combination.

    Another small timesave in this level is due to the short hop onto one of the platforms instead of a full jump.
  • Construction 4 - 12 frames saved by more optimised movement.

Photography

It had gone unnoticed in the creation of the previous movies that getting hit in the photography levels also removes one of the photographs you may take. However, while it prevents you from taking any photographs during the knockback, the camera reload timer keeps going during this. Timing it carefully so that you get hit from a low height straight after taking a photograph thus allows you to get rid of photographs more quickly, saving 4 seconds per photography stage.

Helicopter

In the helicopter missions, the state for collecting coins and potions can either be triggered by reaching the bottom of the rope, or by pressing A or B. The latter of these allows for far more coins to be collected, and may leave the state more quickly to avoid getting hit. It is not possible to get many of the coins in the second helicopter mission without getting hit, and it did not seem possible to collect everything. We miss one potion, but collecting this potion forced us to miss two coins when testing.

Other comments

LUA Script

Throughout the creation of this movie, I used this basic and hacky LUA script. Many of my explanations with object slots and timers and object ??? are likely more clear while watching with it.

Possible improvements

  • Warehouse 1 is 1 frame off a 4-frame frame rule. I am fairly confident that there is not any more optimal movement that allows saving this frame, but I do not like to rule things out.
  • Chinatown 1 is 1 frame off a 4-frame frame rule. This one seems maybe more likely than Warehouse 1, as perhaps there is some faster way I didn't come up with to force the timebomb out of slot 6. On a similar note:
  • Chinatown 2 was 1 frame off the 32-frame frame rule without the manipulation in Chinatown 1, so if some improvement is found here then we could avoid losing the 8 frames in Chinatown 1. That being said, I spent a large proportion of time (probably over 1/4 of the time on the whole movie) on these two levels to no further success, since they were so close to improvements.
  • If there is some way of not having the bomb give state 255 to slot 6, then we would not have to collect the potion in Construction 1, and would likely save a significant amount of time. However, this seems very tricky to do, as there are not many objects before the bomb, so influencing the slot seems impossible, and there doesn't seem to be anything after the bomb that could rewrite over the object ???.

Suggested screenshots

I would suggest a screenshot from the boss fight in Carnival 2, during the precise jump onto the boss platform. One such screenshot is frame 15617.

Special thanks

  • One of my IRL friends, for being interested enough to watch my previous movie. While rewatching it with them, I had the idea to jump onto the Carnival 2 boss platform, and got it successfully after a bit of testing. This was what motivated me to make a new verison of this movie. I later found a file that showed I had tried this when creating the original movies, but had failed and then forgot that I had tried :)
  • negative_seven, for their helpful advice with debugging some of the weird behaviour in this game, and much rubber ducking.
  • Another of my IRL friends (you know who you are :)) for all their motivation and support, and again rubber ducking. Quack!

feos: Claiming for judging.

despoa: Processing...


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
Location: 127.0.0.1
This topic is for the purpose of discussing #7684: Denial140's NES Darkman in 09:01.09
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15628
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. ---- [4848] NES Darkman by Denial140 in 09:01.09