[What went down with Trails in the Sky?]

-Hurdles in Programming-

When we first announced The Legend of Heroes: Trails in the Sky for Windows PC last year, we expected a project as quick as our PC Ys titles. While Ys I&II Chronicles+ had a few frustrating challenges, we launched quickly, and Ys: The Oath In Felghana and Ys Origin were “cake,” according to our programmer. We expected to have this project out into the world as early as December 2013 with little to no worry.

That…obviously didn’t happen. Now with a confirmed July 29th, 2014 launch on Steam and GOG (with the hope of announcing other distribution outlets shortly), this day didn’t come without some massive overhauls on the programming end. Without further ado, straight from our programming wiz Sara herself, here are just some of the things she’s done to make this game not only playable, but the most definitive version of Trails in the Sky to come out yet:

[Adding Widescreen]

The original PC version of the game is hard-coded to run at only three set resolutions: 640x480, 800x600 and 1024x768. In order to even consider adding support for widescreen and HD resolutions, this needed to change. The graphics code needed a great deal of reprogramming, almost from scratch, to accept resolutions beyond 4:3 correctly. This involved rewriting the code relating to how it speaks to video cards and learns about their supported features. In the process of doing so, several bugs also had to be fixed in regards to how the game detects graphics adapters and monitors on certain systems, as they’d been causing crash issues.

[Creating HD Text]

The game displays its text with what’s known as bitmap fonts, which means that the fonts are made up of individual graphics sets for each font size available. The sets of fonts used in the original version of the game were rather limited, resulting in a great deal of blurriness when upscaled to higher resolutions. To solve this, numerous fonts were added, upping the amount within the game from 3 to 25. This added a small bit of extra file size to the game, but in return, text is sharp even at high resolutions. The fonts are handled by dynamically resizing the surfaces on which text is displayed based on the player’s resolution, and then choosing fonts automatically as appropriate. Because this feature uses a little more memory than the original version of the game, it is optional and may be toggled off in the game’s configuration.

[Working with the Game’s Graphics & Code]

The game’s graphics use a proprietary format which was perfect for the needs of the original game. However, for the needs of the localized version, various tool functions had to be added to allow us to work with the graphics properly. This included adapting the graphics tools to work with standard formats instead of only supporting more complex formats, such as Falcom’s own 3D models.

Along the way, many crash bugs surfaced, a lot of which were related to the game’s 3D engine, particularly in regards to the polygon meshes. Collision data and similar triggers are based off of the mesh code, and the math for them is rather complex, leaving room for problems if tools behave inconsistently.

If we were utilizing the tools that were used in the original release, there wouldn’t be as many problems from code such as this, but using tools over a decade old, some from the ‘90s, would not be a very reasonable option for us in creating and maintaining our PC releases. With current tools the math would behave incorrectly, causing odd behavior from the mesh code, collision, and triggers. Things like crashes in the middle of cutscenes, freezes that require hard resets, disappearing NPCs, unexpectedly falling through floors, and so on. These issues abounded through early development of the localized version.

We ended up having to use some rather old tools in some situations nonetheless, as some DOS tools were included which had no real alternatives. We would have rebuilt or replaced these tools as necessary, but they were from external and likely defunct companies, and as such did not include source code. Replacing them in this situation would have required even more major changes.

Normally, in a project like this, we would have consulted the source code for the PSP version. The PSP version of the game uses much more modern tools and parts of the source code itself were also modernized for performance. Unfortunately, the code for the PSP version and PC version have surprisingly little in common, and very little code could be reused directly. The polygon mesh code (in its entirety), and all of the code for menu windows, was completely rewritten. As a result, it couldn’t even be used as a guide. Even filenames for the same things differed completely between the two versions, making it difficult to make any comparisons at all.

[What from the PSP version made it into the PC version?]

We had every intent to add whatever PSP features we could from the beginning, though the differences in the code between PSP and PC gave rise to some “Frankensteining” issues along the way. Here are some things we added from the PSP version of the game:

- English voices during battle. Although the patched Japanese PC release of the game supported this, it was incomplete compared to the PSP version of the game, and the code needed to be reworked somewhat to handle our changes as well. (Incidentally, we wanted to include the original Japanese voices as well, but were unable to due to licensing concerns.)

- PSP-exclusive character portraits. Certain NPCs didn’t have character portraits in the PC version, but were later given some for PSP. These are basically identical to how they looked in the PSP release, but all of the scripts had to be updated to utilize them correctly.

- New Game+. The menus and features related to this were coded from scratch, using the PSP version as a guide. Functionality is largely identical to the PSP version of this feature in that there are selectable difficulties and one can opt to carry over virtually everything from their previous save. Clear Data save files from the PSP version are not compatible, however, as this was found to be outside the realm of feasibility – but Clear Data save files from the English PC version of Trails in the Sky will be compatible with the upcoming English PC version of Trails in the Sky Second Chapter.

- Retry Offset. This feature reduces enemy statistics based on how many times you retry a battle, but was not featured in the original Japanese PC release. As in the PSP release, this can be toggled on or off from the in-game option menu.

- Monster Guide. While not completely implemented yet, this bestiary will absolutely be available shortly after launch and will be using the HD portraits from the Japanese PS3 release of Trails in the Sky. The menu was basically coded from scratch, since there was no way to copy it from the original PSP code.

[Improvements After Launch]

Certain minor things, such as properly centering certain text that was centered in the PSP version, will be updated shortly after launch. We’ve also received Falcom’s blessing to use the majority of Trails in the Sky’s PS3 HD assets, so it’s only a matter of time before we receive them and implement them so even the menus and such display in hi-res.

For a while, it seemed like this game was never going to come out. For every crash bug we fixed, there was another one a couple of hours down the line that would bring our progress to a complete halt. That’s thankfully no longer the case, and we’re beyond excited to see Trails in the Sky’s launch next week, July 29th.

It’s finally here!