VOGONS


Reverse Engineering Sid Meier's Railroad Tycoon

Topic actions

Reply 20 of 25, by Max Headroom

User metadata
Rank Newbie
Rank
Newbie

I admire your patience. And your skills too! 😀

Reply 21 of 25, by KarhuIII

User metadata
Rank Newbie
Rank
Newbie

This thread is so cool.

Railroad Tycoon was my favorite game on the Amiga and I was extremely annoyed by 16-bit integer limits. Money was capped at $32,000,000 and you had to buy industries to not lose your revenue. But industries had that $32,000,000 cap too, so you had to invest on stations, trains, and the stock market. Eventually, your stock price will wrap around, too, and you will suddenly incur a deep loss.

68k CPU had only 32-bit registers... RRT was designed to run on low-end PCs with an 80286, which is probably why it relies on 16-bit integers. Probably it would run even on 8086...

It was also apparent that gfx rendering was inefficient on the Amiga. This was also annoying because there were games with more gfx going on on the screen than in this game. But ports were always like that.

Reply 22 of 25, by CMB75

User metadata
Rank Member
Rank
Member

This is an outstanding project. Your skill set has clearly enabled you to pursue an approach I wouldn’t have been able to take myself.

Over the past few weeks, I’ve been experimenting with my Amiga 1000 retro recreation, and naturally I couldn’t resist installing and playing Railroad Tycoon. Having recreated Pac-Man (Atari 2600 version) about 20 years ago, it didn’t take long before I was inspired, perhaps a bit ambitiously, to consider tackling something on the scale of Railroad Tycoon.

My own approach would have involved C++, SDL, and custom graphics and sound, largely because I’m more of a casual programmer and tend to revisit and relearn things over time.

Recognizing the limits of my current skill set, I searched for “Railroad Tycoon source code” today to help navigate some of the challenges and that’s how I came across your work. Rather than investing months into a project that would probably stall, I’m genuinely excited to follow your progress instead. Excellent work.

Reply 23 of 25, by pythagoras123

User metadata
Rank Newbie
Rank
Newbie

Wonderful project, this is astounding.
I always wondered about PAN files which are used in other Microprose games too. It's a tough nut and you seem to have cracked it.
Could you detail the format ? That would be a great help for other projects on MPS games.

Reply 24 of 25, by Wilczek_h

User metadata
Rank Newbie
Rank
Newbie

Dear Vogons,

Max Headroom, Karhull, CMB75 and pythagoras123: thank you so much for your kind words and support! 😀

pythagoras123: I have extracted the source code from the port that handles animation files. You can download it from HERE.

Note on the source: it will open a PAN file and dump all the frames to the disk as uncompressed 32-bit TGA files. All platform dependencies are removed as well as anything that is not related to PAN file handling. Now, the code is, well, extremely ugly. For me supporting PAN was just a nice to have and I put all my efforts to understand the structures used by RRT and the game logic. Therefore, the PAN handling is just a "direct" port. You will see in the source what I mean. You will need Visual Studio 2017 to build it, but I am pretty sure that the code will build with other compilers too if the proper make file is written. Feel free to clean this up and convert it to a proper C/C++ code 😀 (and don't forget to share it here 😉). (In a nutshell: the PAN contains a background image and sprites, all compressed. When drawing a frame the code restores the pixels from the background image where the sprites to be moved are and move the sprites to a new location.)

Best regards,
Wilczek (Zoltan Farkas)

Reply 25 of 25, by pythagoras123

User metadata
Rank Newbie
Rank
Newbie

Many thanks ! I'm working on the PAN files in Darklands and, while the format is different (different version ? darklands-specific ?) there are some similarities that will surely help. Thanks again and once again congrats for your work, it's remarkable and an inspiration.

Best,
-- pythagoras123