Reply 20 of 36, by Max Headroom
- Rank
- Newbie
I admire your patience. And your skills too! 😀
I admire your patience. And your skills too! 😀
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.
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.
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.
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)
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
Dear Vogons,
I have been quite silent online since April, but behind the scenes I was pretty busy with debugging the original, collecting ASM code and porting it. Fortunately, I managed to port a huge amount of code and figure out a lot of things. I was tempted to write articles of the findings, but in the end I always ended up deciding "yeah, I will write a summary after porting this portion of the ASM code/feature". Since the amount of stuff ported is huge, I could write a lot of articles, but I think it is better if I just released THE REAL DEAL!
Yes, I am making the latest binary/executable public, so that you can take a look and see for yourself what the status quo is. It is not even in the alpha stage; I would say this is the July 2026 release. Now I have to make a couple of things clear. If you look at the released port as a developer, you might say that "yeah, pretty nice progress, this project has potential". However, if you look at the port as a gamer/player, then you might say: "what the hack is this, it's not even playable yet".
Since I'm releasing this binary/executable on Vogons I guess people here will understand the complexity of this project and will appreciate what is already available in the port. Sure, you can't do much in the port, but: the maps are loaded and rendered, the trains are running according to their schedule, they pick up and deliver cargos, they produce revenue, in other words, the simulation part is almost ready. You can view the stations and even use the train roster and change the cars on the trains. One key element is now mostly implemented, which is the handling of the end of fiscal periods. Oh man, I thought it would be a cakewalk to port it, but the end of fiscal period handling code is enormous and it is full of overlay calls. It was a real pain to collect most of the ASM code.
First I thought: yeah, end of fiscal period is no big deal, 2 screens had already been ported, I just throw in 2 more screens and then I can call it a day. I couldn't be more wrong than that. First of all, all the fiscal values had to be "closed" and a new period had to be opened. Stock prices, warnings and records are also handled here. The new train maintenance costs are determined here too. Rate wars are evaluated at the end of fiscal periods, votes are cast, if you lose then tracks need to be eliminated. If an opponent is "fired" then its entire company has to be dissolved. Job points are calculated here, the need for retirement is determined here, bonuses are calculated, etc. etc.
Anyway, the code of the "usual/most common" path is collected and ported, so now simulation can run for more than 2 years.
Now the good stuff: you can download the port from HERE.
The zip only contains the x64 version of the port. If someone needs the x86 version then let me know and I will publish it as well.
As far as I know the original DOS version is freely redistributable and is considered abandonware. Therefore, the ZIP contains the assets from the original (.PIC, .DTA, .PAN, RR4.*, FONTS.RR, ...) too. If this is legally not OK then let me know and I will only distribute the port's binary file.
The port behaves according to the modern rules, so it creates the %LOCALAPPDATA%\FRRT folder when first started. Once started you can copy the test maps (*.SVE and *.MAP files) that came with the port into the %LOCALAPPDATA%\FRRT folder. This is nice if you have a multiuser setup as players won't be able to mess with each other's saved games. 😀 Important: do not copy the TestMaps folder into the %LOCALAPPDATA%\FRRT folder; only copy the content (the *.SVE and *.MAP files) of the TestMaps folder.
If any of the assets the port needs cannot be found, it will show a message box and then exit. Therefore, make sure you unzip all the files.
One more thing: if you want to try the port out in a Hyper-V VM (without a partitioned GPU or without GPU passthrough) then you will need to install the Microsoft OpenCL, OpenGL, and Vulkan Compatibility pack in the VM that is available here: https://apps.microsoft.com/detail/9nqpsl29bfff?hl=en-US. Obviously, you don't need this pack if you run the port on a physical hardware having an x64 CPU and on a GPU that supports OpenGL 2.0. Some words about Windows on ARM: WOA does not support OpenGL out of the box, but if you install the compatibility pack mentioned above then theoretically the port should work, but I could not test it. I will put my hands on a WOA device in November, so after that I might even come up with a native ARM build (but the compatibility pack will still be needed to get OpenGL working on WOA).
The plan is to release milestone builds regularly, hopefully every 2nd or 3rd month. In the end the entire source code will be available to the community. My aim is to preserve this fantastic game and let the community extend it later, for example with scenario editors, more engines, whatever that you can think of. But that is still quite far away from now.
What is in this build (the list is incomplete):
- Intro animation plays.
- Maps can be loaded and rendered. Only the "detailed display" option is supported. Tunnels and washed away bridges are not tested.
- Tutorial map can be loaded.
- Trains run according to their schedule, signals also work as expected.
- Game speed can be changed. Turbo, however, is handled differently than in the original.
- Train messages appear properly. The amount of time they are displayed can be changed in the Game menu as well as the messages can be switched off.
- Bonus delivery is handled as well as its "news".
- Find city dialog is implemented.
- Balance sheet and Income statement screens are implemented. Calculation is done on 32-bits, so no overflow should happen! Also, the calculation is precise, no rounding happens.
- Train income screen is implemented with paging.
- Stocks screen is implemented. Overdraw bug of the original is fixed and it scales nicely according to the available screen space. The entire space is taken into account when calculating the discrete points of the graphs.
- Accomplishments screen is implemented with bug fixes (so that certain accomplishment entries are not rendered off screen). The renderer uses the entire screen space and implements paging (which the original did not do).
- Efficiency screen is implemented with bug fixes, no numeric overflows happen in the port.
- Pressing "I" on a cell will provide information of the cell: what it is, what it supplies, and - if complex economy is turned on - it will also display what it demands and the supplied cargo amount is also shown. If "I" is pressed when a station is focused then the station is displayed with the available cargo and - if the complex economy options is turned on - the demanded cargos are also displayed. The game uses resolution independent rendering, so the entire screen space will be used.
- Interest rate payment per year is implemented.
- TAB is working, the train roster can be focused and the train report screen is displayed when the ENTER key is pressed.
- Cell development code is ported. (So that for example a village becomes a city, a forest cell becomes a "clear" cell, an industry appears, etc.)
- Engine info screen is implemented with a minor fix. ("1 car" instead of "1 cars")
- Train type can be changed.
- Schedule: Go to station and Wait until full/Don't wait options are implemented.
- Consists can be changed. A bug fix of the original is implemented, so that you cannot attach cars after a caboose car.
- Newspaper code is implemented including every event.
- New train introduced event is handled and the related newspaper message and train info are displayed.
- End of fiscal period: income statement and balance sheet screens are displayed. Fiscal period is closed and a new one is started. Rate war is partially handled, it is still a TODO. Train related warnings are calculated and displayed. Consider bankruptcy is calculated and the message is displayed. Record profit is detected and displayed. Stock prices are calculated for the player and opponents as well as the net worth values, etc. The summary screen is implemented where ranks are also displayed. Accomplishment entries are produced, if needed, like net worth value or revenue accomplishments. End of game is detected, if the player is fired or the player's company is taken over (this can only be triggered using the debugger) then the proper animation is played. Job offer screen is implemented.
- First cargo delivery animation is implemented. Service inaugurated screen is also done.
- New speed record is detected and the train naming screen is also implemented.
- Train collisions are detected, but not handled yet.
Some quality of life improvements over the original:
- 32-bit integers are used to calculate money, net worth, etc., so no overflow will happen 😀
- The 32M cash limit is eliminated.
- Rendering of maps and screens at any size.
- You can leave the loaded map and go back to the main screen without restarting the game.
- Scaling options: 2x, 3x, 4x and 5x. The default option is "3x". If your effective screen resolution is 1366x768 then use 2x.
- Skip intro option (so no logos, credits and no "trains are running everywhere" animation are displayed)
- The port can handle any number of saved games, not just 4. The files are processed on a separate thread and the loading of the list of saved games can be canceled.
- Animations in the game can be canceled. (You don't have to wait till the end if you don't want to. For example: first cargo delivery animation can be canceled/interrupted just by pressing e.g. the Enter key.)
- Menu item selection wraps around when reaching the top or the bottom in the port, which is nice. Selection does not disappear when pressing the left or right key.
- Some of the additional bug fixes of the original from the top of my head:
○ No-collision operation: when the train is stopped the train roster view in the original did not reset the speed indicator. -> fixed in the port
○ First cargo delivery: incorrect station name is displayed if the load of one of the cars of the given cargo type is 0 (then the default 0 extra station info index is picked up hence the wrong station is determined and the wrong station name is displayed) -> fixed in the port, it only considers cars with cargo load
○ efficiency: due to overflow incorrect percentage values might be displayed -> fixed in the port
○ income statement: fix: the port uses 32-bit integers and calculates the sum values correctly
○ accomplishments: not all entries were displayed by the original due to an IF being outside of a loop. The port fixes this + makes the list scrollable
○ stocks display: the graph overshoots the upper limit, for example stock price is $199 and the upper limit bar is at $200 then the tip of the graph will be drawn at $202! -> fixed in the port
○ Train report -> consist menu: if caboose only is chosen in the menu and then another car, the caboose car is replaced. However, if the "Caboose Only" item is chosen and then the consist menu is closed then reopened manually and a car is chosen, then the caboose car is not removed. -> fixed in the port
○ Reaching the bottom of the map will not cause constant flickering like in the original.
Important missing features related to the simulation part:
- Stations do NOT produce cargos yet. If all the cargos are picked up then trains will run with empty cars (or will wait forever if the "wait until full" option is set).
- Maintenance costs are not deducted yet.
- Opponent handling logic is not yet found and ported. No revenue is produced for the opponents. Opponent RR companies are not dissolved yet.
Additionally: no mouse input is supported yet, you can only use the keyboard in the port.
Important notes:
- the game will maximize its window or switch to full screen mode only when a map is loaded.
- please turn on VSync otherwise smoke puffs might not render correctly on some systems.
- the binary/executable is not signed. This means that it might get blocked via policies when started on a corporate machine.
Please post saved games here that are rendered incorrectly by the port or ones that crash the port.
So, there it is, let me know what you think about the first public build. 😀
Best regards,
Zoltan Farkas (Wilczek/FzSoftware)
I'll have more to say later once I've played with this, but my first note would be that it doesn't play well with Windows display scaling. My Windows has UI scaling set to 125% and the result is this:
Looks fine with the scaling at 100% though.
Fujoshi-hime wrote on 2026-07-26, 22:27:I'll have more to say later once I've played with this, but my first note would be that it doesn't play well with Windows display scaling. My Windows has UI scaling set to 125% and the result is this:
Looks fine with the scaling at 100% though.
Dear Fujoshi-hime,
Thank you so much for giving the port a try and reporting the DPI awareness issue. This is indeed something I still need to finish/fix. The next milestone build will be per monitor DPI aware.
Do you have any other feedback/comment to share?
Thank you and best regards,
Zoltan Farkas (Wilczek/FzSoftware)
Wilczek_h wrote on 2026-07-27, 14:38:Dear Fujoshi-hime, […]
Dear Fujoshi-hime,
Thank you so much for giving the port a try and reporting the DPI awareness issue. This is indeed something I still need to finish/fix. The next milestone build will be per monitor DPI aware.
Do you have any other feedback/comment to share?
Thank you and best regards,
Zoltan Farkas (Wilczek/FzSoftware)
It's a little hard to test it. From what I read, really only loading saves and the tutorial works. I couldn't start a 'new' game, I hit enter and nothing happened. Same with 'Play Alone', no action. In the tutorial any build functions seemed greyed out so I couldn't test much. I read your main post on the release and I don't think much of this is supposed to work yet or did I miss something?
Still, in the tutorial it was great to see it ticking away and trains delivering goods and such. Especially in 16:9, something DOSBox would never accomplish.
I do have some QoL function questions even if their implementation could be far away, this game assumes the player has a numpad and can use the diagonals on the numpad for diagonal cursor movement and track laying. Here in 2026 not every keyboard has numpad, could alternate mappings be entertained? Like say focusing around the WASD keys plus diagonals? And as a big fan of my Steam Deck for tycoon games when I'm traveling, would you be willing to look at game pad input/mappings when this is far later along?
If there's a way I could test more gameplay cause I missed something, please let me know. I couldn't even lay any track.
Fujoshi-hime wrote on 2026-07-28, 02:18:It's a little hard to test it. From what I read, really only loading saves and the tutorial works. I couldn't start a 'new' ga […]
Wilczek_h wrote on 2026-07-27, 14:38:Dear Fujoshi-hime, […]
Dear Fujoshi-hime,
Thank you so much for giving the port a try and reporting the DPI awareness issue. This is indeed something I still need to finish/fix. The next milestone build will be per monitor DPI aware.
Do you have any other feedback/comment to share?
Thank you and best regards,
Zoltan Farkas (Wilczek/FzSoftware)It's a little hard to test it. From what I read, really only loading saves and the tutorial works. I couldn't start a 'new' game, I hit enter and nothing happened. Same with 'Play Alone', no action. In the tutorial any build functions seemed greyed out so I couldn't test much. I read your main post on the release and I don't think much of this is supposed to work yet or did I miss something?
Still, in the tutorial it was great to see it ticking away and trains delivering goods and such. Especially in 16:9, something DOSBox would never accomplish.
I do have some QoL function questions even if their implementation could be far away, this game assumes the player has a numpad and can use the diagonals on the numpad for diagonal cursor movement and track laying. Here in 2026 not every keyboard has numpad, could alternate mappings be entertained? Like say focusing around the WASD keys plus diagonals? And as a big fan of my Steam Deck for tycoon games when I'm traveling, would you be willing to look at game pad input/mappings when this is far later along?
If there's a way I could test more gameplay cause I missed something, please let me know. I couldn't even lay any track.
Dear Fujoshi-hime,
Thank you so much for the additional comments/feedback.
You read/got it right, only the Load Game and the Load Tutorial options are implemented and you can mainly watch trains running around and the simulation working (as well as checking reports, change train consists, etc.). Anything else that is grayed out (disabled) in the menus is not yet implemented.
However, if you copy the content of the TestMaps folder that is in the ZIP file to the %LOCALAPPDATA%\FRRT folder, then you will have 16 more maps to check out when you choose the Load Game option. It should look like this:
Some of the saved games listed above (Investor, 1946 and similar) offer large networks and a lot of trains, tracks crossing the ocean and a mix of steam and electric engines, so watching the simulation is more exciting when such a map is loaded. Try the one that is highlighted in the screenshot. 😀
Regarding key bindings:
It is definitely planned to provide alternate options to build tracks. I realized the need for this when I wanted to play the original on one of my notebooks, but the notebook had no numpad. The idea is to go with Ctrl+Shift+Q/W/E/A/D/Z/X/C and Ctrl+Shift+arrows+Home, Page Up, Page Down and "End" for building and Ctrl+Alt+<the same> for destroying tracks. One caveat is that some keyboard layouts swap Z with Y, not to mention the "AZERTY" layout, so I might have to choose other keys, but the point is that this will definitely be addressed when I start implementing the "track building" feature. (I might even make the key bindings customizable, we will see.)
On the other hand, gamepad support is not planned as it is not part of the MVP.
Thank you for your support and best regards,
Zoltan Farkas (Wilczek/FzSoftware)
This is so amazing , thank you for your time and effort . I had just been playing the amiga version the last couple of days.
Originally i was just browsing the internet if anyone found a way to remove the train and station limit and then came accross your wonderfull project.
I downloaded the released version and it is amazing to see the map on a high scale. Impressed by how far you got.
I loaded a view saves and it's really nice - i hope you find the time and fun to continue working on it.
what else would need to be tested ?
redobar wrote on 2026-07-30, 22:05:This is so amazing , thank you for your time and effort . I had just been playing the amiga version the last couple of days. Or […]
This is so amazing , thank you for your time and effort . I had just been playing the amiga version the last couple of days.
Originally i was just browsing the internet if anyone found a way to remove the train and station limit and then came accross your wonderfull project.I downloaded the released version and it is amazing to see the map on a high scale. Impressed by how far you got.
I loaded a view saves and it's really nice - i hope you find the time and fun to continue working on it.what else would need to be tested ?
Dear "redobar",
Thank you so much for testing the July 2026 release, for the feedback and for the kind words.
Regarding your "what else needs to be tested" question: if you have a saved game from the DOS version that you tested with the port and the port rendered it incorrectly or crashed it, then please share the saved game files with me. Otherwise I think you covered all the implemented features for now 😀.
Thank you and best regards,
Zoltan Farkas (Wilczek/FzSoftware)
I started a new RR on the dos version and copied over the save files.
so far the rendering looked good.
When getting to the financial record it showed an error :
It opens the income statement and then a popup "error" with : Extra station info index out of bounds (255); GetExtraStationInfo
redobar wrote on 2026-08-04, 21:17:I started a new RR on the dos version and copied over the save files. so far the rendering looked good. When getting to the fin […]
I started a new RR on the dos version and copied over the save files.
so far the rendering looked good.
When getting to the financial record it showed an error :
It opens the income statement and then a popup "error" with : Extra station info index out of bounds (255); GetExtraStationInfo
Dear redobar,
Thank you so much for further testing the port and sharing the maps that crashed it.
Here are the details:
The crash is caused by the fact that there is a signal tower and the port did not check the station type (signal towers are also stored in the stations array). Here is the code fragment of the port:
And here is the original ASM code. I highlighted the code lines that I forgot to port:
This is just a one liner fix, fortunately. Today in the evening my time or tomorrow I will release a new milestone build with the fixes.
Thank you for your continuous support and best regards,
Zoltan Farkas (Wilczek/FzSoftware)
Dear Vogons,
As promised I'm releasing a fixed version of the port. Special thanks to "redobar" for reporting the issue and sharing the maps that could be used to repro the issue. The details of the problem are described in my previous post.
You can get the updated port from here.
Regarding the DPI awareness problem reported by Fujoshi-hime:
I started to update the code to support per monitor DPI-awareness, but it's incomplete yet.
Notable changes in this build: if the game is started on a display that has a scale setting larger than 100% then the game screens will appear properly. However, when you move the window to another monitor that has a smaller or larger scale setting then the displayed image will be incorrect.
On the other hand, when a map is loaded and trains are running around then the displayed image will be OK (as for the simulation I use resolution independent rendering), even if you move the window around and change the scaling while the game is running. This is not the case though for the setup, intro/credits and scenario screens.
Note: the "New Game" and "Play Alone" options are not yet implemented, you can only load saved games or the tutorial map.
Best regards,
Zoltan Farkas (Wilczek/FzSoftware)
Wilczek_h wrote on 2026-08-05, 22:00:Regarding the DPI awareness problem reported by Fujoshi-hime:
I started to update the code to support per monitor DPI-awareness, but it's incomplete yet.
Just glad I don't have to adjust the scaling on Windows to test it now. 😁 Nice to see, looking forward to a 'playable' test eventually.
In the future will it be possible to have to full screen on startup? That intro with the scrolling trains is not the same windowed.