TASVideos

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

Submission #2960: TheAxeMan's NES Final Fantasy in 1:10:06.81

Console: Nintendo Entertainment System
Game name: Final Fantasy
Game version: USA
ROM filename: Final Fantasy (U) [!].nes
Branch:
Emulator: (unknown)
Movie length: 1:10:06.81
FrameCount: 252824
Re-record count: 31434
Author's real name: Frank Amoroso
Author's nickname: TheAxeMan
Submitter: TheAxeMan
Submitted at: 2010-12-31 01:30:11
Text last edited at: 2011-11-07 00:17:42
Text last edited by: Ilari
Download: Download (22680 bytes)
Status: published
Click to view the actual publication
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:

(Link to video)

This is an improvement of 147 frames over the current Final Fantasy run.

There are several changes that lead to this improvement:

As a secondary objective the input is as sparse as possible. Over 96% of the frames in this movie have no input. I don't know if anyone has ever considered tracking this, but it has to be some sort of record. I calculated this as frames with input vs frames with no input, so it doesn't matter how many buttons are pressed at once.

Battle Luck

Final Fantasy has a very simple RNG. It simply loops through a list of 256 numbers. Now there are times when I need to be at a certain point on that loop. If I need to wait in battle for it to loop completely around, it would take 512 frames! That is way more than the time saved by skipping luck on Garland. In order to avoid this, I need to manipulate more preemptive battles. This gives more control over the RNG since I can run at any time. However, the "Chance to strike first" message eats up about 20 frames. So that is how missing a point of luck costs time. A smaller factor is the number of enemies; each enemy in the battle takes a frame to draw.

I tried skipping luck again on the Eye. That was too much and led to an extra loop.

The counter that determines your battle luck is at 688A, so if you memwatch that you'll see how the RNG works.

I was able to devise an O(N) algorithm for optimizing the flow of running from each battle. This was nice because I needed to run this a lot to check different possibilities.

NPC Luck

The algorithms that randomize NPC movement are much more random than the battle RNG. There is a counter ($00F0) and an accumulator ($00F4). Every time someone moves, the value of the counter gets added to the accumulator. The direction of movement is determined by the low 2 bits of that sum, so every 4 frames you get the same luck. But there is also an initialization factor where some NPCs may be initialized before others when you enter a room. This is more difficult to control.

The counter counts up when you are in walking mode regardless of whether there are NPCs there. But if there aren't any NPCs then the accumulator won't be changed. When you get into battle it goes up by one and then stops until the battle ends.

There are a few ways to affect things by moving around the NPCs. If you happen to be where they want to move, they will try to move again, changing the accumulator. If you move into the place they are moving from, they move faster. This will cause their next step to be sooner, changing luck later on. Each NPC has a counter that counts down every 15 frames. He moves when it reaches 0. If you bump into them when the counter is 4 or higher, the counter decrements by 4 immediately. This takes a frame, but is the most powerful way to manipulate things since there are limited opportunities for the other methods.

Additionally, the counter counts while you are paused, but NPCs don't move. I can often vary when I go to the menu by some range of steps. So by changing that I can affect luck as well. This is done in Earth Cave when I equip the dragon sword and in Gaia when I use the bottle (for the robot in the waterfall).

This manipulation took a lot of trial and error so I used lua scripting to try a lot of possibilities quickly.

Other Comments

This ended up being a pretty small improvement, but technically it was a big accomplishment. The few frames from NPC manipulation were especially hard-won. I hope all the Final Fantasy fans out there enjoy this!


Mister Epic: Added Dailymotion module.


DarkKobold: I'm going to be watching this anyway, so I might as well judge it.

DarkKobold: While ~3 seconds over the course of an hour are impossible to spot, I'd been meaning to re-watch Final Fantasy anyway. Nice minor improvement. Accepting as an improvement to the published movie.

Mister Epic: Will publish this later.


Similar submissions (by title and categories where applicable):