Jump to content
OpenRCT2

Building OpenRCT2 on Rpi4 with Raspberry Pi OS


Recommended Posts

The previous guide was a bit out of date so I created this:

 

I make a folder called OpenRCT2 that contained two sub folders: OpenRCT2 and RCT. OpenRCT was built after using the git command to download the latest repo. RCT is where I saved the source install file and extracted it using innoextract.

 

Part 1 Purchase and extract the original RCT files. I used the GOG version of the installer.

https://openrct2.org/quickstart/extract-rct2-files/linux

sudo apt update
sudo apt install innoextract
mkdir OpenRCT2 && cd OpenRCT2
mkdir RCT && cd RCT

This folder is where the main RCT files will go. Transfer the setup files to this folder from where ever you may have them:

EX I navigated to the USB folder with the files in it and transferred from there

sudo mv setup_roller* [Path to RCT] && cd [Path to RCT]

From the folder where the installer was transferred to

innoextract setup*

The RCT2 files are now in the folder: ../OpenRCT2/RCT/app

 

Part 2 Building for RPi 4

Based off https://www.raspberrypi.org/forums/viewtopic.php?t=219430 with updates

sudo apt install cmake libsdl2-dev libicu-dev gcc pkg-config libjansson-dev libspeex-dev libspeexdsp-dev libcurl4-openssl-dev libcrypto++-dev libfontconfig1-dev libfreetype6-dev libpng-dev libssl-dev libzip-dev build-essential make duktape-dev -y

Note: may require additional libraries: https://github.com/OpenRCT2/OpenRCT2/#2-downloading-the-game-pre-built

cd .. 

(should be a the top OpenRCT2 folder now)

I also installed google benchmark via git. https://github.com/google/benchmark directions provided there.

Benchmark cmake:

cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-mcpu=cortex-a72"
sudo apt full-upgrade

This step ensures that the system is fully up to date and the required dependencies are installed.

 

At this point I expect you’re in the folder ../OpenRCT with the subfolder of RCT.

git clone https://github.com/OpenRCT2/OpenRCT2.git

cd OpenRCT2

mkdir build && cd build

cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-Ofast -DNDEBUG -mcpu=cortex-a72"

*Updated for RPi4 CPU
 

make

make g2

cp g2.dat [Path to/OpenRCT2/OpenRCT2/data/. ]

EX: cp g2.dat /home/pi/OpenRCT2/OpenRCT2/data/.

ln -s ../data data

To install the game:

sudo make install

Alternatively: start the game from the build directory:

./openrct2

There's a setting that causes it to crash with a segmentation fault but I haven't narrowed it down to which one. It's random title sequence.

If that happens:

cd ~/.config/OpenRCT2

rm config.ini

Or you can try and edit it using a text editor. Happy Gaming

 

Edited by Hans5849
Link to post

Addendum:

I was having constant errors with the objects. Followed this https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux and created a folder called "object" in the data folder. I unzipped the contents of https://github.com/OpenRCT2/objects to here and copied the contents of the /rct/app/ObjData to /data/rct2 and everything worked. Only took 4 days to figure that problem out.

Link to post
On 20/06/2020 at 16:43, Hans5849 said:

Addendum:

I was having constant errors with the objects. Followed this https://github.com/OpenRCT2/OpenRCT2/wiki/Building-OpenRCT2-on-Linux and created a folder called "object" in the data folder. I unzipped the contents of https://github.com/OpenRCT2/objects to here and copied the contents of the /rct/app/ObjData to /data/rct2 and everything worked. Only took 4 days to figure that problem out.

There is no need to get sarcastic. This is also not the right way to do it. `make install` will take care of downloading objects and title sequences. If you ever need to install objects manually, the best way is to download an objects release and unzip it.

Link to post
1 hour ago, Gymnasiast said:

There is no need to get sarcastic. This is also not the right way to do it. `make install` will take care of downloading objects and title sequences. If you ever need to install objects manually, the best way is to download an objects release and unzip it.

I can be as sarcastic as I want, I scoured the available resources to come up with something that benefits others. Upon finding a problem with the process I displayed it in a manner where other people wouldn't have to spend time figuring it out. If using 'make install' is the correct way to do it why not make changes here https://github.com/OpenRCT2/OpenRCT2#32-compiling-and-running so others don't run into problems.

Link to post
  • 2 weeks later...
11 hours ago, janisozaur said:

Which part of


DESTDIR=. make install # the install target creates all the necessary files in places we expect them

That you linked to, do you not understand?

Well, as I wrote:

Quote

This was meant to serve as an updated version of that guide, as DESTDIR wasn't included in that guide so it wasn't included here. If you have a manner to improve what I have written please write it out, otherwise your thoughts carry as much weight as the electrons that brought them here. If you notice I added Gymnasiast's recommendation to use make install over the previous method of running it from the folder.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...