Genpei Touma Den is a Namco arcade game ported to the TurboGrafx/PC Engine, which combines top-down, platformer, and beat-em-up gameplay. You control the titular Genpei… wait, no, I don’t think you do.
I’ll be honest, I know really nothing at all about this game’s story and didn’t learn any of the names except Benkei. It’s way too Japanese! Literally the first thing I had to do before even trying to play the game was create Lua to translate the HUD’s Japanese numerals into Arabic numerals. Then I tried playing the game and just kinda died a bunch. However, it was a very fun game to TAS, as it’s fast-paced and dripping with delightful knockback abuse.
Team Bird Bear here [🐻🐦] from Dream Team Contest. We won by a landslide thanks to a completely different route. We certainly weren't lazy, though, and in addition we found multiple tricks no one else utilized!
There’s a lot of useful information about level and enemy names in this StrategyWiki guide if you’d like: https://strategywiki.org/wiki/Genpei_Touma_Den
Lua script used
Our Lua script has an Arabic numeral overlay for the HUD, displays x/y speed and position, Big Mode movement status, Small Mode can jump / slash length, the current RNG value, and can display the player hitbox and enemy hitboxes somewhat accurately. Special thanks to Memory, Cyorter, and Dacicus for providing code/addresses included in the script.
Frame count table
|Stage # (Start)||Length||DTC TAS||Main change|
|Stage 1 (0)||1717||1717||No change|
|Stage 2 (1717)||1241||1276 (-35)||Better skeleton clip|
|Stage 3 (2958)||1611||1612 (-1)||Shorter RNG manip|
|Stage 4 (4569)||1383||1380 (+3)||Delaying for frame rule|
|Stage 5 (5952)||776||775 (+1)||Delaying for frame rule|
|Stage 6 (Pit) (6728)||1461||1462 (-1)||Not sure|
|Stage 7 (Kyoto 1) (8189)||2330||2330 (0)||No change|
|Stage 8 (10519)||1223||1234 (-11)||Better knockbacks, instant spawn|
|Stage 9 (11742)||1494||1494 (0)||No change|
|Stage 10 (Kyoto 2) (13236)||2415||2426 (-11)||Better pushes at end|
|Stage 11 (15651)||2457||2457 (0)||6 frames saved and delayed|
|Stage 12 (18108)||1222||1227 (-5)||Better first spawner kill|
|Stage 13 (Dev Level) (19330)||1705||1717 (-12)||Better fan knockback|
|Stage 14 (Dragon) (21035)||1257||1188 (+69)||Killed the dragon nicely|
|Stage 15 (Benkei 1) (22292)||1219||1298 (-79)||Faster spike balls and Benkei kill|
|Stage 16 (23511)||1447||1448 (-1)||Extra corner clip|
|Stage 17 (24958)||1219||1226 (-7)||Benkei 2 RNG manip moved to Benkei 1|
|Stage 18 (Benkei 2) (26177)||1628||1810 (-182)||Less health, faster everything|
|Stage 19 (Final) (27805)||555||654 (-99)||Faster boss kill|
The largest change was obtaining 25 sword power from the Dragon fight, instead of just clipping through him. Every 10 sword power you have, your sword does an extra point of damage. Benkei 1 and 2 have 100 HP, and the final boss has 240. In our old TAS, we only had 12 sword power, so we needed 50 hits on them (and reached 22 power, for 80 hits on final boss). Now, we enter Benkei 1 with 35 sword power, needing to deal only 25 hits, and Benkei 2 and the final boss are done with 40 sword power, needing 20 hits and 48 hits.
You need to collect the 3 special items to be able to defeat the final boss. They’re only in a couple spots, so routing options are very limited. This fantastic picture shows our route.
If you fall in a pit, you go to a penalty area. If you have 70 coins, you can warp out of the Pit to Kyoto, the start of the second half of the game. We then go get the Magatama, and die, which takes us back to Kyoto. From there, there’s an obvious path through the developer joke level that gets you both of the other 2 items. This 70 coins + deathwarp route got us a huge win in the Dream Team Contest, which really did surprise us...
Some tricks used
Well, this is obvious, but the main speed tech is to get hit by an enemy to get a temporary speed boost. The direction of knockback is simply a matter of if your center is to the left or right of their center. Also, if you get wedged deep into an enemy’s hitbox, you’ll get fully ejected out of their hitbox instantly (sometimes moving more than 40 pixels in one frame if deep in a boss sprite).
Changing your facing direction greatly impacts your hitbox. This can turn a leftward knockback into a rightward one, allows you to exit levels a frame sooner, clip into enemies further (and get ejected further as a result), etc.
There’s also two different hitboxes you can have while in Big Mode. Frame-perfect jumping or initiating up-slashes can give you a narrower, slightly taller hitbox. Most normal movement or initiating a normal sword slash gives you a longer, shorter hitbox. Changing this hitbox can be crucial to getting better ejections out of certain bosses, or avoiding undesirable collisions.
Special thanks to Dacicus, whose hitbox display Lua was very helpful in learning about the two hitboxes and optimizing the Big Mode stages further.
Very few non-cosmetic things in this game use RNG, mostly in Big Mode stages (as well as the fan attack in dev level and the dogs in Magatama stage), and for lowering your sword power if you hit ‘hard’ objects. Mid-level, RNG only advances when it’s called. Between levels, the RNG is set based on a global timer that advances every frame. So, there are only 256 possible starting RNGs for levels. Once you collect the sword upgrade in the dragon level, ‘hard’ hits do not advance RNG, so unfortunately that cannot be used to manipulate Benkei 1 and 2’s attacks.
Special thanks to Memory and Masterjun for figuring out more about the RNG.
Moonwalking (Big Mode)
Holding 2 after a slash preserves your facing direction until you let go of 2. This lets you face leftward while moving rightward, and also allows you to make the camera far more left. This camera manipulation can affect enemy behavior, because enemies don’t tend to do anything while they’re off-screen. It can also be extremely important for manipulating your hitbox’s position to clip through enemies.
Damageless hits (Big Mode)
Sometimes you can avoid taking damage when hit multiple times in a row, as if your invulnerability is still going. We couldn’t figure out exactly why, but we were able to get it to happen just by briefly facing left before getting hit. Sometimes it would take 1 frame, or 2 frames, or 4 frames of leftward movement, and the timing is very precise. Getting these was essential to the Benkei 2 level being fast.
Corner clips (Small Mode)
If you land on the very edge of a platform, you’ll usually get ejected out of it, gaining maybe 1-6 pixels. You have one frame to initiate a new jump when you get these clips, so they do greatly limit your movement options.
Super jumps (Small Mode)
Mashing the jump button makes you gain height during the initial arc of a jump. It stops working once you’re moving downwards. This is immensely useful, and interesting because of the TurboGrafx’s built-in turbo button allowing it to be done in real time. However, this feature(?) was also in the Arcade version! Intentional or not? Hmm...
You can get even more height by pausing so you can press the jump button more frequently (a la pause BLJing). This saves time in the developer level, as you can avoid the large triggers for the developer messages with the extra height. It also helped get the height required to attack the dragon heads faster.
We got as many quick coins as we could in this stage, so we did get less knockbacks than optimal. We also delayed exiting 2 frames to manipulate fire head positions in stage 2.
Theoretically more time could be shaved off in this level with more unducking clips into the middle of flames (to get ejected out further). However, the patterns of the heads, and awkwardness of jumping/ducking, makes it difficult.
WarHippy saved us about half a second by improving our clip through the skeleton (we ducked under him, he jumped into him and got knocked rightward by his sword).
The chests have a lot of coins in this stage, so we get them. The middle exit path has the shortest Stage 4 and a Stage 5 with a pit. We delay exiting 2 frames to manipulate arrow positions.
An odd thing, for some reason you enter this level with only 35 health. Every other level you enter with a minimum of 39. This does save frames because of the candle animation. (1 health = 2 frames)
We obtain all arrow coins at the start. All bosses except Benkei are skipped very quickly in this run, so the ninja is no problem. We get coins from the tiger spawns without losing any time.
Fall into the pit as quickly as possible. There’s an interesting frame rule here, the only one we know of; your starting health entering the pit is between 9 and 29. More starting health means a longer candle animation, so 9 is best. If we saved one more frame, we’d have started the pit with 29 health. So, if you were to save any frames pre-pit, you’d need to save a lot of them in order to actually save time (though, after that, each frame saved actually saves 3). We did have to delay 4 frames to enter with 9 health in this run.
Stage 6 (The Pit)
Here we grind up to 70 coins. The spawners spawn an enemy every 83 frames, so theoretically, that means every 3 coins we get costs 83 frames, so 1 coin is 27.66 frames. As far as I know, that’s the slowest coin rate obtained in the route, and there’s no faster ones we don’t get.
Stage 7 (Kyoto 1)
Nothing interesting here…
The swinging ball helps with the ninja skip, and this is the spinning version of the ninja, who nicely continues to knock you back into the end gate.
There is a glitch where if you are high in the air as the ninja spawns, he’ll spawn on the ground instead of falling from the air, and you can bait him leftward early. This isn’t as effective in this level as it is in Benkei 2’s level, because of using the pendulum spike ball for knockback. However, it was able to save 6 frames, by being able to start his spinning slightly early. That turned into a 10 frame save thanks to RNG and lag.
Stage 9 (Magatama)
Since the rocks do 10 damage, we can’t maximize our knockbacks here, but we get as many as we can. The dog’s movement and jumping are RNG, and by slashing the rocks to advance RNG, we’re able to have the dogs jump so we can grab the Magatama and die at the same time.
Stage 10 (Kyoto 2)
Mostly the same as Kyoto 1, although there are a couple nice hitbox ejections near the end.
While WarHippy was adding entertainment to the run (I did not know Genpei could hover…) he was able to save 6 frames on the clip through the ninja. Unfortunately we lost those 6 frames, four of them to the fan attack RNG in Stage 13, and the other two to Benkei 1 attacking instantly.
Quick level to reach the warp to the developer level. As we attack the first spawner, and wait for the statue to break, we position ourselves above/below it, to minimize the time it takes to get past it once it breaks.
Stage 13 (Dev Level)
This level has a lot of invisible triggers that display a message in Japanese that can’t be skipped. So, there is a bit of odd movement in this level as we’re limited by our jump arc and have to avoid all of these. We use pauses to get a higher super jump once, to save a few frames. We open a chest containing 5 sword power, as it doubles our damage to 2 against the dragon heads.
There are a few different fan attacks you can get in this stage; this one is great because it approaches from the left, comes out very fast, and stays in the center of the screen for a bit. We move 20+ pixels for 5 straight frames as the attack ends, because we’re getting ejected from its hitbox every frame, but that hitbox is locked to the middle of the screen. It’s so fast that the exit is limited by our falling speed as opposed to our X speed. You can RNG manipulate what fan attack you get by slashing the rocks in this stage (2 rocks are in the way and can be hit without losing time) and of course by delaying your stage entry. Masterjun has more info about the fan attack here.
Stage 14 (Dragon)
The dragon heads are surprisingly not RNG. However, the amount of lag you get can vary, depending highly on the amount of the chaser shots in existence. We were able to reduce lag greatly by slashing as many of the shots as possible.
In our DTC submission, we clipped through the dragon instead of fighting him. Their position is perfect to jump right in between the two heads, get jiggled a bit, and end up getting ejected rightward, through the sword at its base. But there’s a global timer that starts at 630 on every level and ticks down every frame. You can’t exit until it’s 0, which made actually fighting the dragon lose less time than expected, and the sword power gained from the heads saves a ton of time on the upcoming two Benkei fights and the final boss.
WarHippy is entirely responsible for the dragon fight, and improved it multiple times. He shaved off at least a second off of what he originally had (with some help from our pause jump discovery).
Memory discovered that if you grab the dragon’s dropped sword power orbs on the frame they touch the ground, you collect it twice. With that, we gain 25 sword power, while also getting a nice rightward knockback at the end (which saved more time than waiting for the last orb to drop and getting 30 power would, as that dupe would only save 5 hits on Benkei 1, so 10 frames).
Stage 15 (Benkei 1)
Normally, you can only do damage every 3 frames. However, when you start a new slash, it can damage him in only 2 frames. So the best strategy is to initiate as many slashes as possible. Mittenz found that against Benkei, you can do this by being in mid-air. When your sword clangs with something (making a sparkle), a new slash can be started. Benkei’s feet do not ‘clang’ but his body does, so you must be in midair to get constant 2 frame hits. Our Lua script shows how fast you’re hitting him (with green color text if you get a 2 frame hit, and red text if it’s 4+).
We begin with 4 hits from a normal slash, an up-slash as we approach him, and then begin 2 frame hits once we’re close enough (we need to be nearly touching him for the beginning of a slash to make contact).
Benkei’s attack choice and delay before attacking are RNG, and since we now have an invincible sword, we can’t RNG manip except by delaying entry into the stage. 2 frames had to be delayed so that we would be able to jump and do the 2 frame hits on him.
Also, we delayed exiting the stage 3 frames in preparation for Benkei 2's RNG.
A final platforming stage. Not much to say, other than we tried to maximize corner clips (but the patterns of the platforms and limitations of jumping often made it not possible).
Just a warp stage for if you didn’t have all the items. The 630-frame timer delays us once again.
Stage 18 (Benkei 2)
This Benkei is much harder due to the spike balls, especially the one swinging pendulously. The pendulous spike ball makes a very strict time limit on this fight, as the best way to end the fight is to defeat Benkei before it swings too far rightward.
At the climax of the fight, we end up being knocked leftward by Benkei’s body and the falling spike ball, and knocked rightward by Benkei’s attack and the pendulum spike ball. Having Benkei’s attack there to bounce you back rightward is extremely important (otherwise, the leftward knockback will ‘win’), and having him attack this early is fairly rare, so most RNG options did not work for this strategy. But, I can’t say for certain it’s impossible to hit Benkei enough times and finish flying rightward without him attacking.
After that, it’s just a casual walk to the end of the level… with our friend the spinning ninja speeding the process along. This section feels very hard to optimize, but theoretically, there’s nothing too crazy to save here, because it’s limited by the speed he flies into you with. The beginning and ending are what’s really crucial. The beginning, you want him to start spinning towards you as soon as possible (he starts spinning towards you when you face leftward), clip past him, and get him moving rightward as soon as possible (he flips his direction when he’s hit). The ending is the only part where you are no longer fully limited by his horizontal speed, so getting ejected out of him and maximizing knockback time matters a lot then.
You can see we take very little damage from the ninja. I wish I knew why it works, but if you face leftward for a frame now and then in just the right way, you can get knocked back by the ninja without taking damage. This allowed us to enter the level with the minimum of 39 health (each extra health costs 2 frames).
Stage 19 (Final Boss)
You can’t interrupt sword slashes in this fight, but it’s not a big deal since he’s not much of a threat and doesn’t knock you back every which way. A couple up-slashes are used, the first one to help with hitting him when he’s above the ground (behind-the-back sword windup hits are very low to the ground), and the last one to help with timing a quicker input end (since up-slashes take less time in between them).
Overall the most potential is probably in Big Mode levels, as the mechanics are the most complex, your jump height has odd variance depending on your walk cycle and ducking, and it has the best hitbox ejections. Most of our late improvements came from improving knockbacks/ejections on Big Mode levels.
The beginning of the run hasn’t been touched much, mostly because of the frame rule. You’d need to save 10 frames just to even out with what we have now (then each frame saved, saves 3), and there isn’t much to work with, especially with needing as many coins as possible. Stage 2 is probably the most possible to get that kind of timesave on (again, by improving Big Mode ejections).
The only frame improvement we couldn’t keep is the 6 frames we saved on Stage 11, which was lost to bad RNG.
I really enjoyed the Dream Team Contest, collaborating with my fellow Banjo-Kazooie community members. I always liked the idea of the contest, but didn’t want to be on a team of relative strangers, so huge thanks to The8bitbeast for starting a Banjo team for this one (also check out his TASing podcast). And of course huge thanks to EZGames69 for arranging this one and picking a fun game.
The game ended up being a lot of fun, and I think it was a good choice for the contest, as it’s easily editable/splicable since very few spots involve RNG. I also really like games where you have a clear max speed, with only some exceptions (knockbacks being the main one here). I’d also say it had simple routing to make for a linear path that’ll make for a very close competition, but it wasn’t simple enough evidently… We really thought every team would find the Pit route!
WarHippy did an insane job helping to finalize this run, both by frames and also by adding all the entertainment in the final movie. Two of his teammates dropped out, and Cyorter mostly contributed memory analysis and Lua. Their 2nd place finish is incredibly impressive, and I bet that with the 70-coin Pit route, they would have won. I highly suggest if you’re as passionate about participating in the DTC as he or I are, please invite him to your team next time! He deserves a tight-knit group ready to win!
Frame 22017 shows off riding the dragon’s head nicely.
Frame 23195 is a good example of the Big Mode gameplay.
feos: Good game, great execution, and nice routing! The guide calls another route fastest and doesn't make it exceptionally obvious where the necessary items are, yet it only takes a bit of careful reading to figure out the guide is actually wrong. I followed the movie while reading the level descriptions and comparing this to DTC's second place, and it all looks reasonable. The "developer" levels aren't really hidden, so using them is perfectly fine. Accepting to Moons, will check the ratings after some time.