Building Things the "Ugly Way" to Figure Out What You Need

The Warriors of Light

Recently I've been working on a side project based around one of my favorite video game series of all time: Final Fantasy. More specifically entries I through VI, the ones I grew up playing on the NES and SNES. Recently they have been re-released in a beautiful format as the Pixel Remasters and I decided it was time to finally put my knowledge of the games on to the internet for no reason other than I love them and want to have a guide that is built my way to share with the world.

Much of the work is just assembling the data in the games and putting them in various databases and tables. The weapons, armor, monsters, etc. are numerous but fairly simple to model as they have defined attributes which map directly to tables and columns. However the Walkthrough section proved to be a little more difficult.

Almost every walkthrough for these games is generally just plain text, or perhaps some basic markup and styling. They range from old GameFAQs .txt files that were written decades ago to nicely formatted websites with images and links all over the place. Having used dozens of these over the years for the various games, I knew I wanted something at least a little different.

Modeling an RPG Walkthrough

As you play through these games you may want something that tells you the exact next steps you need to take. These are the steps necessary to progress in the story and move on to the next chapter. Additionally you may also want some advice about how to tackle a certain area. You may want some background on the town you're in or some history about the game itself. You may want to look up the stats or weaknesses of a specific monster, or check the special abilities of a weapon you just acquired to see if it may be something you want to equip. There are checklists for Bestiary entries and treasure pickups that if missed may not be able to be acquired again, thus sacrificing the coveted 100% playthrough and a fancy Platinum Trophy.

So when I set out to build the walkthrough for the first game, I found myself with the following action in my Rails 7 WalkthroughController.

def show
  render template: "#{params[:game]}/walkthrough/#{params[:id]}"
end

Essentially what this allowed me to do was map routes like /ff1/walkthrough/1 to hard-coded views named things like 1.html.erb, one for each chapter of the game. I certainly can't recommend this pattern for most use-cases, but for an initial build-out of something that I hadn't finished designing it was very helpful. I was forced to manually create each one of those view files before I settled on a structure for actually storing the data and presenting it "correctly".

Working Harder, Not Smarter

By building several of these I was able to break down the actual requirements as I saw them into manageable bits of data and UX. Differences emerged between how to structure parts of the walkthrough. Instructions about where to find a sword became distinct from a story about a famous glitch in earlier versions of the game. Tables of enemy encounters became noticeably divergent from tables about item shops. Sidebar elements that I had assumed were necessary were quietly removed.

Eventually these emergent patterns allowed me to account for all the different types of information that I was going to need in order to present my walkthrough. I am now in the process of refactoring those numerous views into a single one that handles all the different aspects of guiding a user through the game. It was messy for sure, but overall I think it saved me a lot of time I would've wasted had I just started to build out models and associations without knowing the breadth of what I needed to do. UX components would've been built and abandoned, or contain so many modifiers that they became confusing to maintain.

Sometimes building things out the hard way, the manual way, the ugly way, is the best way to get started and figure out exactly what you're trying to build. I know this isn't some revelatory concept among software engineers or really any creative professional, but it's a lesson that seemed important today.