OpenRCT2

From RollerCoaster Tycoon Wiki Wiki, the RollerCoaster Tycoon encyclopedia that anyone can edit.
Revision as of 05:19, 30 January 2017 by Androgeos Exeunt (talk | contribs) (Added the OpenRCT2 logo.)

OpenRCT2 is a recreation of RollerCoaster Tycoon 2 (RCT2) in open-source code, incorporating some features from the original RollerCoaster Tycoon (RCT1) that do not exist in other RollerCoaster Tycoon games, while also fixing some issues and improving upon some details in the official games, as well as adding a functional multiplayer feature that allows several players to co-build a single park.

OpenRCT2 is free software, licensed under the GNU General Public License v3.0.

Architecture

This article or section is under construction.

You can help by editing it! Relevant discussion may be available on this article's discussion page.


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.

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 executablerct2.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.exebefore 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 therct2.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.

Features

OpenRCT2 adds several features that are not available in RCT1 and RCT2, including:

  • Support for high resolution displays
  • Window/Fullscreen toggle
  • Incorporation of features unique to RCT1 within the RCT2 environment, such as:
    • Using the mountain tool during gameplay
    • Sorting rides by track type (e.g. the Twister, Stand-Up Twister, Floorless and Hyper-Twister Roller Coasters are all re-categorised as Steel Twister Roller Coaster, with their individual vehicle types selectable from a built roller coaster's Vehicles tab)
    • Enabling both Powered Launch operating modes for all roller coaster types with the Powered Launch operating mode
    • Steep drop and flat-to-steep and steep-to-flat track pieces for the Junior Roller Coaster
    • Booster track piece for the Looping Roller Coaster, Corkscrew Roller Coaster and all Steel Twister Roller Coaster variants
  • Improved guest path-finding AI
  • Increasing the selectable region in landscaping tools to 64 tiles square
  • Enabling the scatter tool for scenery objects during gameplay
  • Enabling the "Have Fun!" objective in the Scenario Editor
  • Custom menu screens
  • A (graphically) customisable user interface
  • Night Mode toggle (causes the game to periodically dim the park environment to simulate nighttime)
  • An FPS counter
  • Online multiplayer
  • Multilingual translation
  • Twitch TV integration (guests in a park are named as viewers in a Twitch TV stream)
  • Hardware-accelerated graphics (on graphics cards that support hardware acceleration)
  • A fully functioning 64-bit application
  • A built-in cheat function, which enables such cheats as:
    • Construction while the game is paused
    • Lift/launch speeds up to 255 mph/410 kmh
    • Rides with 31 trains and/or 255 cars per train
    • Player-triggered guest generation
    • Extra cash
    • Forced Park Ratings
    • Ride renewal
    • Player-triggered ride breakdowns/fixes
    • Disabling of random ride breakdowns
    • Resetting of a ride's crash status
    • Changing the scenario objective to "Have Fun!"
    • Completing the scenario objective (including "Have Fun!")
    • Access to Scenario Editor options
  • A built-in console that enables advanced features/cheats such as the editing of available objects

Development

This article or section is under construction.

You can help by editing it! Relevant discussion may be available on this article's discussion page.


Development started on April 2nd, 2014 by Ted 'IntelOrca' John. Thanks to numerous contributions from others the OpenRCT2 project is making great progress and already has new features.

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.

As of 16th August 2014, various UI improvements have already been made, settings are now stored in a local INI file. More drawing functions have now been decompiled but still remain cryptic C, much of the game management have been decompiled (e.g. peep generation, awards, cash out) and almost half of the windows. A rough estimate based on number of functions in the original game and number of functions now in C tells us that the project is approximately 25% complete of its target goal of having the game run on 100% C code. More information can be found in changes to original game andwindow progress.

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 are many more:

Distribution

As OpenRCT2 is free software, no payment is required to obtain a copy of it.

OpenRCT2 can be built on most modern computers, and this is the recommended method of obtaining the game. The source code for OpenRCT2 and instructions on how to build a copy of it are available on the OpenRCT2 GitHub Page.

Automated builds are also available from the official OpenRCT2 website's download page.

A separate program known as the OpenRCT2 Launcher also installs and automatically updates a copy of OpenRCT2, while featuring the ability to customise some OpenRCT2 settings that are not immediately visible, such as a customisable default window size.

Limitations and Known Issues

This article or section is under construction.

You can help by editing it! Relevant discussion may be available on this article's discussion page.


OpenRCT2 is not a standalone game, requiring the official files from RCT2 to function. In its current state, it also maintains full compatibility with any game saved in RCT2, and any game saved in OpenRCT2 can also be loaded in RCT2 with few issues. For this reason, games saved in OpenRCT2 are subject to the same engine limitations in RCT2, such as:

  • A maximum of:
    • 255 rides and shop/stalls in a park
    • 255 staff in a park
    • 1,000 guests in a queue line
    • 8,192 game years
    • 10,000 objects in a game
    • the same (seemingly variable) sign/banner limit

The limitations in OpenRCT2 are expected to disappear if and when new file formats for scenarios, tracks and saved games are introduced at a later date, when OpenRCT2's feature list is completed.

In New Media

OpenRCT2 was used by Vargskelethor Joel from Vinesauce to livestream footage of RollerCoaster Tycoon 2 from his Twitch TV channel on several occasions. A compilation of scenes from those livestreams can be viewed on his YouTube channel here and here; the full livestreams can be viewed on his alternate YouTube channel here.

Links