This is a tool assisted speedrun of Lord of the Sword for the Sega Master System completed in 13:34.815 by Isotarge. It is an improvement of 32.609 seconds over my previous submission of 14:07.424.
Techniques
Jump Chaining
When knockback caused by enemy damage is cancelled by landing on the ground, Landau can start chaining jumps and build horizontal velocity well above what is possible with normal movement. Normal movement has horizontal velocity of anywhere from -1.0 to 1.0 (-2.0 or 2.0 during knockback) where as knockback cancelled jump chains often reach speeds of 6.0-8.0 and higher. Jump chains are the most common form of movement used throughout the TAS.
A very important part of optimizing this game is getting the knockback cancel to start the jump chain as quickly as possible on each map. Sometimes it's as simple as walking left or right and jumping but other times projectile cycles and inconvenient enemy placement means very tight jumps or unconventional setups are required. It's possible to cancel knockback simply by walking off of an edge while an enemy is under Landau meaning a jump is not required on some maps.
Another difficulty associated with jump chaining is avoiding additional knockback during the aerial sections as it resets Landau's horizontal velocity to -2.0 or 2.0 depending on which direction the enemy was in relation to Landau when the damage was taken. Taking damage a second time also means a second knockback cancel is required to get the chain restarted losing a lot of time.
The most common method to avoid damage during jump chains is to use the sword during a jump to kill enemies blocking the path, but this has a consequence of locking horizontal velocity while the sword animation is playing, meaning that the chain is no longer gaining speed. The fastest strategy is to start sword attacks as late as possible to preserve acceleration. The sword can also be used in a few cases to move Landau's hurtbox forward very slightly which can result in clips through enemies, skipping frames where Landau would have taken damage to keep the chain going.
Chaining direction flips in the air results in no horizontal distance travelled until the flip is finished, but gravity is still applied during the flip. In quite a few maps, this technique is faster than the sword strategies employed in the previous submission due to the shorter animation allowing more velocity to be built while avoiding enemies.
Demo Glitch
Upon dying or soft reseting, the game allows the player to continue with their quest without losing much progress. Normally this will respawn Landau on the map he died on but if the demo plays before the player presses continue Landau will spawn on the level to the right of Harfoot, regardless of where the player died or reset. This is used in multiple places during the run to skip some backtracking.
It’s worth noting that a subtle difference between the US and Japenese versions of the game stops the demo glitch from working on the Japanese version. In the US version, the checkpoint value used when continuing from the main menu is updated at every screen transition (with a few exceptions that are uninteresting). In the Japanese version however, only major maps (towns) are treated as checkpoints for the purposes of continues, and since the demo takes place on a non-major map the checkpoint value is not updated to the demo map on the Japanese version when the demo plays.
On the Japanese version it appears that the reset button does nothing when pressed, so a death would be required to respawn at the last checkpoint costing quite a bit of time. The routes were compared between the Japanese and US versions and because of these differences the Japenese version ended up being slower overall.
Last Frame Pausing
Pausing the game in a town shows the map screen. Doing this on the last frame before a map transition will spawn Landau at his current coordinates in the town but on the next map. This can be used to skip entire levels and is used after every town. I also use a last frame pause when entering the door in Shagart to skip the majority of Ra Goan's dungeon.
Improvements
Duel 1 Skip
Progression through Landau’s quest is tracked by a large array of flags. Generally speaking, performing an action in this game sets one of these flags, but there are some actions which set multiple flags, sometimes on different frames. The Pirate fight is one of these instances where multiple flags are set upon defeating him, each with different effects. By resetting after the fight but before the Mayor’s Daughter is returned to Lindon, the game decides you no longer have to fight Duel 1 and skips straight to the second Duel. The reason behind this is unknown at the time of submission. As a side effect of resetting, Landau has to complete the map to the left of the pirate again, and travel across an extra copy of the pirate’s battlefield before continuing to Castle Elder.
Skipping the duel saves 397 frames, but when taking into account the extra maps and one fewer reset available to the route, it actually loses a small amount of time. Thankfully though, there are yet more side effects to this flag state, some of the NPC dialogue further on in the run is skipped (again, the exact reason behind this behavior is unknown at the time of submission), saving at least another 600 frames. This makes Duel 1 Skip very much worth it!
Since the reset button is required to perform this skip, it does not work on the Japanese version of the game, further widening the gap between the US and Japanese times.
Dark Suma
In my previous submission, I was using the bow to deal damage to Suma after clearing the battlefield of flying skulls. This was very slow compared to action chained sword swings, but I did not understand RNG manipulation in 2015 and thus could not find a situation where I could pin Suma against a wall and chain sword hits. Thankfully, this time around I figured out very extensive RNG manipulation strategies for this fight and was able to manipulate a very fast action chained sword section saving well over 400 frames!
RNG Manipulation
There are a few mechanics in this game that are randomized, namely boss movement, enemy movement, and enemy projectile cycles. The RNG uses the player’s inputs as data to chew on and spit out random numbers. Thankfully, the pause button is not usable outside of towns so it can be used to precisely manipulate enemies and bosses into beneficial actions and patterns without losing any time.
Demo Glitch Reroute
While watching a WIP of this submission, The8bitbeast noticed a mistake in the route. The demo glitch used in the previous submission to travel from Pharazon to Amon after defeating Dark Suma was actually close to 500 frames slower than taking the standard route back to Amon. This has a side effect of removing a reset from the run and making it available to replace the reset that was eliminated from the route by Duel 1 Skip, saving a further 200 frames!
Pause During Lag Blocks
Pausing during any lag block will in most cases save exactly 1 frame. This behavior is not well understood at the time of submission and behaves inconsistently. Sometimes, no frame is saved. Sometimes, a frame is saved and the end of the lag block is moved a frame earlier. Sometimes, a frame is saved but the end of the lag block remains at the same frame. Sometimes, more than one pause is required to save the frame. This behavior saved time throughout the whole run, for example each demo glitch comes down from 1005 frames to 999 frames due to this behavior alone.
Recovery Timer Metagame
For the previous submission, my brain was running a flawed greedy optimization algorithm where a frame saved in an earlier map was the most important thing, even if losing that frame would save 2 or more frames in the next map due to enemy or recovery timer cycles. This time around, I was thinking further ahead. For maps that have slow jump chain setups, it ended up being faster overall to lose some frames on the previous map by restarting a jump chain from 2.0 velocity to get a much faster jump chain setup in the next map.
I would like to thank The8bitbeast for helping me route and discover many things about this game, this time would not have been possible without him.
Played using TAStudio and ScriptHawk on BizHawk 2.2.1.
ThunderAxe31: Judging.
ThunderAxe31: Well done with the optimizations. Accepting as improvement of the current movie.
feos: Pub.