Rebuilding Final Fantasy Legend in Elm
Tags: elm, gaming, finalfantasy
Published: 2023-09-20 13:40:01


---
title: Rebuilding Final Fantasy Legend in Elm 
published: true
description: Been trying to rebuild Final Fantasy 6 (Final Fantasy 3 in America) for almost a decade. Started in ActionScript 2, then ported to Dart, then ported to Lua, then JavaScript, and then Elm. Even hired a Mathematician we all know and love on Twitter here to review the code (yes, he found countless bugs).
tags: Elm,Gaming,FinalFantasy
canonical_url: https://jessewarden.com/2023/09/rebuilding-final-fantasy-legend-in-elm.html
cover_image: 
---

Been trying to rebuild [Final Fantasy 6](https://en.wikipedia.org/wiki/Final_Fantasy_VI) (Final Fantasy 3 in America) for almost a decade. Started in ActionScript 2, then ported to [Dart](https://github.com/JesterXL/Final-Fantasy-All-The-Bravest-in-Dart), then ported to Lua, then [JavaScript](https://github.com/JesterXL/Final-Fantasy-6-Algorithms), and then [Elm](https://github.com/JesterXL/Final-Fantasy-All-The-Bravest-in-Elm). Even hired a Mathematician we all know and love on Twitter here to review the code (yes, he found countless bugs).

![](https://jessewarden.com/wp-content/uploads/2023/09/finalfantasyviadvancegba_437371.jpg)I got really inspired when College Humor released a [Jersey Shore version](https://www.youtube.com/watch?v=SyTSOCnr2Rw) of it back in 2011(?). Every trope was there, and even though I only caught 30 seconds of the TV show (her majesty loved that hot mess), I immediately understood every joke when it was communicated in my love language.

![](https://jessewarden.com/wp-content/uploads/2023/09/Screenshot-2023-09-20-at-8.17.08-AM-1024x875.png)I got inspired again when Square released [Final Fantasy: All The Bravest](https://en.wikipedia.org/wiki/Final_Fantasy_All_the_Bravest) for iPhone. Universally disliked (except by me), it had a unique feature where your party could hold up to 40 characters. When you fight, it’d be chaos.

![](https://jessewarden.com/wp-content/uploads/2023/09/fftab_4.jpg)One idea I had for awhile was a type of all stars, where you could have some of my favorite characters NOT from Final Fantasy fight bad guys, specifically [KITT from Knight Rider](https://en.wikipedia.org/wiki/KITT), and me being a DJ. I thought that’d be so cool.

Once All The Bravest showed modern hardware could handle an insane amount of characters, I knew it could be turned up a notch. A lot of the speed runners and other advanced gamers are more than capable of handling a lot of cognitive load; meaning, doing a ton of things at once. [Starcraft 2](https://starcraft2.blizzard.com/en-us/) for example had a few people teaching how to get your Actions Per Minute (APM) up, effectively practicing your ability to multitask.

While FF6 allowed you to button mash “Fight” using the menu memory setting, you could be more strategic and had to think on some battles. Some of the later ROM hacks that fixed a multitude of bugs, and added harder enemies, made the game much more enjoyable for people who thought it was too easy in late game. Combining the 2 ideas; random heroes I have in real life, 40 of them, with all the abilities so you can still do advanced strategic combat if you want to sounds so fun!

![](https://jessewarden.com/wp-content/uploads/2023/09/Screenshot-2023-09-20-at-8.36.53-AM-1024x872.png)Even with Elm, though, the types ensured I had zero bugs; every inability to finish a feature was just my lack of skill. I’d constantly never finish in game jams “despite years of ability to finish applications in record times for clients”. I saw someone on Twitter this week defending monoliths against microservices, citing n00bs promoting tech they don’t know how to deal with, specifically observability, how to debug, failover, etc.

I realized I really *should* try to do something much simpler just to see what I could get done. Very frustrating to go from a level of hubris to humility so quickly, but this happens every time I go into games; it’s just so different from building applications. On the flip-side, I do not have the attention span to do something too small and boring.

So I went back to my childhood, the whole reason I had dreams to make games. One of the games that truly inspired me was [Final Fantasy Legend](https://en.wikipedia.org/wiki/The_Final_Fantasy_Legend) 1 and 2 for the Gameboy. My parents were divorced, so I did a ton of traveling in the car and airplanes to visit each parent. That was one of the only games that could hold my attention for long periods of time, and one of the first to make me emotional. [Seeing it on YouTube](https://www.youtube.com/watch?v=rM7omzH0LbQ) all these years later, though, it is SUPER primitive in many ways to Final Fantasy 6.

It was also a reminder I’m not as cool as I think I am. Watching the [FF6 Retrospective](https://www.youtube.com/watch?v=7ygKNRHbWL8), FF6 was the pinnacle of 2D pixel art game development on reasonably challenged hardware by an amazing team. The devs, artists, and composers were super experienced vets, and here I am thinking modern tooling “will make it easier for me to do what took them over a decade”.

So I’ve started rebuilding [Final Fantasy Legend in Elm](https://github.com/JesterXL/final-cow-legend) and it’s making things a lot easier. There isn’t a lot going on at once because of the screen size (160×144 pixels lol) and limited hardware. This makes a lot of the type modelling of the state machines easier, too. While Elm can handle super complex types and changing them later, it is still hard for *you* if you’re not used to it.

Given this was such a special time in my childhood that I had somehow forgotten, it’s really inspiring to see it come to life again despite being so simple. I have to remind myself that “it’s actually not simple, bruh…”. Anyway, progress. I’ve managed to load in sprites, and get a basic camera system. Hope to soon implement a super basic either A\* or tiling system to handle movement collisions when walking.

![](https://jessewarden.com/wp-content/uploads/2023/09/ScreenFlow.gif)