Sign in to follow this  

OpenRCT2 - Finally!

Recommended Posts

blank    1,278

Someone is finally recompiling Rollercoaster tycoon 2, and converting it to C.
Much like what they did with OpenTTD.


RCT2 is one of my favorite games ever, however there were many bugs in the original that were never fixed or improved on, and windowed mode, and other such features were never properly implemented.

So someone finally trying to make it better is awesome. Especially when they improve the AI and add more f eatures.
The first thing i noticed when i rebuilt the code is the window which lets you scale, which is awesome! I have Rct2 with a window hack, but the resolutions on it suck, and you can't scale it.
Also they added a nice little cheat window. Old trainers such as 8cars won't work (different language i suppose), but they'll probably improve it within time.
So far, if you want to play this, you must already have RCT2 installed, because it still uses some of the files. Also you'll need to download the project from github, and rebuild it in visual studio yourself.
The reason they are doing it this way is it makes it faster to publish the updates, i suppose. The rebuilt file right now is only 2mb, so im sure someones could share.
Not sure of the legality of this, but they're going the same route that they went with OpenTTD, and it all ended up fine.
Great news, and this will keep us busy til Rct4 is released, or even after if rct4 is a microtransaction dud on pc.

1 Introduction 1.1 Background

OpenRCT2 is an attempt to decompile RollerCoaster Tycoon 2 into C. RollerCoaster Tycoon 2 was originally written in MASM and Visual C++ where functions related to interfacing with the operating system were written in C (supposedly 1%), with the rest of the game being written in pure x86 assembly. For an example of this method, OpenTTD was formed through a similar procedure; the original game, Transport Tycoon Deluxe, was decompiled into C which allowed for the addition of thousands of features to the game. RollerCoaster Tycoon 2 uses the third version of Chris Sawyer's engine, which shares some code with Transport Tycoon. This is reflected in the usage of OpenTTD 0.1 code such as the windowing system and graphics rendering. While the version of the engine used in Chris Sawyer's Locomotion is newer, OpenRCT2 is currently targeting the RollerCoaster Tycoon 2 engine to ease the decompilation process.

1.2 Decompiling the game

In order to decompile the game gradually without introducing new bugs, each procedure in RollerCoaster Tycoon 2 is to be re-written in C on an individual basis. To test the accuracy of the re-written procedures, the decompiled C procedures are compiled into a DLL (openrct2.dll) which exports an entry procedure mimicking the WinMain function in RollerCoaster Tycoon 2. The original executable rct2.exe has been patched so that openrct2.dll and WinMain are in the DLL import table and the WinMain export procedure in openrct2.dll is called at the start of the WinMain procedure in rct2.exe before returning. With this system implemented, starting rct2.exe calls the new DLL as part of its initialization; the DLL can then run all the decompiled code whilst still being able to read / write to the rct2.exe memory model and run rct2.exe procedures.

The project therefore acts as a patch to RollerCoaster Tycoon 2, allowing each procedure to be gradually implemented while simultaneously adding new features where possible. Until all procedures of the original game are re-written in C, the project must remain a DLL which is called from the patched rct2.exe.

1.3 Progress

Currently, the windowing system, graphics rendering and basic game loop are being decompiled. Decompiling all of the game's procedures is a convenient way of identifying the game's memory structure. SDL2 has been used as a replacement for the operating system calls, allowing for cross-platform support after the dependency on the original game's executable has been removed.

1.4 Aim

The aim is to completely decompile RollerCoaster Tycoon 2 into C so that cross-platform support, new features, and new gameplay can be added in a similar fashion to OpenTTD. With the addition of SDL2, the game can already be run in a resizeable window (which was not possible originally). Once the game has been fully decompiled, additional gameplay features, gameplay tweaks, and improvements can be introduced. The following is only a brief, non-exhaustive list of the possibilities - there is much more possible:

  • Improved peep path-finding
  • Increased window / ride / object / map / construction limits
  • More sandbox-friendly gameplay
  • Editing available objects
  • Improved title sequence
  • Re-introduction of RollerCoaster Tycoon 1 mechanics
    • Shuttle Loop compatibility
    • Have Fun! objective
    • Finish building five coasters objective
    • Using the mountain tool during the game


Enjoy :D

Share this post

Link to post
Share on other sites
nub    181

Very nice. RCT doesn't run in Windows 8 (well you can run it, just can't load games) due to no longer being able to disable visual themes.

  • Like 1

Share this post

Link to post
Share on other sites
blank    1,278

Wonder if rct2 works on 8. It should since it's fine in win7

Only problem I've had with openrct2 is it won't load games you saved with it that use custom objects and rides. Other than that no big probs.

Seemed to have changed some path finding. In rct2 you only needed a path to one side of the Information kiosk, on here it gives you a "guest can't get to ride/shop" message if you don't have it all around, which does make sense.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.