Final Fantasy I

Ok, first thing’s first. Square, please please PLEASE do not sue me.

Ok, now that’s done, what did I actually do?
Oh yes.

The first coursework I did for the “Graphics Programming” module in the second year was to be a 2D game using the Windows API in all it’s ugliness. The examples we were given were sprite based versions of tetris, breakout or something like that. Of course virtually no-one did anything that simple.

I decided to be suicidal.
I wanted to make an RPG.

A lot of people told me not to… I ignored them. I wanted to remake a classic. Final Fantasy. The first thing I did was to find out what I could about how it worked in the original. This required hours upon hours of hard playi— I mean research. Following that I looked up game guides and as much information as I could that people with more time than me had calculated by yet more research… Thankfully there were already algorithms worked out for things like how they thought the damage was calculated, when random battles would occur and so on. Plus there were already maps put together of the whole world. This meant that the design part of this was done and I only really had to concentrate on the programming.

The plan was to recreate the entire first section of the game (for those who have played it, the first island up to the broken bridge) including pause menu and starting screens, character selection etc. With this in mind I started off with doing something very stupid (in hindsight) I began working on the beginning of the game. The first thing I did was make a bitmap font rendering class (yes, I even used the same font that was used in the original) and read in the prologue text from a plaintext file.
I then moved on to the character selection. This required quite a few selection boxes to be made… all of different sizes, some with different background colours. I created a class that would generate boxes of any size given a few parameters.

ffi-sc02.png When I had completed that the next thing was to get the map shown. As I said full maps already exist, but the original was made of a small amount of tiles, I could see no reason why I couldn’t do that myself. I first cut the full map into unique 32×32 tiles and placed the tiles on a single small texture in a way that made sense to me. I then spent considerably longer than was healthy writing a plaintext file with indexes of which tiles should be where. I then programmed a very simple parser to read in this file and then displayed the map. The first time that it actually worked was the first time I didn’t feel stupid for undertaking something too difficult. Once I got a scrolling map I felt even better.

The character classes each had their own sprite sheets with animations needed. Character classes contained all information needed for a character, not only for the bits I had completed, but allowing for expansion later on, there were inventory spaces for items that would never have a chance of being added, weapon modifiers, status modifiers…

ffi-sc03.png When the project was to be handed in I had completed a satisfactory amount to my standards, and enough to get me an A. However, I had not implemented a lot of important things, such as shops, dungeons or towns. This also in turn meant that items were unavailable and your whole party would be dead by the end of the second battle. What I did have working was, a scrolling map, large enough for you to not be able to see the end wherever you walk on the first island. I had a random battle system which would load monsters from a plain text file depending on the area. This was technically implemented, but commented out as I wanted to be able to judge whether what I had was working, so the battles are only ever the same 5 imps. The melee attacks worked in the battle and would change depending on whether the character had weapons equipped, regardless of the fact I hadn’t given the characters any way of acquiring or equipping them. Fleeing from battles also worked as a random “dice roll” depending on the character’s stats.

I will include the executable along with the files needed when I find them, if anyone wishes to see the source code, please email and I’ll supply you with it.

I have been tempted to replace the graphics with creative commons ones, or try and acquire assets for it specifically, but I realised that it was a demonstration of my programming skill at that point in time. It was my first project that was more than a few files in size. A lot of the structure would need a lot of reworking to get nice “clean” code. So this project stands as it is. I own an original copy for the NES, and the game is far from actually playable, so I hope Square don’t want to actually sue me for it or anything.

With regards to the download, it was a demonstration build I made for my grading, The prologue is on an arbitrary pause until the A key is pressed. From then on almost everything can be done using the arrow keys and enter. The monsters display their HP above them which they don’t do in the original game so I could show that my character’s attacks were making an impact (1 damage every time without weapons…)

Leave a Reply

Your email address will not be published. Required fields are marked *

Diary of a Slacker