An interview with SebRMV on his conversion of Another World

It does float! And doesn't get soggy in milk! :)

Moderator: a31chris

Post Reply
User avatar
a31chris
Jaguar MOD
Posts: 839
Joined: Mon Apr 01, 2013 7:09 am

An interview with SebRMV on his conversion of Another World

Post by a31chris » Wed Feb 26, 2014 4:30 am

An interview with SebRMV about his port of Out of This World for the Jaguar. This time I'm the one in quotes. Enjoy.


Hi JagChris,

as promised, here are my answers to your interview. I hope you will be happy with them.
If you have some other questions, do not hesitate.

Regards,

Seb
1. How did you meet Erich Chahi. Can you give us some details on how that meeting went?
The first time I met Eric Chahi was at the Atari Connexion in 2007. It was in April 2007 and it took place at Congis/Thérouanne, near Meaux, in France. Eric had been invited by the RGC staff, which was in charge of the organisation of the meeting.

At one moment, Eric visited the Jagware corner, and I believe he was really astonished and surprised that some crazy guys still develop on these old consoles such as the Atari Jaguar.

I remember a few months before coming to this event, I had the idea to try to make the port of Another World for the Atari Jaguar.
Indeed, I remember having seen at that time that there was a free port of the Another World engine for Linux (rewrite another world) and I thought it could be a good starting point.

I don't really remember how things went. Maybe I talked about this idea to RGC team or not, and maybe this is why they invited Eric.

Anyway, we took profit of this meeting to ask Eric whether he would allow us to make a port of Another World for the Jaguar, and he simply answered "yes, do that!". We talked a bit about the details, and he promised to send us the original source code of Another World and offered his support in case we had questions.
2. In what way/form did you receive the original OOTW source code? Which version was it the source code to?
We contacted Eric a few weeks after our first meeting, and he send us a big archive, containing the source code of the Amiga version (version of 2006), part of the Atari version (version of the 90s), and some excerpts of the PC Deluxe version that was released in 2007 for the 15th anniversary of the first edition.

Amiga and Atari version were all assembly code. PC excerpts were in C++.

We also received the data of the Deluxe version.
3. Can you describe the steps you took to convert the game to the Jaguar?
Here comes the difficult part. At the beginning, we were four coders on this project. And we were badly organised, and we had not the same opinion on how to proceed. Some of us wanted to reuse the existing assembly source code, whereas I was in favor of rewriting the game from scratch.

Finally, we all agreed that the first task to do was to recompile (or should I say, re-assemble) the Atari version, to see if it worked. Unfortunately, it was not that easy, because it was not programmed for MadMac, so we had to convert a bit the source code. If I remember correctly, we gave up after some tries.

I remember also that I wrote a technical document inspired from the source and also the making-of materials which was released with the Deluxe PC version (which I bought in 2007) in order to understand and document how the game works. I think I never finished this document. And my understanding of the game was very superficial, even after having done this work.

Then, I don't really remember how this happened, but the fact is that we all gave up on the project, because we were busy with our own life and because, I believe, we were not comfortable working all together.

Then, in december 2009/january 2010, as my job was very boring at that time, I had the idea to resume this project. I speak about that with my friend Stabylo, and he encouraged me in this way. But this time, I decided to work alone, to work on the project as I felt it and to eventually inform my other team mates once I get something working!

My plan was the following:
- rewrite the engine from scratch in C
- optimise and rewrite in assembly only the critical parts (basically, the polygon rendering routine)

I wrote quickly a new engine entirely in C. One thing that I hadn't really realised but which was good surprise is that since I rewrote the engine in C, I could test my work directly on PC, thanks to code portability! So I used liballegro on Linux to make the graphical routine, and I got a complete engine working on Linux in the mid of January. Then, when all major bugs were identified and fixed, I decided to make the Jaguar adaptation of this new engine. It was pretty easy to do using my Jaguar library. So I get a full C version of Another World that was running on Jaguar. It was very very slow, but it was working! Then, I wrote the polygon rendering routine in GPU assembly (using also the blitter), and I won my bet!
4. Was it hard to convert or fairly easy? What areas of conversion may have surprised you in how easy they were to convert? What areas may have surprised you in how hard they were to convert over?
The conversion itself was not so difficult. The way the game is written eases conversion. Indeed, the game is written in a custom script language and porting Another World means implementing a virtual machine which can run the scripts of the game.
One point that annoyed me while prototyping the Jaguar port was how to handle files and data on the Jaguar. I finally hacked jcp (the skunkboard transfer tool) in order to be able to read files stored on my PC with the Jaguar. The first running version of Another World for the Jaguar was thus using the Skunkboard to read data files from the PC as they were needed (useless to say transfer rates were very low!)
Also, I played a bit with the way to implement the virtual machine: I have now three different implementations of the core of the engine (by core, I mean the core of the interpreter loop "fetch-decode-execute"). The first implementation is entirely written in C and can be qualified as naive implementation. The second implementation is in the same spirit, but I rewrote it in assembly language (68000) to compare performance. The third implementation is very different as it does Just-In-Time compilation of the interpreted code: I loved to implement this version because I am fond of compilation techniques and it was a good way to learn & experiment about JIT compilation.
Can you give us a little more detail about your polygon rendering engine?
This polygon rendering engine has been specially developed for the Another World port.
It is an adaptation of the one I first wrote in C while prototyping the Another World, as I explained previously.
It is of course an adaptation of the original polygon rendering routine Eric Chahi wrote for the game, as it has too manage the very special way polygon matrices ("sprites" in Another World) are encoded.
As a matter of fact, the port of Another World does not use "the Removers library", except for sound generation and memory management: I had to write a customised polygon rendering routine and a very simple display engine, as the ones of the Removers library were not suited for Another World.

Additional question.

How has doing this project improved your skills

1.) On the Jaguar

2.) As a programmer in general.
Hi, difficult to answer. Let's have a try.

1) On the Jaguar, I improved my knowledge of the blitter & the gpu.

2) As a programmer in general, it's difficult to say, this is also my job.
As I said, I was really happy to write a very simple Just-In Time compiler for the Another World virtual machine. So I think it was a good thing for me to have a practical & motivating project to test some ideas.

An incredibly interesting read! Thank you for your time Seb. And your hard work!
Further reading

Consoles that won't die: Atari Jaguar
What came after the Jaguar was the PS1 which for all it's greatness, ushered in corporate development and with it the bleached, repetitive, bland titles which for the most part we're still playing today. - David Wightman

Post Reply