I'm ready for all the comments about how this is used for the Mario Bros 8 hack.
I started working on this game thinking it would be a simple project that I could complete in maybe a week or so because the sprites looked simple and the main character moves incredibly slow, but immediately found out it is never as simple as it looks. Also you gotta love that classic Natsume soundtrack, it is an underrated one in my opinion.
Right off the bat you'll notice that this game only accepts inputs every 4th frame, meaning there are 3 lag frames and then an acceptable input frame. This makes tight optimizations a lot harder but also limits your movement possibilities by quite a bit.
Anyways, Don moves slow, 1 pixel/frame for pretty much every normal stage besides the underwater ones, which he naturally actually moves SLOWER than that (which is negated due to a trick though).
Let's just go ahead and get the tricks/glitches out of the way first, there are a few minor glitches and softlocks that didnt have use in the run, and I will include them for documentation purposes in case something is found later.

Ceiling Clips

Every ceiling corner can give you a boost of 4 pixels for a frame. This includes treasure chests you can get underneath and any solid ceiling you can bonk with your head. However, if the ceiling is at least 2 tiles of terrain near the corner you can actually get two 4-pixel boosts instead. I think this is because those blocks are just a giant tile set or at least tied together, but I'm not 100% sure. It's very useful in most cases though. Also I'll mention here that the cannon in the pirate ship level will give you an 18 pixel boost to the right for some reason. Unfortunately there's only 1 that's in the air so it's the only one you can boost off of.

Ceiling Jump Resets

Holy flip reset batman. If you jump into a ceiling with the right y subpixels and x coordinates you can actually reset your jump off the ceiling. This applies to all ceilings you can bonk your head on. Unfortunately some of them are 1 block too high, meaning you can not get a reset unless you jump from a standstill with a very high up y subpixel value. I'm still not quite sure why this works but it's never really useful as you have to come to a full stop to make it work, I did not ever find a way to get it without stopping. This technique is very useful especially for vertical stages and since we can combine it with the double ceiling clips we can save a lot of time. Also, it was a while before I realised you could still do ceiling jumps after taking damage which saves time at the part where those wooden stakes are always in the way.

Momentum Preservation

I first discovered this trick in the underwater stages, and it is very important for those but also can be applied to other locations. So basically since since the hammer is only active on the last frame of animation, you can cancel it with a jump before hand. This means the hammer never finished and it's the last frame of the hammer which will cause you to come to a complete stop in the air if you aren't pressing a direction. If we let go of our direction at the exact frame our speed hits 1 pixel/frame and them keep combining it with the hammer jumps in this manner we can maintain 1 speed underwater, even though you're actually supposed to lose speed every few frames. But then I wondered if this worked on slopes as well by not pressing a direction. It turns out slopes are coded similarly in that not pressing a direction does not trigger the slowdown. This means I can take different routes in some places and actually save time because of it. This is also used in the graveyard stage later on combined with the speed boost item but I'll put that in it's own section.

RNG manipulation

This game is heavy with RNG but usually it's actually not so bad to line up. As long as you have figured out a good method to kill a boss you can always realign the RNG simply by pressing buttons as long as they are inconsequential and don't affect your x/y positioning. Diamonds dropped by enemies are also affected by this RNG method. Enemies can drop either a blue diamond which increases your score or a red diamond which will refill your health by 1 dot after you've collected 10 of them. The red diamonds are very important because damage boosting is important in the run.

Jumping

Jumping has 3 heights in your basic form: pressing A for 1 frame, 3 frames, and then 5 frames will get you different heights. This means that on frame 2 and 4 you can actually not press anything and still get the desired height. This is very important for RNG manipulation as it affects item drops and enemies/bosses but doesn't affect your positioning at all.

Throwing stunned enemies

Enemies hit by a hammer will crumple to the floor and can then be picked up by Don. You can throw enemies in one of 2 ways (but momentum still plays a slight role). You can either just press B and hurl the enemy straight ahead, or you can press B and then up 2 open frames later to chuck the enemy upwards. If you have no momentum it will simply toss the enemy straight up and down. If you have momentum it will lob them up and forward. You can pick up multiple enemies at once but doing so has no use and would only waste time. If you have 3 or more enemies in your hand you will actually move slower, there is no speed limit to just holding 1 or 2. Bosses only spawn throwable enemies at certain intervals and even if you could hit them with 2 at the same time, it does not deal more damage to the boss. Most bosses can only spawn a max of 2 enemies at a time anyways.

Power Ups

There are 3 hammer powerups in this game as well as a super speed powerup that's literally only located in a single stage. I'll put that powerup in it's own section later.
The first powerup is the winged hammer. This one is pretty useful as it does allow you to jump higher. If you're underwater you jump significantly higher because water naturally shortens your normal jump anyway. This also changes your jump pattern so that your jump heights are on these frames instead: frame 1, frame 3, frame 5, and frame 6. This works similarly to your normal jump but holding A for your 6th frame will get you additional height. There's also a floaty mechanic when falling with this powerup that allows you to stay in the air slightly longer.
Next we have the paddle ball Kendama. This thing slings a ball projectile attached to a string around slightly extending your range. Other than that, it doesnt really do much so it's never used in the run. It can't hurt bosses by itself either.
Finally we have the magic staff. This thing is very useful as it can damage bosses by itself, meaning we dont need to wait on stupid spawns to be able to throw at the bosses to damage them. You can fire 10 fireballs before the weapon automatically switches back to your normal hammer. Bosses take 6 hits to kill, which means I have 4 free shots to use before reaching the boss room. But wait, there's actually a time saving trick using this that I'll describe later!

Boss Animation Cancel

This trick requires you to have the magic staff weapon during a boss fight and exactly 1 remaining fireball shot as soon as the boss dies. If you time your last fireball on the exact frame the boss death animation starts it actually overrides that for some reason, skipping the boss animation and saving around 27 frames (I'm too lazy to fact check this but it's close enough). This of course means I can only shoot 3 fireballs before reaching the boss.

Infinite Magic Staff

There is a way to get an infinite magic staff, at least until you beat a boss. Unfortunately there didn't seem to be a way to trick the game into keeping the staff after a boss fight even when using a final shot on the exact frame the level end automatically switches your hammer back to basic mode. Anyway, the way to set this up is to fire 9 shots so that you have 1 more shot remaining and then time your last shot to fire on the same frame you enter a door. The door will override your hammer cancelling and you will have unlimited shots with the magic staff. Unfortunately because this means I now can't manually get rid of it for the boss animation cancel, it currently has no use. The only way it would be useful is if we could somehow keep the magic staff between levels which currently seems impossible.

Speed Powerup

So there is a speed powerup that only exists in the graveyard level for whatever reason. In this stage you must kill the moon with a projectile as that is the only way the door at the end of the stage opens. Initially it seemed just out of reach to get to the door fast enough, because when you kill the moon there is a strict timer before it resets again. But then I remembered the handy momentum preservation trick but I thought surely it wouldn't work for this. Turns out there is a frame where your speed is 1.5 pixels/frame very briefly and letting go of your direction at that exact moment has the same effect as preserving your momentum elsewhere. You can attack in this form but you can not pick anything up, you just automatically kill anything you run into. But it's good that you can attack as that is required to preserve your momentum in the same way as hammer hopping. This gives us just enough time to reach the door while the moon is still knocked out.

Escalator Preservation

There are escalators in some later stages and they are a bit deceptive. Even though they may be going in the same direction as you're travelling you're not actually gaining any speed from just walking on them. This is because your x coordinates are updated in this pattern: 1 1 2 0 1 1 2 0. So you can see if averages out to be the same as just walking on normal ground. However, if you use the handy momentum preservation by hammering just as you're about to land you can maintain some of those frames of 2 pixels/f for as long as your hammer animation is active. This is followed by a jump and repeated meaning it's faster to do a bunch of hammer hops that it is to just walk over the escalators. The actual conveyor belts in this stage really do increase your speed without having to do this but they are never in a position to be used sadly.

Fake Death

This is also another useless glitch, but for some odd reason you can sometimes die without actually dying. Your health will be reduced to 0, the background music will stop playing, but you can resume running around as if you weren't dead. Unfortunately you can not enter doors in this state so it becomes impossible to show off with current knowledge of the game. It should be noted that if you do collect health afterwards you can then beat the stage.

Boss hard lock

So most bosses can easily lock you if you were to die from a spawning add just as the boss death animation is about to begin. This is because the level ending item spawns while your death animation is triggering and the game just kinda hard locks. Also, there is a softlock on the final boss where if you kill him and he flies off the right side of the screen the level ending potion spawns off screen and you can never collect it. So you just have to stand there for all eternity not believing what you're seeing that that you will have to start the entire game over again.

Bubble Clip

In the first underwater stage with the clam shells you have to open by throwing a projectile into, the bubbles spawned can carry you into the ceiling. If you time your jump just right you can kind of get slightly zipped around by this. I was particularly interested in the one at the very left side of the stage because it takes you into a large stretch of ceiling and it almost seemed like you could get some kind of zipping going. All efforts failed however as it just keeps wanting to push you back into the stages boundaries.

4-2 block clip

In stage 4-2 (the one with all the moving conveyors and escalators) you can actually fall into the ground beneath the escalators on the ones that have the blue blocks right next to them. If you destroy the top blocks and leave the one that is closest to the escalator you can fall off the very edge of the block and turn right and slip right into the terrain. Unfortunately there was no way to zip far enough to the left to get back above ground so this turned out to be useless for now.
Now some small notes about each of the stages. I'm not going to detail every single one as most can be explained via the tricks section above.

World 1-1

-Having a key will automatically open doors, there is no other way to get inside locked doors

World 1-2

-Took a lower route to get an extra corner boost off the treasure chest, only because the slope momentum trick was found meaning I wouldn't lose time doing this.
-Landed on the moving platform which increases your x position by 2 every 4 frames, so we want to stay on it as long as possible.

World 1-3

-This stage has some ice physics that can slow your turn arounds and acceleration.
-You can let go of direction when sliding down a slope and not lose any speed

World 1-4

-have to stop in order to get a ceiling jump reset somewhere in the middle of this room. I tried so hard to not have to stop but the ceiling is just too high to achieve a jump reset from the ledge with the key.
-Damage boosted jumps are cool meaning I can get the +4 +4 double pixel boosts from the corner at the end for a net of +8 pixels or frames.

World 1-5

-This stage looks like an autoscroller and technically it is. However, if you jump while near the top of the camera it will force the camera to scroll upwards. This is useful but you have to make sure you don't bonk on the top of the screen when doing your jumps or you will have a hard time landing on the desired platforms.

World 1 boss

-Since we have the over powered magic staff upgrade, we can just shoot down the boss very easily. It has long invulnerability periods between shots.
-used the boss animation cancel to save time, that's why the boss appears to stick around when it's normally supposed to disappear.
-By the way, bosses always drop 4 red diamonds, those are not being manipulated in any way.

World 2-1

-If you hold right during these underwater segments the game will stunt your horizontal movement every few frames. By using the momentum preservation technique of hammer hopping just as the speed reaches the 1p/f threshold, we can save that pretty much throughout the entire level. This also works from a complete stop anywhere underwater which is a good thing.
-if your hammer has to come to a complete animation without cancelling it you lose all momentum. We need the last frame of the hammer in order to actually hit an enemy so that's why the brief stop when picking up the crumpled enemy. The second brief pause just afterwards is when throwing the enemy which has the same effect essentially. Even if you throw an enemy your hammer is still being activated invisibly.
-Grabbed the winged hammer powerup here as it's useful for the boss fight and the extended jump heights. Plus this route turned out faster than going left and riding the bubbles up.

World 2-2

-The bubbles spawning are complete rng you can manipulate them by changing various inputs.
-damage boosted through those pesky squid things as it's the only way to reach the chest
-Found out the treasure chest near the end could actually be squeezed under if timed right, and you get a lot larger boost to the right because you are so close to it.
-there is a pendama upgrade in one of the chests but since we have the winged hammer already it's pointless to go for it. It wastes time to collect and we need the extended jump height for early hits on the boss anyway, ensuring a safe 1-cycle.

World 2-3

-Not much to say about the pirate ship level honestly, but this is where I originally discovered the fake death glitch. Enemy positions, cannon shots and fish spawning are all RNG based.

World 2 Boss

-By taking damage and staying in the middle for the 3rd boss hit we can trick the boss into staying out just a little bit longer. It's just enough time to ensure all 6 hits without him ever having relocated. It's actually really tight timing. Maybe the last jellyfish could possibly spawn sooner, but I couldn't find it.

World 3-1

-Not much to say about this one, tried to minimize lag as the many enemies near the end sometimes cause some. Grabbed the winged hammer for the next stage, it is actually slower than running back to the left after grabbing the key. I can't remember exactly how much but something like 30 frames slower I think. We need the winged hammer also for early door entries later on.

World 3-2

-Another vertical scroller. Had to wait on some of the clouds to form platforms to jump off before moving up. You can manipulate them to spawn sooner by forcing the camera up at certain points. This is where collecting the winged hammer in the previous stage comes in handy.

World 3-3

-I noticed randomly when making an update one of the pigs fell off a platform of his own accord, which he is not supposed to do. I had to redo the previous level a few times and getting the RNG to line back up was more of a pain that anything else, because it has to be a precise timing on his turnaround. It was funny so I left it in.
-Jumping into the door here and then immediately exiting was faster than jumping into the first door and moving through it normally.

World 3-4

-Here we have to switch back to the magic staff and I think you know why. Easy hits, boss animation cancel, yep.
-have to manipulate most of the floating pigs to be out of the way to avoid taking damage on them.

World 3 Boss

-Your movement is kinda weird on this boss fight. You press left and right to move left and right, but you have to press A to move up. Anyway, since we have the magic staff we can just burst him down, not much else to say about it.

World 4-1

-this is the only stage that has the magical bag that gives you a faster running speed. Originally it was thought to be impossible to use as you need to destroy the moon in this stage to open the door. When you have the powerup you can't pick up enemies and throw them so it is impossible to kill the moon after you grab it, that's why the enemy is thrown just before grabbing it.
-Momentum Preservation was used to keep the maximum speed of the powerup before it drops off if you continue to hold right. Turns out just enough time by a few frames to reach the door in time before the moon resets.

World 4-2

-Jumping into the first door so that you enter it just as you land allows you to fall faster when exiting, since the door's exit is located in the air. I'm not exactly sure why that is the case but it saves a handful of frames.
-There is a useless glitch where you can fall through the escalators that have blocks right next to them, outlined in the tricks section above.
-Unfortunately you can't get back up to the ledge after grabbing the key so we have to take the door which has long transition times.

World 4-3

-not much to say about this stage, using some ceiling jump resets to skip large portions of the stage. Also, the witch near the end is manipulated to fire the broom in a manner where the ceiling jumps can avoid taking damage. (ceiling jumps are obviously to avoid the reverse conveyor below)

World 4-4

-at the 4x4 blue blocks it would seem to be better to go above them in order to get 2x 4 pixel boosts, however since you have to jump to break the blocks while still moving, you end up bonking into the left ceiling block which actually stops you completely. Unfortunate, but going below while only getting 1 pixel boost is better.
-hopping up escalators saves small amounts of time as opposed to running up it normally. Have to cut a jump short so that I can set up a ceiling jump reset here which is actually very dependent on the y subpixel values.

World 4 Boss

-This boss RNG is tricky and I'm still not fully sure of how it works. Sometimes delaying your hit would still cause the next bat to spawn at the same frame, so there is some sort of frame rule going on as to when they can spawn. Some of them spawned instantly while some seemed to insist on spawning later, for whatever reason. Maybe more understanding of the RAM could prove useful here.
-You have to throw the heart at a solid part of the sides of the screen or either throw a bat projectile at it. Because another bat wont spawn for a while that's not an option really. If you throw the heart off the top of the screen by lobbing it up with momentum it will just reset the boss and you have to do the entire fight again. Yes, all 6 bat hits again before the heart breaks off.

World 5-1

-This first room is kinda laggy because of all the sprites that spawn. The claw above can be carrying 2 different enemies, the massive teddy bear or some green dinosaur. Both are pretty similar and dont change anything really. The piranha plants have to be knocked out by throwing an enemy at them. Grabbed a health powerup because it wasted no time and I need damage boosts later.

World 5-2

-This stage sucks from a speedrun perspective. There are no alternative ways to reach the top and the platforms are on a camera based spawn point. This means they only spawn when you get close enough to them, and naturally they seem to be on the worst cycle possibly. The top one spawns before the left one so there is no way to delay the top one with current knowledge.
-Hammering the platforms from above causes them to turn around. Unfortunately you have to be completely above the platforms to turn them around, and thrown enemies dont interact with them either. So there is no way to manually turn around the top platform without getting above it.

World 5-3

-This level is a whole bunch of nothing. There are 2 key doors one on the left side of the room and one on the right side. Because the key is located in a chest just above the left most door we enter that one. Not much else to say.

World 5-4

-This stage has a door you must enter that spawns at a certain interval but in a random location each time. I manipulated it to get the one closest to the starting point of the stage, which was a few frames faster than walking to the one in the middle of the room under the giant clock.
-You can hear a sound chime whenever the door appears somewhere.

World 5 boss

-These enemies require 2 hits to crumple into a grabbable form which slows down the process of the first hit. Still, by jumping into the boss for the 3rd hit causes the 4th enemy to spawn soon enough to get 4 hits in before he disappears. The clock in the background is a counter of sorts to when he will disappear/appear. He reappears really soon because we forced him to go away before the clock timer was done.

Final Boss

-final boss has 2 stages. In the first stage it's better to damage boost past him to get to the place where the witch spawns to drop the orb you need to damage the boss. By taking damage we can get some extra hits on the boss, and perfect positioning of the orb allows us to get the 6th hit while avoiding dying on him by landing to the side.
-For stage 2 of this boss he just flies around. There is some weird rng where he can sometimes fly slightly lower after the first hit on the boss, which was a pain to find. It allows a couple early hits here. In theory you could save a little bit of time if you still had enough health to take damage, but it's not that significant. There are ways to increase your max health by grabbing 20 blue icons throughout a single stage, and it's unknown if that would be worth it as you would have to then fill it by taking a health pickup somewhere or absolutely maxing out the red diamonds collected. Your health does not replenish between stages or after you increase the bar.

Possible Improvements

The stage with the auto moving platforms seem to be loaded whenever you approach them with your camera position rather than be rng based. If you move your camera off to the side of their starting position and then back it will reset them, so that pretty much confirms it. I tried various things to change the cycles on them such as altering the camera positions, stopping at various points, and just changing jumps at various points but nothing seemed to have any affect. The platforms always load as you reach them so unfortunately this was a big time wasting section. Perhaps if you are better at reading the RAM and there might be something I overlooked, and it would actually really help the run. But for now I couldn't find anything.
Certain boss fights I wasn't confident were the maximum efficiency of spawns, so better understanding of how the RNG works could maybe save some time.
I know that the blue icons that you can collect in just about every stage does sometimes affect the ending tally time extending the length of the game by a few frames. The only thing I noticed was that in the first world getting 2 icons was the same amount of time as not getting any, so I just left them in. Admittedly I didn't bother with any analysis afterwards as I felt it wasn't really that significant, but maybe I am wrong.

Thanks

Other than that, thanks to anyone who followed progress, as I sometimes posted in discord. Thanks to Tompa who helped me find some of the RAM addresses such as the x and y subpixel values which were actually quite important.
This is a slow paced game but I feel like there are enough tricks to make it interesting. And the music.
I'll slowly update this submission text over the next few days.

Darkman425: Hell yeah, Taito games. Claiming for judging.
Darkman425: Oh right, Bobby also appeared in Pop n' Pop.
This looks good to me. A lot of work done to maintain that speed with various movement techniques.
Accepting to Standard.

despoa: Processing...


TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
Location: 127.0.0.1
This topic is for the purpose of discussing #8839: Exonym's NES Don Doko Don 2 in 13:17.29
Post subject: Movie published
TASVideoAgent
They/Them
Moderator
Joined: 8/3/2004
Posts: 15577
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. ---- [5786] NES Don Doko Don 2 by Exonym in 13:17.29