- Genre: platform
- Manipulates luck
- Doesn't take damage
- Aims for fastest time
Legend of Kage is a story based in old Japan.
The beautiful princess Kiri has been kidnapped by evil ninjas.
Many Samurai warriors were sent to rescue her. None ever returned.
The player is Kage, a young ninja who goes to rescue the princess Kiri.
This movie is a ~26 seconds improvement to Walker Boh's movie.
Speedrunwise, this game is all about luck manipulation.
Like any good ninja game, it hides many secrets inside, and I set out
to discover every one of them that is important in making a TAS.
Here's my dictionary:
- Hokage means yōbō means magic monk. I use the term hokage because it's what pops to my head when I think of that particular enemy, thanks to Naruto.
- Shinobis are the blue and red ninja guys. (And occassionally black.)
Strategy
- All forest levels: Make hokages appear as soon as possible, kill them as soon as possible. Screen must be scrolling to the left when the last hokage is killed.
- All moats: Kill the last shinobi at earliest possible frame. Screen must be scrolling to the left when the last enemy is killed.
- All mountains: Jump as precisely as possible. This is difficult, because Kage's jumps are very imprecise. A lot worse than those of Samus.
- All fortresses: Untie Kiri at the first possible frame.
- All aftermaths: Make butterfly disappear as soon as possible (fall to ground). Hit the enemy (Yōbōs, Yukinosuke kiri, and finally Yōshirō Yukigusa) as soon as they appear. Screen must be scrolling to the left when enemy is killed.
- Level 1-1 (summer, forest): Gain the superhuman power as soon as possible, because it enables running faster. (2 pix/frame normally, 3 pix/frame at superhuman speed.)
- Level 3-4 (winter, aftermath): Send the last shuriken as early as possible, and maximize its travel time. Manipulate the luck so that further actions after the shuriken is sent are not needed.
- Never miss an important enemy spawning.
- Don't scroll the enemy out of screen.
- Ensure that there aren't too many enemies on screen that would prevent the new enemy from appearing.
In forest levels, how to enable hokages to appear
- All hokages: They can only appear when the screen scrolling position is odd (not even) and no enemies exist on screen.
- First hokage: The enemy kill counter must become evenly divisible with 4 while the current screen number is < $11.
- Second hokage: Same, except that screen must be < $0E.
- Third hokage: Same, except that screen must be < $0A.
- Fourth hokage: Same, except that screen must be < $04.
This only enables the hokage to appear. It is still subject to the framenumber and mask mechanism, explained below.
How to make the crystal ball (that gives superhuman powers) appear
- Every 12th enemy that appears, carries a crystal ball. However, this counter is reset occassionally:
- When the screen scrolls to the left, and an odd screen number is encountered, the counter is reset to 0.
- When the screen scrolls to the right, and an even screen number is encountered, the counter is reset to 0.
- When a hokage appears, the counter is set to a random value depending on hokage's actions.
I abused this third fact to make the two necessary crystal balls appear as soon as possible.
What decides when enemies appear
- Enemies appear only at certain intervals. There's a ‹mask› variable and a ‹frame counter›. A bit-wise AND of them must yield 0 for enemies to appear.
- For a hokage to appear, no other enemies must be on screen, and the screen scrolling position must be odd (not even). (And the hokage must be enabled as explained above.)
- There are three enemy slots. If all are full, no enemy is created and the opportunity is lost. Dead enemies also occupy a slot until the corpse disappears.
- When a stage begins, the ‹mask› is set to $7E (forest stages) or $3F (other stages).
- When you kill many shinobis at one location, even more shinobis begin to pour in at faster rate.
- When 4 enemies have been killed, the ‹mask› is set to $3F. (Enemy is born every 64 frames.)
- When 8 enemies have been killed, the ‹mask› is set to $1F. (Enemy is born every 32 frames.)
- When hokage is enabled to be seen, the ‹mask› is set to $1F.
- When you move enough, the enemies lose the track of you:
- When the screen scrolls to the left, and an odd screen number is encountered, the ‹mask› is reset to $7F. (Enemy is born every 128 frames.)
- When the screen scrolls to the right, and an even screen number is encountered, the ‹mask› is reset to $7F.
- At the moat stage, the ‹mask› remains at $3F at all times.
- Enemies do not appear when the music is something other than the normal plight music or the eerie scroll+praying music.
Because enemies don't always spawn where I'd want them to, I have to lead an enemy that has been spawned earlier to the point where I can kill it to make the hokage appear. This causes the apparently useless left-right motion at some points. For this, I always chose a red shinobi because they can follow Kage faster than the blue shinobis.
How to manipulate luck
- This game uses the CPU clock as its random source. It is extremely volatile, and reacts to almost any changes in input, even though the input is not fed into the randomness formula. Details at GameResources/NES/TheLegendOfKage#RNG.
How did I approach the problem
- I disassembled the game. I deciphered all important bits of it.
- I used a custom-made luck-manipulation robot, BisqBot, extensively throughout this movie.
Bisqwit: Cancelling this submission. I'm improving it.