Wednesday, December 24, 2008

A saga about SAGA

I wanted to tell this story for a quite long time. A draft of it was sitting on my HD for couple of years. And now, there finally it is. A piece of ScummVM story, a saga.

All of this started back in May 2000. Daniel Balsom was so delighted in furry Inherit the Earth game, so he began to peek into its executables in order to make it run on his Windows XP. YARN (Yet Another Remake? Nifty!) was born. The aim of this project was to run both Inherit the Earth and I Have no Mouth and I Must Scream, though practically straight away he switched to The ReInherit Engine, supporting just the first game.

I may say that it was a horrible time. Daniel ran original game with DOS Debugger and tried to figure out what is going on there, staring into a hex editor and documenting it on sheets of paper of different sizes and then attempting to curl his head in order to write C code. He told me that there was a big pile of those papers and he even offered to scan them. Ugh!

In some time the game intro was showing with handful of bugs, but next real world event killed the work. Original Inherit the Earth director, Joe Pearce, announced that he acquired full rights on the game and that there is a re-release in the works, compatible with Windows XP. Thus, whole purpose of the ReInherit project was voided, and Daniel was discouraged to continue any work on it. It was around December of 2003 when last commit to the engine was performed.

As soon as in March 2004 I found this abandoned project and offered Daniel Balsom to join our team. He was pretty busy at that time (and still is), but offered his help as a consultant. We got his sources, ported it over to OSystem (core of ScummVM hardware abstraction layer), then started to map out functions in Interactive Disassember.

In parallel I tried to contact Joe Pearce of Wyrmkeep and inquiry about the game engine soruces. Daniel told me that he already tried to contact Joe about a year earleir, but that was exactly the time when Joe was in process of the game rights clearance, so obviously, he was not able to pass any game materials. We thought it was a fat chance. Mr.Pearce was not fast with replying my mails, but suddenly, at end July 2004 a miracle has happened. We were given complete sources for ITE!

Thus, we closed our IDAs and started to look straight into C/Asm code of the original. According to the accompanying license we could not use more than 5% of original code verbatim, that's why instead of porting original code we continued to work with ReInerit codebase and fix it along the way.

I found a guy from Russia, Andrew Kurushin who joined our team in December, 2005 just for helping us with the engine. After a year of work, in August of 2005 we finally announced support for Inherit the Earth game.

After completing support for ITE we decided to pursue the ultimate goal of YARN, that is to support both games of the engine. Thus, work on I Have no Mouth and I Must Scream started. This time we did not have any source code. The engine developed quite a lot, but still it was the same. I started very slow and time consuming work of mapping it out. Pretty quickly we stuck, as there were subtle changes in actor handling which prevented game from playing, and actor code is one of the most complex in the engine.

The work was practically on hold for 2.5 years until June 2007 when Filippos Karapetis joined us to resume development. During that period I tried to encourage developers to help me with the engine, but due to complexity of the task, I did not succeed. Andrew became superbusy with his real life, and I had much of other work to do with ScummVM.

Filippos lead the development by a huge leaps. No longer that just in 3 months I Have No Mouth was announced as supported and that is without source code (!).

This was story about SAGA (Scripts for Animated Graphic Advenures) engine. But it continues even today. There exists SAGA2 engine, on which games Dinotopia and Faery Tale Adventure 2 are based, and Filippos recently started to0 work on them. We also got source code for FTA2 on a similar license as ITE, and I hope that pretty soon yet another couple of games will be added to ScummVM collection of fine games.