Running Raze on the Raspberry Pi 4

Post your tutorials here to help fellow Raze users get the most out of modding and using Raze!

Moderator: Raze Developers

Running Raze on the Raspberry Pi 4

Postby Rachael » Fri Feb 21, 2020 8:19 am

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 allExpand view
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 allExpand view
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 allExpand view
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 allExpand view
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
Rachael
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Running Raze on the Raspberry Pi 4

Postby Redneckerz » Fri Feb 21, 2020 10:20 am

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
Redneckerz
To it's ports i may have seen
Spotlight Team
 
Joined: 25 Nov 2019
Discord: Redneckerz#8399
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: Running Raze on the Raspberry Pi 4

Postby Phredreeke » Fri Feb 21, 2020 10:52 am

Now we need dpjudas to write a multithreaded software renderer for it ;)
User avatar
Phredreeke
 
Joined: 10 Apr 2018
Discord: phredreeke#6500


Return to Tutorials (Build)

Who is online

Users browsing this forum: No registered users and 0 guests