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.
Stage | Previous | New | Saved | Timesave |
---|
Introduction | 691 | 690 | 1 | 0.01s |
---|
Warehouse 1 | 979 | 975 | 4 | 0.07s |
---|
Warehouse 2 | 1004 | 1004 | 0 | - |
---|
Warehouse 3 | 1595 | 1553 | 52 | 0.87s |
---|
Photography - Pauley | 1520 | 1284 | 236 | 3.93s |
---|
Park 1 | 1442 | 1438 | 4 | 0.07s |
---|
Park 2 | 1386 | 1378 | 8 | 0.13s |
---|
Park 3 | 1287 | 1211 | 76 | 1.26s |
---|
Helicopter 1 | 2931 | 2931 | 0 | - |
---|
Photography - Skip | 1525 | 1281 | 244 | 4.06s |
---|
Carnival 1 | 1075 | 1071 | 4 | 0.07s |
---|
Carnival 2 | 1363 | 1171 | 192 | 3.19s |
---|
Carnival 3 | 1159 | 1155 | 4 | 0.07s |
---|
Photography - Smiley | 1524 | 1288 | 236 | 3.93s |
---|
Chinatown 1 | 1196 | 1196 | 0 | - |
---|
Chinatown 2 | 1107 | 1075 | 32 | 0.53s |
---|
Chinatown 3 | 1479 | 1435 | 44 | 0.73s |
---|
Helicopter 2 | 2315 | 2315 | 0 | - |
---|
Photography - Durant | 1532 | 1288 | 244 | 4.06s |
---|
Construction 1 | 1363 | 1363 | 0 | - |
---|
Construction 2 | 1469 | 1469 | 0 | - |
---|
Construction 3 | 1776 | 1764 | 12 | 0.20s |
---|
Construction 4 | 2225 | 2213 | 12 | 0.20s |
---|
Total | 33923 | 32518 | 1405 | 23.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.
Stage | Previous (cumulative) | New (cumulative) | Saved (cumulative) | Timesave (cumulative) |
---|
Introduction | 691 | 690 | 1 | 0.01s |
---|
Warehouse 1 | 1670 | 1665 | 5 | 0.08s |
---|
Warehouse 2 | 2674 | 2669 | 5 | 0.08s |
---|
Warehouse 3 | 4269 | 4212 | 57 | 0.95s |
---|
Photography - Pauley | 5789 | 5496 | 293 | 4.88s |
---|
Park 1 | 7221 | 6924 | 297 | 4.94s |
---|
Park 2 | 8607 | 8302 | 305 | 5.07s |
---|
Park 3 | 9894 | 9513 | 381 | 6.34s |
---|
Helicopter 1 | 12825 | 12444 | 381 | 6.34s |
---|
Photography - Skip | 14350 | 13725 | 625 | 10.40s |
---|
Carnival 1 | 15425 | 14796 | 629 | 10.47s |
---|
Carnival 2 | 16788 | 15967 | 821 | 13.66s |
---|
Carnival 3 | 17947 | 17122 | 825 | 13.73s |
---|
Photography - Smiley | 19471 | 18410 | 1061 | 17.65s |
---|
Chinatown 1 | 20667 | 19606 | 1061 | 17.65s |
---|
Chinatown 2 | 21774 | 20681 | 1093 | 18.19s |
---|
Chinatown 3 | 23253 | 22116 | 1137 | 18.92s |
---|
Helicopter 2 | 25568 | 24431 | 1137 | 18.92s |
---|
Photography - Durant | 27100 | 25719 | 1381 | 22.98s |
---|
Construction 1 | 28463 | 27082 | 1381 | 22.98s |
---|
Construction 2 | 29922 | 28541 | 1381 | 22.98s |
---|
Construction 3 | 31698 | 30305 | 1393 | 23.18s |
---|
Construction 4 | 33923 | 32518 | 1405 | 23.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.
Stage | Previous | New | Saved | Timesave | Previous (cumulative) | New (cumulative) | Saved (cumulative) | Timesave (cumulative) |
---|
Introduction | 691 | 690 | 1 | 0.01s | 691 | 690 | 1 | 0.01s |
---|
Warehouse 1 | 979 | 975 | 4 | 0.07s | 1670 | 1665 | 5 | 0.08s |
---|
Warehouse 2 | 1004 | 1004 | 0 | - | 2674 | 2669 | 5 | 0.08s |
---|
Warehouse 3 | 1595 | 1553 | 52 | 0.87s | 4269 | 4212 | 57 | 0.95s |
---|
Photography - Pauley | 1520 | 1284 | 236 | 3.93s | 5789 | 5496 | 293 | 4.88s |
---|
Park 1 | 1442 | 1438 | 4 | 0.07s | 7221 | 6924 | 297 | 4.94s |
---|
Park 2 | 1386 | 1378 | 8 | 0.13s | 8607 | 8302 | 305 | 5.07s |
---|
Park 3 | 1287 | 1211 | 76 | 1.26s | 9894 | 9513 | 381 | 6.34s |
---|
Helicopter 1 | 2931 | 2931 | 0 | - | 12825 | 12444 | 381 | 6.34s |
---|
Photography - Skip | 1525 | 1281 | 244 | 4.06s | 14350 | 13725 | 625 | 10.40s |
---|
Carnival 1 | 1075 | 1071 | 4 | 0.07s | 15425 | 14796 | 629 | 10.47s |
---|
Carnival 2 | 1363 | 1171 | 192 | 3.19s | 16788 | 15967 | 821 | 13.66s |
---|
Carnival 3 | 1159 | 1155 | 4 | 0.07s | 17947 | 17122 | 825 | 13.73s |
---|
Photography - Smiley | 1524 | 1288 | 236 | 3.93s | 19471 | 18410 | 1061 | 17.65s |
---|
Chinatown 1 | 1196 | 1196 | 0 | - | 20667 | 19606 | 1061 | 17.65s |
---|
Chinatown 2 | 1107 | 1075 | 32 | 0.53s | 21774 | 20681 | 1093 | 18.19s |
---|
Chinatown 3 | 1479 | 1435 | 44 | 0.73s | 23253 | 22116 | 1137 | 18.92s |
---|
Helicopter 2 | 2315 | 2315 | 0 | - | 25568 | 24431 | 1137 | 18.92s |
---|
Photography - Durant | 1532 | 1288 | 244 | 4.06s | 27100 | 25719 | 1381 | 22.98s |
---|
Construction 1 | 1363 | 1363 | 0 | - | 28463 | 27082 | 1381 | 22.98s |
---|
Construction 2 | 1469 | 1469 | 0 | - | 29922 | 28541 | 1381 | 22.98s |
---|
Construction 3 | 1776 | 1764 | 12 | 0.20s | 31698 | 30305 | 1393 | 23.18s |
---|
Construction 4 | 2225 | 2213 | 12 | 0.20s | 33923 | 32518 | 1405 | 23.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.
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.
Address | Length | Datatype | Description |
---|
$00B7-$00BF, $00AD-$00B5 | 1 Byte | Signed, Unsigned | Object X (256 pixels, pixel) |
$00CB-$00D3, $00C1-$00C9 | 1 Byte | Signed, Unsigned | Object Y (256 pixels, pixel) |
$00D5-$00DD | 1 Byte | Unsigned | Object action timer |
$03C3-$03CB | 1 Byte | Unsigned | Object ??? |
$03B9-$03C1 | 1 Byte | Unsigned | Object 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.
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.
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.