Posted
by
Soulskill
on Tuesday August 10, 2010 @09:30PM
from the not-the-opposite-of-starboarded dept.

An anonymous reader writes "Last year, I got the opportunity to port Remedy Entertainment's Death Rally to modern platforms off its original MS-DOS sources. I wrote an article about the porting process for Game Developer magazine, and now I've posted the text of the article for general consumption. 'The source software platform was DOS, Watcom C, and some Dos4GW-style DOS extender. The extender basically meant you could use more than 640k of memory, and would not need any weird code for data larger than 64k. The game displayed in VESA 640x480 and MCGA 320x200 graphics modes, all with 8-bit palettes; there was no true color anywhere. There were also some per-frame palette change tricks that emulators have trouble with. The source code was mostly pure C with a couple dozen inline assembly functions. There were a few missing subsystems, specifically audio and networking, which would have to be replaced completely anyway, as well as one file for which the source code was lost and only a compiled object was available.'"

As did I. Quake, Duke3D, Shadow Warrior, and Death Rally all came out in 1996 and I still play them regularly after all this time. I wonder what is it about those early years that keeps their games so appealing over time. Maybe they focused more on gameplay than graphics.

Nah, it's just they were great games. Daikatana is as old as those you mentioned, but I don't think there's a single Slashdotter that'd submit himself to play it again if they even finished it the first time around.

Daikatana was originally planned to release Christmas of '97, so even if it had released on time, it would be a year newer than the others mentioned. Of course, it was finally excreted onto the market in 2000, so it's by no means as old as those mentioned.

Looking back at "classic" games is always done through the microscope of nostalgia. You remember the good ones and forget most of the rest, (with the exceptions of memorable cockups like Daikatana.) Anyone remember the glut of FPS's shortly after Doom?

These were fun games, and it was really cool to be able to interact with objects in a 3D environment that was being generated on the fly, but modern games look and react better. You just happened to be there when we moved from side scrollers to 3D worlds, and it's like the first girl you ever kissed: there's nothing really that special about her, except to you.

I hadn't played anything too seriously since Quake3 and Unreal Tournament 2K4. Truly fun competitive FPS seems have died after that. I do greatly enjoy the Left 4 Dead franchise however, which goes to show that the genre isn't a complete bust nowadays.

I'm amused at the irony of referring to games like Quake as "gameplay rather than graphics":)

When Quake came out, the most notable thing about it was how it was pushing the graphics barrier. Sure Quake was fun too, but I still remember people sitting around saying "But all these older games I like playing from the 80s are so much more fun, developers should concentrate on gameplay rather than graphics!" And indeed, the FPS genre since the

That is ironic, wow. Quake was revolutionary, in that it moved away from pixel/raster rendering to polygons, but it's lineage came directly from real, fun games too. That's why Quake pioneered such new gaming techniques such as rocket jumping, fragging and infatuation with zombies:)

Full disclosure: I spent a few hours last night paying Death Rally, and wish I was at home now so I can play more!

Unlike Death Track... Death Rally is actually playable, and isn't rated up for its age and nostalgia filter like that rose-tinted young idiot like many on that site have "reviewed" and putting up broken rips of games that often get DOSBox bug reports because abandonia is a bunch of morons that upload bugged rips. Some "preservation" mission they've got there, if they were serious about that, pristine disk images and complete manual and feelies scans would have been done... but nah, to 'own' a DOS game in th

It's a top down racer and a completely different animal, like the Micromachines games on NES. As such, it's a completely different animal and I don't enjoy it much because of the limited size of the map you see.

Death Track was awesome. Resurrection was an absolute abomination that tarnished the name.

I remember when this game came out. It was created by some members of the demo group Future Crew [wikipedia.org]. The soundtrack features track(s) by Purple Motion.

I wonder what the code looked like! Demoscene coders were known to optimize the heck out of it for speed. I remember this game was super impressive and smooth on the barely-pentium computers in 1996. Not to mention fun.

Mikko "Memon" Mononen, founder of Demoscene group Moppi Productions [inside.org] and developer of the legendary Demopaja Demotool, is a programmer at Crytek, located in Frankfurt, Germany. He expanded the company-owned CryEngine with spectacular effects.

Graphics artist Xenusion of the group Plastic [nazwa.pl], an exceptionally gifted graphician, participated in demos such as 195/95 and Final Audition. He's been working on the fascinating world of Crysis as a concept artist.

Porting from DOS to WindowsStep by step through Death Rally's journey to the new millennium

This article first appeared in April 2010 issue of Game Developer Magazine, Inner Product, pages 38-41. With a better layout. And pictures.

So, the 'last May' below refers to May 2009.

Max Payne / Alan Wake creator Remedy's top down combat racing game Death Rally was released for DOS computers in 1996, and although it does run under the open source DOSBox emulator, it doesn't run very well. I felt that Death Rally was still a good game and wanted to get it into a playable form again.

So last May I got an idea, and thought, "what the heck, let's go for it." I sent an email to Remedy Entertainment, volunteering to make Death Rally open source. I didn't expect a reply; at the most, I expected a polite "no." Much to my surprise, I got a "maybe."

After a couple weeks of legal checking, we agreed that while an open source release would not necessarily be possible, we could probably work something out. And so it came to be that in July, I downloaded the source package for evaluation.

The first task would be to take a cursory glance at the material and see if the project was actually possible. I expect some of you to wonder whether there was any funny code. Sure there was. Take a peek at any large project you've done as a teenager over a decade ago and see if there's any funny code in there. I couldn't find anything truly "daily wtf"-worthy, though, and what I did find wasn't anything a few days of refactoring wouldn't fix.

Instead of refactoring, I took an archeologist's approach - I made minimal changes and marked my transgressions clearly in the source code.Starting Blocks

The source software platform was DOS, Watcom C, and some Dos4GW-style DOS extender. The extender basically meant you could use more than 640k of memory, and would not need any weird code for data larger than 64k.

The game displayed in VESA 640x480 and MCGA 320x200 graphics modes, all with 8-bit palettes; there was no true color anywhere. There were also some per-frame palette change tricks that emulators have trouble with.

The source code was mostly pure C with a couple dozen inline assembly functions. There were a few missing subsystems, specifically audio and networking, which would have to be replaced completely anyway, as well as one file for which the source code was lost and only a compiled object was available.Getting It To Compile

First order of the day: get the game to compile. I started a Visual Studio project, imported all source files, and checked what the compiler would say.

The Visual Studio and Watcom compilers disagree on several points, which is hardly surprising as the Watcom version used was about a decade older than the Visual Studio I used.

One of the obvious things is that Watcom considers chars to be unsigned, while MSVC sees them as signed by default. There's a compile option in MSVC for this, but in order to avoid confusion further down the line, I opted to do some search-and-replace operations to designate all chars unsigned (except for those that were explicitly set to be otherwise).

MSVC is also much pickier about types, so I got lots and lots of warnings, and even errors in some cases. Most of these were relatively easy to fix - some typecasts here, a prototype added there, sprinkle some parentheses around. One rather tricky bit was where Watcom and MSVC disagreed slightly on requesting the address of an array, so I had to manually patch things up in a few hundred places.

After fixing a truckload of errors and warnings, and stubbing all assembly functions as well as other missing symbols, I ended up with about 90 functions that needed rewriting.No More Hardware Access

In DOS, there's not much of an operating system in your way. You could, and in many cases you must, access hardware features directly. For instance, graphical video memory was mapped to the real-mode segment 0xa000.

Head on over to CurmudgeonGamer.Com and get something more worth your while. What are they secretly booting a modified VM with FreeDOS and then running Death Rally.exe as a shell and trapping anyone from seeing what they're doing? Just...just stop ruining my memories, all you 6-year-olds that watched me play when the games came out. Now all these young-blood 22-year-old College students are earning their U$30K College-duhploma debt and start nagging at my

hey, if you think you can do better maybe you should have had a crack at it? also you may have noticed that he was paying more respect to the code than trying to get the thing to go as fast as possible, so indirectly he was doing exactly what you want:)

Which makes sense - while the game would play on something significantly less, the OS and libraries would take significantly more resources.

And man, does that bring back porting nightmares - I ported some stuff from DOS to Mac circa MacOS 7 (maybe even 6... long time ago - pre-Codewarrior, which was my preferred mac tool later on) and having to deal with 64k and 640k barriers on DOS and 32k paging on the mac was probably the most frustrating thing about it. The code was all C and printed lots of C strings,

No multiplayer? In the mid 90s we'd wired the 4-plex I lived in with ethernet and Deathrally was one of the games we played after work. We even managed to play it over the Internet with Kali although the latency was a gameplay problem.

Deathrally really shined in competitive play. I hope it gets added at some point!

I used to play this game all the time in high school. I installed the port and played it for 40 minutes just now. I needed to tear myself away it was so fun! I still remembered the little tricks like lagging behind for the first quarter of the first lap so the other cars would deplete their ammo on themselves instead of you. And I never realized that the item on the track that got you "drunk" was actually a mushroom!

Or the MacOSX version. Doesn't seem that hard to port a DOS game to those other platforms at the same time, given that an old DOS game isn't going to use a bunch of Windows APIs that are tough to port.

It's time for a game of Six Degrees of Separation: Future Crew Edition

Next up was audio. The game used Scream Tracker S3M modules for music and Fast Tracker 2 XM modules for sound effects. Why both were not in the more advanced XM format, I do not know. Maybe XM for sound effects was a later addition, or maybe the composer preferred the S3M format.

The music's composer was Jonne Valtonen [wikipedia.org], however for any of you familiar with the PC demoscene, you'd probably better recognize him as Purple Motion. In the early-to-mid 90s, Purple Motion was a member of the Future Crew [wikipedia.org], the famous Finnish demo group responsible for the legendary demo Second Reality [wikipedia.org], the same demo on which Purple Motion was the principle musician.

The Future Crew often wrote their own tools; one of those tools was Scream Tracker [wikipedia.org]. Purple Motion didn't write it (he wasn't a coder nor a member of the Future Crew at the time), but it was the tracker software he used for all of the Future Crew demos he worked on. Ultimately he's responsible for a number of the masterpieces written in Scream Tracker.

This brings us to Death Rally. When the Future Crew split up in 1995, the bulk of the members gravitated towards a new company started by former Future Crew members: Remedy Entertainment. Remedy is of course is the developer of Death Rally and Purple Motion was one of the Future Crew members to move to Remedy.

And thus, this is why the music for Death Rally is written in Scream Tracker 3. Death Rally's music composer came from the group that created Scream Tracker in the first place, and that was the tracker software that he had the bulk of his composing experience with. And while I obviously can't speak for him, I'd imagine he preferred S3M.

"The Demoscene Documentary [demoscenedoc.com], with an embedded video that seems to show English closed captions/subtitles overlay correctly, and Pouet [pouet.net] mention a seventeen minutes and 10 seconds Finnish YouTube video [youtube.com] (turn on its "Transcript" option to read the English texts to go with the video) showing a "documentary episode about the world famous Finnish demogroup, Future Crew [wikipedia.org]. First presented at Assembly [assembly.org] 2010..."

For years I've wanted to port Dark Sun I and II to modern architectures. Since the games have been released as freeware a few years ago, I don't think there's any good reason to avoid such a port; however, I've been unable to track down someone who can give me access to the source code (and I have good reasons to believe it does exist somewhere).

If anyone happens to know who may be contacted regarding this, please let me know...

While you're at it, perhaps you could fix some of the ridiculous crippling bugs in the second one? (That said, I've never had any trouble getting either of them to run on XP, without dosbox or anything. Just saw a whole lot of game-becomes-unwinnable bugs in WotR. Man, I haven't thought about that series in *years*...)

So, why is this game called Death Rally? I had some vague memory of it, and sure enough I played it for a while back when it was new. There's no running people over for points. There are spectators on the race track but you get nothing for mowing them down, in fact it's a bad idea as it slows your car.

I'm surprised this got republished at all. It's got Duke Nukem in it with his portrait, and he says, "Hail to the King, baby!" when he wins the race. It also has a digitized sample of Tommy Chong saying

... the article about porting the game and I found it interesting. It would be better, though, to be open source and would be able to compare the changes in the code, just for educational purposes. Recently I came across with a rather interesting article [fabiensanglard.net] describing the process of porting the open source code of Doom to iPhone.

... the article and I found it interesting. But it would be more interesting if the code was open source and could see all these changes with our eyes, just for educational purposes. A nice article [fabiensanglard.net] that I came across lately just review the code of Doom which ported to iPhone by iD [idsoftware.com].

Most of the assembly functions were little things, like rectangle copy or bit mask matching, and did not take too much effort to write. First the menus, then the in-game graphics started to come into view. This part was pure joy - not so different from eating pistachio nuts: each bite takes a little effort, but has a huge payoff. I always wanted just one more, making it very difficult to call it a day.

This game is available for full download from the developer's website last time I checked. The grpahics and top down bird's eye view was one of the features that made the game "stand out" . V simimilar to the first GTA that came out althought that took the top down view to a whole new level in terms of scale being not just a race track but an entire city. Anyways bk to the article - interesting bit of news I didnt know lol