Running Raze on the Raspberry Pi 4

For guides related to programming and compiling and working with Doom-related projects

Moderators: GZDoom Developers, Raze Developers

User avatar
Rachael
Posts: 13900
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Running Raze on the Raspberry Pi 4

Post by Rachael »

Obligatory disclaimer: Do this at your own risk. No one on this forum is responsible for any possible (though unlikely) hardware damage that may result from following this tutorial.

Currently Raze will likely not work on earlier versions of the Pi, I have not attempted it but the articles I read pretty much show that the GPU architecture for earlier versions of the Pi do not have what is needed. They'll probably run EDuke32 okay though, but you'll have to compile from source.

However, today I was able to get it running on the Raspberry Pi 4. This was tested with the latest version of Raspbian as of this writing.

Make sure to enable video acceleration first, if you haven't already.

First, you will need to install your libraries:

Code: Select all

sudo apt-get install g++ make cmake libsdl2-dev git zlib1g-dev \
libbz2-dev libjpeg-dev libfluidsynth-dev libgme-dev libopenal-dev \
libmpg123-dev libsndfile1-dev libgtk-3-dev libsdl1.2-dev
If you don't want to install all of this, then at a bare minimum you'll need libfluidsynth-dev, libsdl2-dev, libopenal-dev, git, g++, cmake, and make. If I missed anything, then CMake will tell you.

Next, you need to install ZMusic:

Code: Select all

cd </path/to/your source folder>
git clone https://github.com/coelckers/zmusic
cd zmusic
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j2 -k
#if above steps are successful
sudo make install
Now, you can compile Raze:

Code: Select all

cd </path/to/your source folder>
git clone https://github.com/coelckers/raze
cd raze
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j2 -k
In the above steps, if you have faith in your thermal cooling you can do make -j4 instead to use all 4 cores - note that this tends to cause instability unless you have a way to deal with the heat generated!

If everything built okay, then you are now ready to install your games and run Raze. Note that this requires passing a special argument to Mesa - and therefore, this is a "do it at your own risk" type of thing! You can put your .grp files directly inside of Raze's build folder, or they can go to ~/.config/raze - either works.

To run Raze on the Pi:

Code: Select all

MESA_GL_VERSION_OVERRIDE=3.3compat ./raze
Because this override is required, I'm not going to put anything in the source that will natively bypass it. Expect this to be buggy.

If you want to speed things up a bit, you can go into "Options->Set Video Mode" and change the scaling to "Lowest Possible Scale" - with the Pi's underpowered GPU, that should be enough to make things playable.
User avatar
Redneckerz
Spotlight Team
Posts: 1113
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: Running Raze on the Raspberry Pi 4

Post by Redneckerz »

RaspRaze is thus a fact! :wink:

Fasicinating work, Rachael - This would bring a whole slew of titles to the Pi that may not have a direct port yet.
User avatar
Phredreeke
Posts: 311
Joined: Tue Apr 10, 2018 8:14 am

Re: Running Raze on the Raspberry Pi 4

Post by Phredreeke »

Now we need dpjudas to write a multithreaded software renderer for it ;)

Return to “Programming and Compiling”