NES Dragon Warrior as rhythm game

https://www.twitch.tv/nescardinality/v/73640647

Just 6 months ago, the speedrun world record for NES Dragon Warrior – which was considered highly optimized – was over 5 hours. The latest WR above is 42 minutes. How this happened is fascinating to me. I’ve always had an interest in this game because of how pure it is, and I’ve also appreciated rhythm games for their purity. It turns out that there is a rhythm game contained within Dragon Warrior, which only is revealed by attempting to master the game to the highest degree.

Dragon Warrior has a 16-frame rule, which means that inputs are only processed every 250ms. All inputs in Dragon Warrior are bufferable (can be held in advance of processing). Dragon Warrior RNG counter increments every frame and there are no special adjustments to the RNG outcomes like later RPGs do for the sake of fairness/pacing. RNG seed is initialized at save file load and is based on your gold and experience count. The upshot is that the entire game can be planned ahead (using emulator save states and RAM examination, even though the end result is on a real NES) to “magically” get perfect encounter and crit luck. All the player has to do is to enter memorized inputs at the appropriate times, to quarter-second precision, for 40 minutes.

At first, this method was only used to kill metal slimes. Then, it was used to kill Axe Knight. A few months later, the final breakthrough was the “bonk counting” technique allowing dark dungeon traversal, allowing the entire game to be rhythmized.

20 Likes

Is it too late to include this post as Barkley 2 npc dialog

6 Likes

At some point the natural endpoint of speedruns is TASes performed by humans.

3 Likes

Humans performing versions of the Super Mario World memory corruption to load credits trick is a favorite thing.

2 Likes

That’s already happening for some TASes. Super Mario World with its arbitrary code execution…damn it botagel. >=(

I had a friend that swore he got more critical hits if he tapped the button in time to the music and sound effects. I was really hoping it was something that simple.

There is a lot of cross-pollination of TAS techniques to regular speedruns, way more than anyone initially expected. When it comes to stuff like this, people always initially throw up their hands and simply assume it’s not human-executable. With enough effort, that surprisingly often turns out to be too pessimistic about human abilities.

But there is a nuance. Tricks that require true 60fps precision inputs will never be human-executable. For example, Super Metroid’s famous Bomb Torizo skip requires mashing the R button at literally 60fps and you can only miss one press. Even knowing how often claims like this have been proven wrong, I feel confident in saying it will never be achieved by a human (in the NTSC version of the game – this particular question is always confused by the fact that it’s humanly possible in the janky PAL Super Metroid which has a lower framerate).

The Dragon Warrior RNG manipulation is only humanly possible because of the 16-frame rule (which any player can feel as a rather irritating sluggishness in response – you may remember the feeling I’m talking about). That puts the inputs into a timing window which is wide enough for humans to consistently execute. If the game’s RNG counter worked in the exact same way, but inputs were processed immediately like in most games, it would remain TAS-only.

1 Like

pretty sure I first picked this link up on SB, but:

some dude “programming” a rudimentary version of flappy bird into super mario world using glitches to alter the game’s memory locations or something

It’s 30 presses a second (the press/release cycle is at 60fps, strictly speaking). There are already multiple buttons available for this trick (both L and R can be used to arm pump), and I believe switching between L and R at 60fps would achieve just as well as pressing and releasing R 30 times, but that doesn’t help even a little!

As for turbo button, that’s pretty clearly within the scope of TAS (it’s definitely a “tool”), at the same time as it’s a really shitty tool compared to the insanely powerful techniques of proper TASes, so it’s basically of no relevance (a total joke in TAS categories, banned from all human categories). However, there is no Central Speedrunning Council to set rules like this, so this is just a matter of consensus on a game-community-by-community basis. It is the case that almost all speedrun communities ban it, but in Japan, speedrunning is less developed and principled, so for example the Japanese Final Fantasy categories allow it.

As for modded controllers which simply reshuffle the buttons, policy on that varies a lot and it’s generally not a source of much debate/controversy. It’s like, yeah, whatever. Community policy usually depends on how hard/expensive it is to acquire a legit controller for the given platform. (Likewise with whether an accurate emulator is allowed, or if one must use the console, roughly correlates to difficulty of acquisition of console.)

Man. I just realized in mulling over this that if consoles had true hardware RNG, then TASing would be a completely different and much richer disclipline. It would have to involve writing AIs that actually know how to play the game.

It’s cool that humans are learning to play like TASes. But I find it a bit sad that there’s no need for TASes to play like humans. And it’s just down to this technical detail of RNG vs PRNG, essentially a cost-saving measure because game consoles did not expect to be attacked by tools.

1 Like

The more I follow this line of thinking, the more my nerdfroth rises. This has the potential for being revolutionary!?

What if I created a emulator environment that simulated hardware RNG on a particular game (Super Metroid is probably a great starting point), by rewriting the PRNG counter every frame with the meta-PRNG, then issued an open challenge to the TAS community to write a bot for it? To humans, the game would look identical, but to a bot it’s a whole different ball game. Only portions of the game could be prescripted and even whether the bot could consistently complete the game would be thrown into question. And you wouldn’t simply compete on PB time anymore, you could even run thousands of seeded races between different bots to measure consistency.

2 Likes

Could you do that with the Lua script extensions some emulators feature? Many TAS-specifuc emulators seem to have those now.

This is kind of giving me the vision of a nightmare world where every game is played the same way as the Carnage Heart series.

1 Like

the only premonition of this i can think of at the moment is nethack bots, which are pretty cool

Yeah, very likely.

Ideally, there would also be a central challenge server that contestants upload their bots to, like other AI competitions have. That would create a level playing field in terms of performance (the bots need to hit 60fps, so runners with more powerful local machines would have an unfair advantage), and it would also allow me to enforce open-source, say by standardizing the bot language to Lua or Go, and making the way to enter the contest to be to upload your code to a public github and input the URL into the challenge server.

I think it’s important to mandate open-sourceness because bootstrapping a new bot from scratch will be a huge effort and the community would make much more progress polishing and combining each others’ bots. For instance, if a particular boss fight benefits from neural nets, that algorithm could be spun up there, while the rest of the game uses a traditional rule-based AI. I don’t want the neural net programmer to have to reinvent the wheel on the solved problems.

I also think there should be two categories of NDTAS (Non-Deterministic TAS) challenge: RAM-inspection allowed, and human-visible output only. The latter category is more natural/authentic but it introduces this difficult additional problem of computer vision which I think would be just too much at the beginning. I think allowing RAM inspection doesn’t by any means trivialize the problem. After all, traditional DTASes use RAM inspection heavily already.

Am I going to actually build this? We’ll see. I might if I’m still feeling hyped about it in a week or two.

5 Likes

My attitude to videogames ITT:

1 Like

For a second I thought you might be referring to TAS play-arounds. Humanly impossible precision that’s not done in the name of maximally punctual completion. (For anyone who doesn’t know: ex. 1 / ex. 2 / ex. 3)

So, that’s fine as far as it goes. But the reason I am primarily interested in speed (which is kind of the speedrun community’s reason in a nutshell) is that even if there is no value in improving a record for its own sake, the goal creates this clarity of focus that stimulates brilliance, creativity, heroism and pristine polish. The work of speedrunning a game is never complete and new people are constantly motivated to revisit with fresh ideas and more dedication than the last. It allows a process of optimization to continue for years and arrive at unexpected destinations. And it may need to involve a substructure of more tools and techniques behind the output itself (I am excited about my NDTAS concept because it enriches that greatly), such that each game becomes its own little academic field.

I think of TASes as being half like a painting by Chuck Close, half like a mathematical theorem (in point of fact, a DTAS literally is an upper bound proof by example of a rigorously defined function).

1 Like