Tool-assisted game movies
When human skills are just not enough

Submission #2109: FatRatKnight's NES Dungeon Magic - Sword of the Elements in 01:14.78

Console: Nintendo Entertainment System
Game name: Dungeon Magic - Sword of the Elements
Game version: USA
ROM filename: Dungeon Magic - Sword of the Elements (U).nes
Emulator: (unknown)
Movie length: 01:14.78
FrameCount: 4494
Re-record count: 431
Author's real name: Leeland Kirwan
Author's nickname: FatRatKnight
Submitter: FatRatKnight
Submitted at: 2008-10-07 01:14:15
Text last edited at: 2008-10-08 02:50:18
Text last edited by: FatRatKnight
Download: Download (1416 bytes)
Status: decision: cancelled
Submission instructions
Discuss this submission (also rating / voting)
List all submissions by this submitter
List pages on this site that refer to this submission
View submission text history
Back to the submission list
Author's comments and explanations:
After hearing about how the dark overlord Darces has returned, our hero goes on a quest to unite all five elements "unite" only one element in order to defeat the dark overlord Darces and save the kingdom.

If nothing else, at least this game has been attempted. It's one and a quarter minutes of a "what the heck is going on!?" run.

About the game

Some dark overlord named Darces returns, and of course, only one person can drive him away. You need to travel around the world to unite the five elements, Earth, Water, Fire, Wind, and Faerie, so you can defeat Darces and save the world. Or something to that effect.

Do I do any of that? No way, man! I "unite" only one element, fly straight to some dungeon, get the required item, and then run into the final dungeon, only to skip by Darces without even touching him and pay the king a visit. Oh, kingly guy, you love to exaggerate!

As far as gameplay goes, it's a little odd. Movement is done merely by tapping in a direction. Left/right turns you, and up/down moves you. If you attack, it takes a little time for it to hit, and you can only strike whatever is right in front of you. All the spells are made using runes, and since there is no MP in this game, casting spells eats up your HP. Also, vision is rather limited, and it's very easy to get lost without using the right spells.

But in this run, with the way movement works, and how little you see at once, it's all a blur. If you can't tell where I'm going, you're probably running it correctly.

You may note that there are five "actions" I can take:
  • Fight - Not used. It makes a physical attack. This run has far too little attack power for it.
  • Item - Not used. Would have the potions seen in the item shop, but since I don't need 'em...
  • Spell - Abused like crazy. Needed for just about everything.
  • Use - Used once. This opens dungeon doors and treasure chests.
  • Camp - Used four times. This option uses food and water to restore your HP.

There are five different spell-sets in the game. However, only one of them is even needed.
  • Earth - Mostly status cure spells, and allows walking into water.
  • Water - Shielding spells! Too bad defense is no issue in a TAS.
  • Fire - No non-attack spells whatsoever. Arguably the worst.
  • Wind - Warp spells. Very useful, except Faerie is a required set, and this isn't.
  • Faerie - Map spells, info spells, and lets you fly to some sky zone. Required to win.

From the start, you can choose to learn one set of magic. After that, in order to learn any other magic, you must first find the appropriate sword and hand it in to the sage guy. Naturally, I don't do that, preferring to win with only Faerie magic.

The dungeon doors automatically open because I cast a spell on the way to the castle. It takes 4 HP, but at least I no longer have to select the USE command to open doors. This gives me a little more time to spare with that 8-frame rule the doors have.

As casting most spells eat up HP, I buy some food, using the money from the king. I buy exactly as much as I need, and conveniently, the shop sells exactly the quantity I want right next to the cursor's default position. All the other food items on the bottom shelf sell food or water in different quantities. The top shelf has various potions, which I don't use at all.

After I get my lunch, I then fly to the sky, to get into "Tores Sanctuary". As the monsters here are meant for decently-leveled maximally-armed characters, you can imagine why I just run past most of them. Through some manipulation, I fight only two of them, where I use a damage underflow glitch to kill both of them. Once I get the item in there, I can no longer use the damage underflow to kill everything.

On leaving, I took the same path I used to get in there. I still have to do enough manipulation to keep monsters out of my way. If I didn't waste any HP, I would have 5 when I reach the ending, so I intentionally throw away 4 HP at a door. Besides, who wants to see me end the game with more than 1 HP? I finally go down to 1 HP when I fly back down to the ground, where I re-enter the castle and head into the basement to find the king and queen.

So after running past all the basement critters about (must be his pets he never told me about), I see Darces for like three frames before opening the final door. So that's where you two were! In a closet of your own basement! Oh, Darces? He's right outside the door.


The game ignores movement when more than 1 button is pressed on the same frame. Also, there is no reason why one would want to hold down a button for more than one frame. Because of these, it generally limits the amount of possible useful input significantly.

There is nothing tricky about movement. It "instantly" reacts when I touch any direction for a single frame. There does not exist acceleration of any sort. I'm at "maximum" speed the instant I tap up or down.

Further, the only luck manipulation possible is pausing the game outside of towns to affect enemy movement, or waiting for the right frame for damage. There is no need to make "random" input for the purposes of affecting luck. The only luck that is affected is enemy movement, determined whether or not the game is paused at the time. Otherwise, it's all based on a frame-counter.

In short, due to how simple the input is, this game might be one of the easier ones to TAS out there.

Vision and Movement

It should already be obvious, even in a TAS, that this is supposed to be first-person perspective. You see everything through the eyes of your character. Now, the main problem here is the fact the character should be legally blind due to the fact he can only see like two squares ahead.

There are map spells I can cast, but they freeze the game for a few seconds while displaying the area, then the map disappears and gameplay is back to normal. If I could move while showing the map, I would have done so. But since it even stops doors from opening, I can't show the maps without losing time.

As for the speed, the game accepts movement every frame. When you tap up, you instantly move one square, unless there's a wall or something else in the way. Then the game waits for you to release up before accepting the next up input. So, of course I hit, release, hit, release, at 30 Hz. Needless to say, 30 squares per second should be a blur in itself.

Then there's a lesser factor: The game updates the wall display every four or so frames. It's also a little behind on the display, so of course even with frame-by-frame, you can't even tell what's up ahead, or even what you're seeing relates to what paths you saw before.

In short, everything looks like a blur, pretty much. However, if you like seeing a game react to impossibly quick input, this run is a fair example.

A good chunk of time is spent on doors, however. They have this 8-frame rule while they open slowly. It might be possible to sacrifice a frame somewhere and still get to a door without increasing the total length of the movie, because of that rule. There's also a few things I can do while waiting for doors to open, like snacking on my food, setting a different spell, or manipulating enemy movements, and I take advantage of that.


All the monsters seen here are end-game monsters, and I'm only level 0! Dang, even "!" of Dragon Warrior and "Axe" of Final Fantasy starts at a higher level than I do! In fact, they even gain levels while I'm stuck at 0 the whole time! They have it so easy...

In any case, if I were to take a hit, there would be a game over, where evil wins again. Hundreds of damage versus 12 HP doesn't leave room for error. Luckily, I am tool-assisted in this run, so I can avoid all those nasty attacks.

Every so often, the enemy may attack, depending on its attack pattern, and whether the game is paused. Obviously, I have the game paused at those moments where I would be whacked, so they never attack. That's a good thing, since hundreds of damage does not feel good to someone who barely has a dozen to work with.

Enemies can also make weaker flanking attacks (still fatal to me), which has a similar ticking timer that also follows similar rules to the main attack they have. Naturally, I don't expose my flank during those ticks, or else have the game paused at the time.

The above takes care of defense, but what about offense? Surely my bare-handed hero can't even dent his foes! But don't worry, he's got spells! ... Which also wouldn't dent his foes... But wait! What's that? A glitch involving damage underflow? The day is saved!

Generally, I try to avoid all monsters, because they take some time to kill. However, there are two monsters that are deeply in the way, and are needed to be killed in order to continue forth. So for the two moments where you actually see me attack something, I'm using a damage underflow glitch. If I didn't mess around with my spells before the attack spells hit, you would have seen them go through their normal animation and deal one damage.

For some reason, attempting to cast a different spell while the first one is still going through its animation causes the spell to transform, taking on the parameters of the new spell. If you were attempting to cast an attack spell as the second spell, you are not charged any extra HP for it. For a normal run, this is typically useful for firing a monstrous 54 HP-cost killer attack spell while spending only 2 HP. But this isn't a normal run, is it?

If you try to cast a non-attack spell while the attack spell is still going through its animation, the effect of the non-attack goes through (HP cost included) AND the attack spell also changes. The base attack power of a spell transformed this way is -1, and with luck, deals at most 6 damage (before you take into account the enemy magic defense). A bit of luck manipulation later, and I hit that -1 every time! Since the game treats the negative as though it were unsigned, I nail maximum damage every time. Too bad it's cropped to 255, then further reduced by their defense...

Upon getting Tores Sword, the item required to enter the final dungeon, my spell damage goes up by 32. Now that base -1 is actually base 31. No longer can I kill things, but that's alright -- I killed everything I needed to already. Everything else is manipulated into going out of my way.

Luck Manipulation

And what would a TAS be without affecting luck along the way?

For whatever reason, when determining a lot of things, the game uses the frame counter. Apparently, damage is also affected by the frame counter. A spell's damage is anywhere from the base damage up to base+7 damage. It looks at the frame-count MOD 8 to decide on what damage it did.

Because of the dependency of the frame-counter, we have an 8-frame rule on when the max damage can be done. In this run, the two times I kill something, the spells are so tightly optimised that they fit flawlessly in the 8-frame rule. If the later three of the four attack spells needed just one more frame to hit, I would have needed to wait 8 more frames for the next window of damage underflow.

The enemy's movement is a little more complex. There's a selector at 0x00CE which states which enemy is next in line to move, ticking every four frames. And every time it ticks from F to 1, the value at 0x00CF is incremented, which is used in deciding how the enemy will move. The ticks are ignored if the game is paused AND not in town. As there are several dungeon doors along the way, I can paused or unpause at no cost to time at those points.

However, the first time I need to manipulate enemy movements, there are no dungeon doors I can pause at. Which means that I need to slow down in order to have the game paused at the right frames. The amount of manipulation I needed to do while on the move is just enough such that I lose one frame-rule unit at the first dungeon door. Almost two, but not quite. If I had instead waited unpaused somewhere, that would have taken up two frame-rule units for the right manipulation to take place.

In any case, I did manipulate everything I could out of the way so that I can just zip to the next point at ridiculous speeds.

Possible improvements:

Not likely. Unless you found a way to walk through walls, or otherwise skip past the king and queen without Tores Sword, a faster run isn't likely. Basically anything that calls for a route change.

Doors and damage are on an 8-frame rule. On top of that, I stayed within that 8-frame rule on every door I could. Improvement on the two enemies I destroy is impossible as it's completely frame-perfect and falls perfectly within that 8-frame rule. The movement isn't likely to be improved either, as I took the shortest path to every door with optimal movement, of course!

So barring any unknown glitches that might pop up, the only improvement I see that can be done is to entertainment. And I think I covered what I could without slowing down, like intentionally ending with 1 HP.

Suggested screenshot: Frame 4435 (Seeing the final boss while the player is at 1 HP)

Similar submissions (by title and categories where applicable):