Revisit to the Tripfest Era: Transport Tycoon Deluxe

It’s been far too long since I came up with decent material to put up here. Rather than let my blog die, the organic creature that it is, I thought I might as well look deep in my archives of half-baked articles and post something from there. This is one such article that I have no clue why I haven’t published as yet. I wrote it loooong ago, around the time of my rant about PlasmaPong, and is of a similar theme (and no surprise it’s a rant too). Anyways, here it is, in it’s raw un-edited format (oh, the value addition of lazyiness):

Transport Tycoon Deluxe

This game was one of the first simulator games and was the hottest game of the 90’s. Yes, the nineties when everything looked like a DOS game, NFS was like racing cardboard boxes and when Oasis ruled the world. Ok fine, that last point wasn’t true (though I wish it were). Back to the point, TTD was a phenomenal success, but it had a lot of drawbacks. The AI was like playing your three year old brother who shows you all the cards, and will give you that Wild-Draw-Four if you ask him nicely (i.e. threaten to clobber him). The maps were kinda limited and there were quite a few bugs.

Enter OpenTTD. This is an open-source implementation of the TTD engine, i.e. every part of the game minus the maps and the vehicles, etc. Imagine this vague Scandanavian dude who actually reverse-engineers TTD. This is not a joke. You have to figure out what the program did by looking at the final assembly instructions for it (actually you only have the condensed assembly instructions that are essentially 1’s and 0’s. But you can go from the assembly to ‘op-code’ and back pretty easily). Just to give you a sample of what the hell that means, this is the op-code for the “Hello World!” program (and I can hear all the CS110 chaps groaning).

Code OpCode
1
2
3
4
5
6
7
8
9
#include <stdio.h>

int main() {

printf ("Hello World!\n");

return 0;

}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.LC0:

.string "Hello World!"

.text

.globl main

.type   main, @function

main:

leal    4(%esp), %ecx

andl    $-16, %esp

pushl   -4(%ecx)

pushl   %ebp

movl    %esp, %ebp

pushl   %ecx

subl    $4, %esp

movl    $.LC0, (%esp)

call    puts

movl    $0, %eax

addl    $4, %esp

popl    %ecx

popl    %ebp

leal    -4(%ecx), %esp

ret

So you have some clue what kind of pain this guy went through to get this done. His new version features a much improved AI, lots more flexibility for the themes, and more robust code. What does our chap Chris Taylor say? “Meh, f00 you, you can’t use my game’s (the Original Transport Tycoon Deluxe) content for your game”. Right now, most sales of TTD are out of stock and most importantly I’d like to say: IT’S A FRIGGIN’ DOS GAME!. The number of people who are willing to pitch in cash to buy something this old is equivalent to the number of people in this world who go to work every day holding a lightning rod to see if they get zapped and transform into the Shocker (from Spiderman). Jesus man, let it GO.

  • arunchaganty
    :-D. Yep! I used to do both!
  • Roshan
    Ha ha, Arun, messing with the AI _is_ fun. There was the other trick to kill their reputation when they cheated to 100% — build rail over public roads that their vehicles travel on and destroy their trucks and buses.

    In TT, you could also build depots at the end of their stations and run a cheap train into their expensive diesel locomotives :D
  • arunchaganty
    Hey Roshan,
    Yep, I remember.
    I've never heard of the Mars version of Transport Tycoon, but you're the first guy in a long while I've met who even knew about the awesome game. My favourite memory was utterly screwing with the crappy AI - I'd build a shorter road along the path of my opponent, and then destroy road segments and trap vehicles. The opponent would incur all of the operating costs (how?) without being able to do anything about it :-).

    About the decompling - yeah, I know that, but this was written long ago, when I was still naive. And besides, it's a lot less dramatic ;-).
  • Roshan
    Hi, Arun. In one of those total coincidences, a friend of mine sent me a link to your blog today. Arghya and I met you in Tiffany's (or however they spell it) a couple of days ago.

    Anyway, I was quite an avid fan of TTD (and TTDPatch'd TTD) back in the day and, if you'll believe it, TTO (even the Mars version, yes). That dude who started OpenTTD is awesome! However, if I remember correctly, he didn't do everything by looking at the corresponding assembly language, he used a decompiler for certain parts. Converting the decompiled code is as much of a pain though.

    Ah, The Shocker, a name from a more innocent time.
blog comments powered by Disqus

Bad Behavior has blocked 527 access attempts in the last 7 days.