Moonmarch
Posts: 814
Joined: Thu Mar 07, 2019 1:34 am

GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 1:14 am

Image
GZDOOM running on the Raspberry Pi 4 computer with the DOOM SIGIL WAD.


After years of research, I have finally compiled GZDoom on the Raspberry Pi 4 computer. If you are familiar with the LZDoom DOOM Engine source port, GZDoom is a more updated version of the same source port. The GZDoom source port targets 64 bit operating systems with OpenGL 3.3, and Vulkan graphics renderers. These are features you will not be able to use on the Raspberry Pi computer, but at least GZDoom runs on the Raspberry Pi computer. The question is how compatible will the GZDoom source port be with the Raspberry Pi 4 computer, and will GZDoom actually replace LZDoom? Sit back, and relax, because you are about to find out.

Prepare for the disappointing news about GZDoom, because the OpenGL renderer performance on the Raspberry Pi 4 computer is at a completely low level. I would say the frame rate will be about 10 frames per second on average at 1920 X 1080 resolution. The graphics performance improves substantially at lower screen resolutions, and most graphic settings are disabled with the OpenGL ES renderer. GZDoom requires a graphics card that supports OpenGL 3.3 to activate all graphics options.

I was planning to release this build guide before the Raspberry Pi Operating System Debian Bookworm update then build more 64 bit software, but hardware limitations will be a problem. New operating system version releases opens the door to more open source software projects, but you will need the computer hardware to run the software. I have been using 32 bit software for a very long time, and recently moved to 64 bit software after installing the SparkyLinux 7 Debian Bookworm operating system release. I was going to do the same with the Raspberry Pi Operating System, but the Raspberry Operating System is still on Debian Bullseye.

Here is a link to the SparkyLinux website:

SparkyLinux
https://sparkylinux.org/

Even though the plans are not going as planned, but I have to admit the Raspberry Pi Operating System feels smoother with the 64 bit version compared to the 32 bit version. When the Debian Bookworm update for the Raspberry Pi Operating System is released, I will check to see what has changed in the software line up. A little known fact, not all software makes the cut to the next operating system release. This actually potentially slows me down, because there were programs that would compile on my computer, and the next version of the operating system gets released breaks software compatibility. Now the program will crash, and burn every time I compile the program.

This happens when a software developer releases software in .appimages, or self building archives. You have no idea what is being installed on your computer, and you are probably installing very old software libraries on your computer with these self building software packages. This is important to know, because we all cannot assume a program will be around all the time, and I should check on the software developers to see if they are still actively developing software. If a program loses developers the software will end up in the garbage bin until a new developer continues developing the software.


Before compiling any software, disable any overclock parameters on your computer.


Free image hosting provided by the ImgBB website.
Upload and share your images.
ImgBB website:
https://imgbb.com/


Here is a link to the GZDoom website:

ZDOOM
https://zdoom.org/index


Here is a link to the GZDoom GitHub website:

GitHub - ZDoom/gzdoom: GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
https://github.com/ZDoom/gzdoom


Download these software libraries using the command in the terminal:

Code: Select all

sudo apt install git cmake zlib1g-dev libasound2-dev libbz2-dev libjpeg-dev libvpx-dev libpkgconf-dev libgtk-3-dev libsdl2-dev
Download the GZDoom source code from the GitHub website using the command in the terminal:

Code: Select all

git clone https://github.com/ZDoom/gzdoom.git
Download the ZMusic source code used in the GZDoom program using the command in the terminal:

Code: Select all

git clone https://github.com/ZDoom/ZMusic.git
Compile the ZMusic source code using the commands in the terminal:

Code: Select all

cd ZMusic

Code: Select all

mkdir build

Code: Select all

cd build

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release ..

Code: Select all

make -j4

Code: Select all

sudo make install
After compiling, and installing the ZMusic source code, compile the GZDoom source code using the commands in the terminal:

Code: Select all

cd

Code: Select all

cd gzdoom

Code: Select all

mkdir build

Code: Select all

cd build

Code: Select all

cmake -DCMAKE_BUILD_TYPE=Release ..

Code: Select all

make -j4
The GZDoom source code will compile in about 30 minutes, and after compiling the GZDoom source code you will need a retail copy of a DOOM Engine game. Check the GZDoom website to see which DOOM Engine games are compatible with GZDoom. In the screenshot at the beginning of the guide I am playing The Ultimate DOOM with the DOOM SIGIL WAD in GZDoom on the Raspberry Pi Computer. For The Ultimate DOOM, find the DOOM directory, search for DOOM.WAD, and copy DOOM.WAD to the gzdoom/build directory.

After placing a copy of DOOM.WAD in the gzdoom/build directory, execute the GZDoom binary using the command in the terminal:

Code: Select all

cd gzdoom/build

Code: Select all

./gzdoom

To start GZDoom, launch GZDoom with OpenGL ES Video settings. The Extra graphics Lights, Brightmaps, and Widescreen graphics are completely optional. For better performance, use the software renderer, and if you are using the OpenGL renderer, lowering the screen resolution will improve performance. OpenGL renderer is very slow at 1920 X 1080 resolution, and no OpenGL 3.3 support on the Raspberry Pi 4 computer means several graphic settings will be unusable.

Use the command in the terminal to access the GZDoom configuration file:

Code: Select all

mousepad .config/gzdoom/gzdoom.ini
DOOM WADS are playable in GZDoom, and I recommend using lightweight DOOM mods with GZDoom on the Raspberry Pi computer. Avoid using DOOM mods with enhanced graphics, because these DOOM mods will cause GZDoom to freeze on the Raspberry Pi computer. GZDoom on the Raspberry Pi computer is playable with DOOM WADS that are designed for GZDoom, but I would avoid DOOM WADS with enhanced gameplay features.

I recommend using LZDoom for DOOM gameplay mods for better performance, and compatibility. Not all GZDoom DOOM mods will be compatible with LZDoom, but LZDoom will be able to load the DOOM mods. I have tested the Brutal DOOM Community Expansion mod v21.14.0, and Brutal Wolfenstein v7.0 mod, both DOOM mods will cause GZDoom to freeze on the Raspberry Pi computer. The last version of LZDoom released is version 3.88b. Here is a link to the LZDoom build guide for the Raspberry Pi computer:

Brutal Wolfenstein 3D and GZDoom 3.82 Legacy Doom Engine Source port Linux - Raspberry Pi Forums
viewtopic.php?p=1527621&hilit=lzdoom#p1527621

Actually, I should release a new LZDoom build guide for people who still use LZDoom.

If you are searching for a DOOM Engine source port for mouselook support on the Raspberry Pi computer, I recommend PrBoom-Plus for mouselook support with OpenGL renderer, and better performance. For the classic DOOM experience, use Crispy-Doom. These programs will compile on the 64 bit Raspberry Pi Operating System:

Crispy-Doom - Enhanced DOOM Engine Source Port Build Guide and Personal Updates - Raspberry Pi Forums
viewtopic.php?p=2080054&hilit=prboom#p2080054

PrBoom-Plus 2.5.1.7um - Doom Engine Source Port on the Raspberry Pi Zero - Raspberry Pi Forums
/viewtopic.php?f=78&t=265863&p=1615791& ... m#p1615791

The PrBoom-Plus 2.5.1.7um - Doom Engine Source Port on the Raspberry Pi Zero build guide I wrote is completely obsolete. The last version of PrBoom-Plus released is version 2.6.66. I should write a new build guide for PrBoom-Plus for the people who still use PrBoom-Plus.

Thanks to everyone for stopping in, and reading the GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer build guide. I will see everyone after the release of the next build guide on the Raspberry Pi Forums.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 5:55 am

The GZDoom source port targets 64 bit operating systems with OpenGL 3.3, and Vulkan graphics renderers
Vulkan?

Probably wait until Bookworm and Mesa 23.x...
But I will be looking at the GZDoom Vulkan stuff.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 9:56 am

vid_preferbackend=0, openGL-3.3 by default, so you got error.
vid_preferbackend=1, vulkan
vid_preferbackend=2, gles-2,0

btw, ManjaroArm AUR build, easier.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 11:05 am

ManjaroArm
Sway version?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 11:41 am

Gavinmc42 wrote:
Sat Jul 29, 2023 11:05 am
ManjaroArm
Sway version?
Yep, sway/wayland, mesa-23.1.4, and AUR packages.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 12:15 pm

Thanks cjan, was not aware of AUR.
That should make it much easier.

Learning a different OS package repo can be tricky, so used to Debian now, but I know Arch is rolling so has newer apps/libs.
Will be interesting to try the Vulkan version of Warzone2100 on Manjaro.

Some of those Doom mods look cool too.
Wonder if any will port to Pi?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 12:34 pm

Gavinmc42 wrote:
Sat Jul 29, 2023 12:15 pm
Thanks cjan, was not aware of AUR.
That should make it much easier.

Learning a different OS package repo can be tricky, so used to Debian now, but I know Arch is rolling so has newer apps/libs.
Will be interesting to try the Vulkan version of Warzone2100 on Manjaro.

Some of those Doom mods look cool too.
Wonder if any will port to Pi?
ManjaroArm follow PiOS kernel & firmware etc.
so, why not for Desktop user?

ps. im in kernel-6.5-rc3
https://github.com/raspberrypi/linux/tree/rpi-6.5.y

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Sat Jul 29, 2023 12:45 pm

Kernel 6.5 already?
Time for me to use that new SSD I got for Bookworm.
I try not to break my current 6.1.21 Raspberry OS/Pi400 as it is now my main PC ;)
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Moonmarch
Posts: 814
Joined: Thu Mar 07, 2019 1:34 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Aug 07, 2023 9:24 pm

On the Raspberry Pi 4, there is no way anyone will be able to force GZDoom to use the Vulkan renderer, because how will the performance improve? Going from 12 FPS to 15 FPS is not a substantial improvement in performance.

Adjusting parameter vid_preferbackend=1 in gzdoom.ini still shows the Unsupported OpenGL version error message when launching GZDoom.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Tue Aug 08, 2023 1:32 am

Going from 12 FPS to 15 FPS is not a substantial improvement in performance.
Sounds like it is a good benchmark game?

Warzone 2100 and 0AD were my benchmark OpenGL test games for years on Pi's.
Things have improved that both are now playable.
Vulkan should in theory add a slight improvement that makes borderline games playable.

Anything borderline on Pi4 might be just fine on a Pi5?
Overclocking on a Pi400 also pushes the "border line".
Emulation like FEX on Aarch64 ARM might be another way?
Likewise asm code tweaking might add more performance.

Get enough of little 25% improvements adds up to just playable?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Tue Aug 08, 2023 3:54 am

Moonmarch wrote:
Mon Aug 07, 2023 9:24 pm
On the Raspberry Pi 4, there is no way anyone will be able to force GZDoom to use the Vulkan renderer, because how will the performance improve? Going from 12 FPS to 15 FPS is not a substantial improvement in performance.

Adjusting parameter vid_preferbackend=1 in gzdoom.ini still shows the Unsupported OpenGL version error message when launching GZDoom.
No, i play under vulkan.
Debian, everything old, mesa, etc.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Tue Aug 08, 2023 9:57 am

Those early PC 3D games were not high res.
10fps at 1920x1080, what is it at 800x600?
I run games Windowed these days and only have 1280x1024 monitors anyway.

What Pi games look good at 1920x1080?
Might give them a try on a TV.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges


User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 8:03 am

Been playing with Bookworm, Mesa is now 22.3.6 and Vulkan is 1.3.239.
Need to find more Vulkan test apps.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 8:33 am

ok, test mesa stable release 23.1.7, gzdoom & vkdoom both run wayland/vulkan.
set env SDL_VIDEODRIVER=wayland.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 8:42 am

Had to make and install zmusic.
VKdoom is at 36% compiled ;)

Will see if that wayland thing is needed soon.

Will try compiling Warzone2100 for Vulkan now :D

Wonder what other games are Vulkanized?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 9:27 am

  • vkdoom
    VKDoom v0.9-211-g6e660ef02 - 2023-09-18 02:42:12 +0200 - SDL version
    Compiled on Sep 18 2023

    OS: Debian GNU/Linux 12 (bookworm), Linux 6.1.0-12-arm64 on aarch64
    VKDoom version v0.9-211-g6e660ef02
Now have to find my Doom etc cdrom for the WAD files ;)

This new Bookworm seems pretty good.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Moonmarch
Posts: 814
Joined: Thu Mar 07, 2019 1:34 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 9:30 pm

I can't wait for Bookworm update for the Raspberry Pi Operating System, but does the performance in GZDoom with Vulkan Renderer improve on the Raspberry Pi 4 computer at 1080P resolution?

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Mon Sep 18, 2023 10:27 pm

Moonmarch wrote:
Mon Sep 18, 2023 9:30 pm
I can't wait for Bookworm update for the Raspberry Pi Operating System, but does the performance in GZDoom with Vulkan Renderer improve on the Raspberry Pi 4 computer at 1080P resolution?
im not familiar Doom games, can you share ini file? test 1080p.

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Tue Sep 19, 2023 12:47 pm

ok, install brutal doom and it had default gzdoom.ini, run looks good.
https://wiki.archlinux.org/title/Brutal_Doom

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Wed Sep 20, 2023 12:17 pm

VKdoom ran a short time and then locked up everything :(
But then it was running on not official Bookworm ;)
Graphics still look really bad, blocky blood splatter.

Might try GZdoom once I find my real Doom WADs.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Wed Sep 20, 2023 10:21 pm

Gavinmc42 wrote:
Wed Sep 20, 2023 12:17 pm
VKdoom ran a short time and then locked up everything :(
But then it was running on not official Bookworm ;)
Graphics still look really bad, blocky blood splatter.

Might try GZdoom once I find my real Doom WADs.
mesa is too old, even Bookworm.
my side, 720p|1080p all good, why say that --> been shot quickly no way to run.

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Thu Sep 21, 2023 3:12 am

mesa is too old, even Bookworm.
Needs 23.x?
Might have to go for a rolling OS or Debian SID :lol:
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

cjan
Posts: 1051
Joined: Sun May 06, 2012 12:00 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Thu Sep 21, 2023 3:18 am

Gavinmc42 wrote:
Thu Sep 21, 2023 3:12 am
mesa is too old, even Bookworm.
Needs 23.x?
Might have to go for a rolling OS or Debian SID :lol:
23.1.8
https://www.mesa3d.org/

User avatar
Gavinmc42
Posts: 7691
Joined: Wed Aug 28, 2013 3:31 am

Re: GZDoom DOOM Engine Source Port on the Raspberry Pi 4 Computer

Thu Sep 21, 2023 7:12 am

Upgraded to SID from Bookworm, now got Mesa 23.2.0~rc3-3 ;)
VKdoom runs, got to 3rd base before falling into the green slime and dying :lol:
Needed to map arrows keys, been a long time since I used WASD.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

Return to “Gaming”