When sending a mechanic to a ride exit/entrance, the original pathfinding was setting the goal to the path next to the exit/entrance with goal.z set to the exit/entrance height. This is wrong when the path slopes up to the exit/entrance. Consequently the original pathfinding included a hack to allow the mechanic to enter the exit/entrance from the goal tile.
The changes in PR #4527 (commit f3cf23f) will ignore the relevant tile when the height is wrong, preventing the original hack from working. To fix this the height of paths sloping up was adjusted in the heuristic search ... which inadvertently broke pathfinding for other goals on such a sloped path (such as the start of a ride queue that slopes up).
To fix, set the goal to the ride exit/entrance itself, make the heuristic search aware of ride exits (code existed but was commented out; entrances are already there for rides without queues) and remove both the original hack and the (incorrect) heigh adjustment made in PR #4527.
Fixes issues #4626, #4629.
OpenRCT2
An open-source re-implementation of RollerCoaster Tycoon 2. A construction and management simulation video game that simulates amusement park management.
Build Status
| Windows | Linux / Mac | Download | |
|---|---|---|---|
| master | |||
| develop |
Chat
Contents
- 1 - Introduction
- 2 - Downloading the game (pre-built)
- 3 - Building the game
- 3.1 - Building prerequisites
- 3.2 - Compiling and running
- 4 - Contributing
- 4.1 - Bug fixes
- 4.2 - New features
- 4.3 - Translation
- 5 - Licence
- 6 - More information
1 Introduction
OpenRCT2 is an open-source re-implementation of RollerCoaster Tycoon 2 (RCT2). The gameplay revolves around building and maintaining an amusement park containing attractions, shops and facilities. The player must try to make a profit and maintain a good park reputation whilst keeping the guests happy. OpenRCT2 allows for both scenario and sandbox play. Scenarios require the player to complete a certain objective in a set time limit whilst sandbox allows the player to build a more flexible park with optionally no restrictions or finance.
RollerCoaster Tycoon 2 was originally written by Chris Sawyer in x86 assembly and is the sequel to RollerCoaster Tycoon. The engine was based on Transport Tycoon, an older game which also has an equivalent open-source project, OpenTTD. OpenRCT2 attempts to provide everything from RCT2 as well as many improvements and additional features, some of these include support for modern platforms, an improved interface, improved guest and staff AI, more editing tools, increased limits, and cooperative multiplayer. It also re-introduces mechanics from RollerCoaster Tycoon that were not present in RollerCoaster Tycoon 2. Some of those include; mountain tool in-game, the "have fun" objective, launched coasters (not passing-through the station) and several buttons on the toolbar.
2 Downloading the game (pre-built)
OpenRCT2 requires original files of RollerCoaster Tycoon 2 to play. It can be bought at either Steam or GOG.com.
OpenRCT2.org offers precompiled builds and installers of the latest stable and the develop branch. There is also a cross platform Launcher available that will automatically update your build of the game so that you always have the latest version.
Some Linux distributions offer native packages already. These packages are usually third-party, but we're trying to resolve issues they are facing.
- ArchLinux AUR: openrct2-git and openrct2
- Ubuntu PPA:
masterbranch anddevelopbranch (developbranch builds are temporarily on hold due to missing functionality in bzr) - OpenSUSE OBS: games/openrct2
3 Building the game
3.1 Building prerequisites
OpenRCT2 requires original files of RollerCoaster Tycoon 2 to play. It can be bought at either Steam or GOG.com.
Windows:
- Vista / 7 / 8 / 10
- Visual Studio 2015 Update 2 (Enterprise / Professional / Community (Free))
- 7-Zip (for deployment only)
- NSIS (for deployment only)
Mac:
Mac / Linux:
- sdl2
- sdl2-ttf
- speexdsp
- curl (only if building with network support)
- jansson (only if building with network support)
- iconv (part of glibc on Linux)
- cmake All libs listed here (bar cmake) required in 32 bit variants.
3.2 Compiling and running
Windows:
- Check out the repository. This can be done using GitHub Desktop or other tools.
- Open a new Developer Command Prompt for VS2015, then navigate to the repository (e.g.
cd C:\GitHub\OpenRCT2). - Run
msbuild openrct2.proj /t:build.
Once you have ran msbuild once, further development can be done within Visual Studio by opening openrct2.sln.
Other examples:
msbuild openrct2.proj /t:clean
msbuild openrct2.proj /t:rebuild /p:configuration=release /p:platform=x64
msbuild openrct2.proj /t:g2
msbuild openrct2.proj /t:PublishPortable
Mac:
We support native builds for macOS (limited to i386 only for now). Make sure that you have Homebrew installed and than run the following commands to install all the needed libraries and build OpenRCT2.
# Install libraries
./install.sh
# Build OpenRCT2
./build.sh
# Run the game
./openrct2
Linux:
We support native builds for Linux. x86 builds, by default, make use of pieces of original code, other builds are completely standalone. You can follow the standard CMake build procedure: install required libraries, then:
mkdir build
cd build
cmake ../
make
Detailed instructions can be found on our wiki.
4 Contributing
OpenRCT2 uses the gitflow workflow. If you are implementing a new feature or logic from the original game, please branch off and perform pull requests to develop. If you are fixing a bug for the next release, please branch off and perform pull requests to the correct release branch. master only contains tagged releases, you should never branch off this.
Please read our contributing guidelines for information.
4.1 Bug fixes
A list of bugs can be found on the issue tracker. Feel free to work on any bug and submit a pull request to the develop branch with the fix. Mentioning that you intend to fix a bug on the issue will prevent other people from trying as well.
4.2 New features
Please talk to the OpenRCT2 team first before starting to develop a new feature. We may already have plans or reasons against it, therefore contacting us will allow us to help you or prevent you from wasting any time. You can talk to us via gitter, see links at the top of this page.
4.3 Translation
You can translate the game into other languages by editing the language files in data/language directory. Please join discussions and submit pull requests to OpenRCT2/Localisation.
5 Licence
OpenRCT2 is licensed under the GNU General Public License version 3.