Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

ZDoom - Poor Performance (Pi 2)

Mon Aug 03, 2015 3:00 pm

Hi.

I have built ZDoom from the following Github repository:

https://github.com/sneakernets/zdoom

However it runs very poor, unplayable really. I installed all the packages that were required to build and it seemed to build ok with no unexpected errors, but it just doesn't run very fast at all. Reading the 'Readme' file provided, it mentions that sound may cause it to slow down, but this slowdown just happens all the time (and I have tried the changes recommended to improve performance but it doesn't help).

I was wondering if anyone else had built ZDoom on the Pi 2 and had a better experience? From what I have read it should work great but it just isn't. :(

There aren't any instructions that I can find on how to compile the binary so I have just done a straightforward cmake and make - perhaps I should have been setting some flags on there?? I'm still quite the noob when it comes to Linux. :oops:

I'd really like to get this working as I want to try a few different mods on there (namely Blood and Brutal Doom, if they work), so if anyone could help out I'd be most appreciated!

All the best,
Steve

p.s. the repository does say that his version is outdated and to use the 'Master' version instead, but I can't see any Raspberry Pi specific callouts on that site? Link below:

https://github.com/rheit/zdoom

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Mon Aug 03, 2015 5:26 pm

I have just tried compiling Chocolate Doom and that also plays very poorly, even when set to 320x240 resolution. :cry:

Is it something I am doing wrong? Does anyone have these ports installed and running well?

Also - a little off-topic perhaps but something else I found was an SDL port of Hexen - see below link:

https://www.libsdl.org/projects/hexen/

I compiled it and it is so close to running but crashes out (with no error message) whilst in the last stages of loading. Sigh.

The game I really want on my Pi is Blood, but it doesn't run very well in dosbox or rpix86. Shame.

User avatar
Forgotten01
Posts: 162
Joined: Sun Dec 01, 2013 6:06 pm

Re: ZDoom - Poor Performance (Pi 2)

Tue Aug 04, 2015 10:46 pm

well, I might be able to take a look, IIRC it had something to do with OpenAL.......
Engineers like to solve problems. If there are no problems handily available, they will create their own problems.
Scott Adams

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Sat Aug 08, 2015 1:17 am

Forgotten01 wrote:well, I might be able to take a look, IIRC it had something to do with OpenAL.......
That would be great! Sorry, I only just saw your reply!

Like I've mentioned, I've read that it runs 'smooth as butter' on the pi, but it really doesn't and its obviously something Im doing wrong when building but I just don't know what since there are no instructions on the github page(s). :(

Cheers.
Steve

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Tue Aug 11, 2015 9:10 am

So Im trying to get more into compiling for the Pi 2 and I'm finding that there are a lot of different dependancies, pakages etc. that need to be downloaded when compiling certain things. It got me thinking.... is there an image / distribution out there somewhere that has all of these dependancies / packages installed already, which is literally ready for pretty much anything you throw at it and try to compile?

This may be a daft question, but I am new to all this type of thing. Seems to me that such a package would save a lot of time for folk who wanted to compile Pi specific builds from source and would maybe help more people start trying?

Does such a build exist or is this a stupid question? :oops:

I've looked into cross compiling too but Im not sure that's the right way to go, seems like its not guaranteed for everything. :?:

Vanfanel
Posts: 432
Joined: Sat Aug 18, 2012 5:58 pm

Re: ZDoom - Poor Performance (Pi 2)

Tue Aug 11, 2015 9:21 am

I have done a ready-to-use version of Chocolate Doom with accelerated 2D graphics using the Rpi native 2D API (Dispmanx). Works great.
It's here:

https://github.com/vanfanel/crispy-doom

ZDOOM performs poorly on the Pi because it does software scaling.

dudleydes
Posts: 51
Joined: Sun May 18, 2014 12:19 pm

Re: ZDoom - Poor Performance (Pi 2)

Wed Aug 12, 2015 6:04 pm

Hi Smithers

I have managed to compile ZDoom on my Rpi 1 model B (with no overclocking) and Doom is running smoothly. The downside is that I currently have no audio.

Here are the steps I took in building ZDoom:

1. Install SDL2 libraries

For zdoom to run smoothly on the Rpi, the custom SDL2 libraries from the RetroPie project need to be installed first. The most straightforward way of doing this is by using the RetroPie image as it has a script which will install the libraries. In RetroPie, run the following commands:

Code: Select all

cd RetroPie-Setup/
sudo ./retropie_packages.sh sdl2
Alternatively, the SDL 2 libraries can be installed manually by first downloading them from here. Download all of the packages and run the following command to install:

Code: Select all

sudo dpkg -i DEB_PACKAGE_NAME.deb
This process took 1.5 - 2 hours.

2. Install dependencies

Run the command:

Code: Select all

sudo apt-get install libopenal-dev libev-dev libuv-dev libmpg123-dev
(I got an error message that libuv-dev could be located but zdoom seemed to have compiled fine).

3. Create ZDoom build folder and download source

Run the commands:

Code: Select all

mkdir -pv $HOME/zdoom_build

cd $HOME/zdoom_build && \
git clone git://github.com/rheit/zdoom.git && \
mkdir -pv zdoom/build

cd zdoom
git config --local --add remote.origin.fetch +refs/tags/*:refs/tags/*
git pull
4. Compile ZDoom

Run the commands:

Code: Select all

mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
Compiling the binary took about 4 hours on the RPi 1.

I shall continue investigating how to enable audio.

User avatar
Aaronaurus
Posts: 9
Joined: Tue Jul 14, 2015 5:32 am
Location: England, UK

Re: ZDoom - Poor Performance (Pi 2)

Thu Aug 13, 2015 8:48 pm

I've been running "PRBOOM" from the Raspbian repositry to play iwads and a few custom wads. I've only ran into a few issues with custom wads (mainly Valiant Megawad).

I used this library supplied over here: viewtopic.php?f=38&t=99822 to get the audio working.

I might look at compiling "ZDOOM" when I get the chance with the fixed SDL library and try get brutal doom or other mutations working.

Will let you know how I get on.

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Fri Aug 14, 2015 6:28 am

Vanfanel wrote:I have done a ready-to-use version of Chocolate Doom with accelerated 2D graphics using the Rpi native 2D API (Dispmanx). Works great.
It's here:

https://github.com/vanfanel/crispy-doom

ZDOOM performs poorly on the Pi because it does software scaling.
Hi, sorry for delay in replying. I don't seem to be subscribed to this post for some reason so hadn't seen the responses!

That's excellent, thanks very much! I especially like the detail you have put into your read me file - I often find there are next to no instructions on such projects! I will definitely install this as I really wanted to get Hexen and Heretic up and running on the pi. The x86 emulators just aren't quite fast enough for them.

Thanks!
Steve

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Fri Aug 14, 2015 6:38 am

dudleydes wrote:Hi Smithers

I have managed to compile ZDoom on my Rpi 1 model B (with no overclocking) and Doom is running smoothly. The downside is that I currently have no audio.

Here are the steps I took in building ZDoom:

1. Install SDL2 libraries

For zdoom to run smoothly on the Rpi, the custom SDL2 libraries from the RetroPie project need to be installed first. The most straightforward way of doing this is by using the RetroPie image as it has a script which will install the libraries. In RetroPie, run the following commands:

Code: Select all

cd RetroPie-Setup/
sudo ./retropie_packages.sh sdl2
Alternatively, the SDL 2 libraries can be installed manually by first downloading them from here. Download all of the packages and run the following command to install:

Code: Select all

sudo dpkg -i DEB_PACKAGE_NAME.deb
This process took 1.5 - 2 hours.

2. Install dependencies

Run the command:

Code: Select all

sudo apt-get install libopenal-dev libev-dev libuv-dev libmpg123-dev
(I got an error message that libuv-dev could be located but zdoom seemed to have compiled fine).

3. Create ZDoom build folder and download source

Run the commands:

Code: Select all

mkdir -pv $HOME/zdoom_build

cd $HOME/zdoom_build && \
git clone git://github.com/rheit/zdoom.git && \
mkdir -pv zdoom/build

cd zdoom
git config --local --add remote.origin.fetch +refs/tags/*:refs/tags/*
git pull
4. Compile ZDoom

Run the commands:

Code: Select all

mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
Compiling the binary took about 4 hours on the RPi 1.

I shall continue investigating how to enable audio.
Thanks for the in-depth instructions, it is most appreciated. I am very glad to hear you have it running smooth on Pi1, that gives me a lot of hope for Pi2!

I had sound working ok when I built it but I had to fiddle with the sound menu. Can't remember off the top of my head what it was but it's in the read me file on github.

I will have a try of this myself when I'm in from work, along with chocolate doom.

People may wonder why I would seemingly get excited over Doom ports but it really opens up a new world of mods and TC's as well as Hexen and Heretic in the pi. I loved all these games from back in the day and being able to play them on my Pi on the big screen is just great!

Thanks for all your help. Much appreciated! I will post results of mod tests (if I get it compiled successfully).

All the best.
Steve


...now if only Blood was able to be ported... :(

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Fri Aug 14, 2015 6:41 am

Aaronaurus wrote:I've been running "PRBOOM" from the Raspbian repositry to play iwads and a few custom wads. I've only ran into a few issues with custom wads (mainly Valiant Megawad).

I used this library supplied over here: viewtopic.php?f=38&t=99822 to get the audio working.

I might look at compiling "ZDOOM" when I get the chance with the fixed SDL library and try get brutal doom or other mutations working.

Will let you know how I get on.
Many thanks - I will check this out also. I have PRBoom installed but it is the libretro variant and try as I may I just can't get mods to play on it!

I will look into this build - many thanks for the link.

Cheers
Steve

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Sat Aug 15, 2015 1:15 am

@Dudleydes - I followed your instructions on compiling Zdoom to the letter..... and it worked! :D I now have Zdoom running great (but also with no sound).

I can also confirm that Brutal Doom works! Happy days! :P Thanks very much for the guide on how to get it running.

Now for the sound issues - when I compiled it the first time round (before I made this thread) I did have sound and I remember there being an extra menu item asking what sound backend you wanted to use (something like that). It had the choice of OpenAL and FMOD if I remember rightly - one of them worked and one didn't. Damned if I know how to re-enable that option though?

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Sat Aug 15, 2015 10:13 pm

Update - I managed to get sound working! :D

Turns out it does need the libuv-dev dependancy. The normal debian package isn't found for some reason, so I built it from the following github:

https://github.com/libuv/libuv

I'm playing Brutal Doom on it now and it runs perfect! :D

Thanks very much for all your help.

All the best.
Steve

User avatar
Aaronaurus
Posts: 9
Joined: Tue Jul 14, 2015 5:32 am
Location: England, UK

Re: ZDoom - Poor Performance (Pi 2)

Sun Aug 16, 2015 8:03 am

Smithers: When you mean runs perfect, do you not get FPS drops in Brutal Doom? Even just a few monsters and things going down (like rockets or a lot of gibs) it drops considerably. It is playable, but not enjoyable.

I've built ZDOOM with SDL2 and it works nearly perfect, however has some slow downs here and there which I don't experience with PRBOOM. ZDOOM will still be useful for Heretic/Hexen as well as some incompatiable wads, so it was definitely worth building ^^

Brutal Doom really has performance issues. Personally, I do not like Brutal Doom so I will be sticking to PRBOOM for speed running anyway, I don't need the extra features ZDOOM brings for that.

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Sun Aug 16, 2015 8:43 am

Yes perhaps I was too hasty in using the term 'perfect', what I really meant was that it seemed perfectly compatible.

I will say though I think it runs quite well and perfectly playable. I do get a small amount of slowdown when there is a lot on screen (mainly after I have shot them all up an there are gibs everywhere!), but nothing too much to take you away from the game.

My overclock settings are reasonably aggressive however at 1067mhz cpu overclock (also sdram and core overclock) and I have 512mb allocated to gpu - not sure if that helps?

Either way, I find it perfectly playable and a great addition to my collection on the pi!

I have a question for you though - how on Earth did you know how to compile all that code when there were no instructions or guide on Github? Im genuinely curious and wondered if that was a standard approach to compiling on the Pi?

dudleydes
Posts: 51
Joined: Sun May 18, 2014 12:19 pm

Re: ZDoom - Poor Performance (Pi 2)

Sun Aug 16, 2015 10:45 am

Smithers, thanks for the heads-up about the libuv dependency. I tried to install another dependency, libsndfile1-dev, which I didn't include as it is already installed on my system, and I got the following message:

Code: Select all

The following packages have unmet dependencies: libuv1-dev : Depends: libuv1 (= 1.6.1-3) but it is not installable
I've installed libuv from the github repo you posted and am rebuilding ZDoom at this moment. Incidentally libuv1 is available in Jessie, not in Wheezy which explains why it won't install using apt-get.

I followed the instructions below at the ZDoom wiki which told me which dependencies I required on the Pi and how to compile on Linux (though it did take some time for me to get my head around them).

http://zdoom.org/wiki/Compile_ZDoom_on_Raspberry_Pi
http://zdoom.org/wiki/Compile_ZDoom_on_Linux

Regard your desire for Blood, have you tried the Blood Total Conversion for Doom 2 built for the ZDoom engine?

User avatar
Aaronaurus
Posts: 9
Joined: Tue Jul 14, 2015 5:32 am
Location: England, UK

Re: ZDoom - Poor Performance (Pi 2)

Sun Aug 16, 2015 9:55 pm

Smithers wrote:Yes perhaps I was too hasty in using the term 'perfect', what I really meant was that it seemed perfectly compatible.
Yep can confirm, it is perfectly compatible ^^
Smithers wrote:I will say though I think it runs quite well and perfectly playable. I do get a small amount of slowdown when there is a lot on screen (mainly after I have shot them all up an there are gibs everywhere!), but nothing too much to take you away from the game.
I'm a bit of a moaner when it comes to FPS drops ;) Not so bad in games like GTA V but when it comes to quick action FPS I'm a bit of a cry baby.
Smithers wrote:My overclock settings are reasonably aggressive however at 1067mhz cpu overclock (also sdram and core overclock) and I have 512mb allocated to gpu - not sure if that helps?
Running the Raspbian turbo settings (1ghz oclock w/ 512mb gpu ram)
Smithers wrote:Either way, I find it perfectly playable and a great addition to my collection on the pi!
That's awesome!
Smithers wrote:I have a question for you though - how on Earth did you know how to compile all that code when there were no instructions or guide on Github? Im genuinely curious and wondered if that was a standard approach to compiling on the Pi?
Not sure how many dependencies I already had ready, but it did spit a few things out at me and I just worked to fix its issues as it spat them out at me. I'm a bit lazy, so while I understand some principles (possibly?) I'm not 100% sure how everything works. Was a bit of trial and error... I really should invest sometime in taking a more concious approach.

User avatar
Aaronaurus
Posts: 9
Joined: Tue Jul 14, 2015 5:32 am
Location: England, UK

Re: ZDoom - Poor Performance (Pi 2)

Sun Aug 16, 2015 9:58 pm

Interesting about there being memory issues when compiling in turbo. I may have to look at ramping down to high for compiling in future! If this is indeed confirmed I can imagine a few documents need to add this to the overclocking disclaimer! :O

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Mon Aug 17, 2015 10:46 pm

dudleydes wrote:I followed the instructions below at the ZDoom wiki which told me which dependencies I required on the Pi and how to compile on Linux (though it did take some time for me to get my head around them).

http://zdoom.org/wiki/Compile_ZDoom_on_Raspberry_Pi
http://zdoom.org/wiki/Compile_ZDoom_on_Linux

Regard your desire for Blood, have you tried the Blood Total Conversion for Doom 2 built for the ZDoom engine?
I haven't got round to trying that version of Blood yet no - I had read poor reports of it? I have however tried a Duke Nukem mod of Blood and whilst it looks to be very faithful of the original game, it runs very poorly on the Pi for some reason. :(

So back on the subject of compiling - am I right in thinking that once you have certain dependancies installed and available that you could 'force' them onto a set of source code data and build, or does the source code specifically have to support what you're trying to force onto it? So for arguments sake - MAME 0.139 source code. I was going to try and compile this (probably not the easiest task for a total amateur like me I know! :lol: ), mainly just as a proof of concept but also out of sheer curiosity to see how well it ran. I wondered if there are 'standard' raspberry pi options that should always be applied?

I have the MAME 0.139 source code downloaded ready but have not got round to even trying yet (I figure it will take some time and I don't want to waste time building without fully investigating it first). I know it can be built as I found a link to a guy who built version 0.164 but with very poor results (see this link http://choccyhobnob.com/mame-on-raspberry-pi2/ ), but in his instructions he doesn't seem to be setting many 'Pi Specific' flags when making / building, so one would assume this is maybe why the performance is so bad?

I am under no illusion that I would be able to build an all-singing all-dancing version of MAME 0.139, I am just very curious to see what the results would be as I know the Android version that is based upon 0.139 fares very well, even on low end phones or tablets.

Sorry this has gone a little off-topic! :oops:

JTCook
Posts: 16
Joined: Tue Nov 12, 2013 1:53 am

Re: ZDoom - Poor Performance (Pi 2)

Sat Aug 29, 2015 4:17 am

Does this build include 3D acceleration with OpenGL, or is it software rendered?

Smithers
Posts: 115
Joined: Sun May 17, 2015 10:17 pm

Re: ZDoom - Poor Performance (Pi 2)

Tue Sep 01, 2015 9:59 am

Vanfanel wrote:I have done a ready-to-use version of Chocolate Doom with accelerated 2D graphics using the Rpi native 2D API (Dispmanx). Works great.
It's here:

https://github.com/vanfanel/crispy-doom

ZDOOM performs poorly on the Pi because it does software scaling.
Hi Vanfanel.

I have been messing around with your Crispy-Doom / Hexen / Heretic / Strife ports and they work really well - thanks!

I do have a question though and wondered if you may know the answer (its not related to your build as such, but you may know the answer). I am having a bit of a job trying to set up joypad button bindings. I want to be able to control the whole game via joypad, and whilst it detects it fine and it is usable in-game, I cannot use my joypad in the menu. Take Hexen for example - I can bind a button to call the menu, but I can't move in the menu and cant select any options either. This means I need to use a keyboard and it takes away the seamless 'console' effect of including it in Emulation Station.

Do you happen to know how I may bind joypad buttons to menu browsing? Ideally I need to be able to navigate up / down, select menu items and exit the menu (I can already call the menu).

Any help appreciated!

Cheers.
Steve

dudleydes
Posts: 51
Joined: Sun May 18, 2014 12:19 pm

Re: ZDoom - Poor Performance (Pi 2)

Tue Sep 01, 2015 10:44 am

Smithers wrote:Do you happen to know how I may bind joypad buttons to menu browsing? Ideally I need to be able to navigate up / down, select menu items and exit the menu (I can already call the menu).
I am experiencing issue the same as Smithers. It only relates to Crispy-Heretic and Crispy-Hexen. It's possible to navigate the menus with a gamepad in Crispy-Doom and Crispy-Strife (though I still need a keyboard to press Y confirm exit game). There is a open ticket at the Crispy-Doom github repo that states that the issue relates upstream to the Chocolate Doom source code.

I tried using joy2key to map gamepad input to key presses as I am having a similar issue with eduke32. I can get the gamepad to input the appropriate keys in the console but I have had no success in game (though that may have to do with me not really understanding how to use joy2key). I would prefer a joy2key solution as it can be used for any other ports where it's not possible to navigate menus with a gamepad. I'd appreciate any help with this.

sneakernets
Posts: 7
Joined: Fri Oct 09, 2015 10:12 pm

Re: ZDoom - Poor Performance (Pi 2)

Fri Oct 09, 2015 10:18 pm

Hi all,

Just wanted to let you know that my zdoom fork is no longer needed - You can simply use the "official" zdoom code repo now.

There is still a problem in regards to zdoom on the Pi 2, and indeed any Raspberry Pi - ZDoom refuses to run in composite mode.

HDMI is just fine, however. Still, that indicates a problem somewhere, and I'm not sure if it's a bug in SDL2 or missing code in ZDoom.

This is an urgent issue since most Doom source ports are converting to SDL2, and Composite output will no longer be an option when playing them.

Solid One
Posts: 3
Joined: Mon Dec 22, 2014 12:17 am

Re: ZDoom - Poor Performance (Pi 2)

Thu Mar 31, 2016 2:28 am

sneakernets wrote:Hi all,

Just wanted to let you know that my zdoom fork is no longer needed - You can simply use the "official" zdoom code repo now.

There is still a problem in regards to zdoom on the Pi 2, and indeed any Raspberry Pi - ZDoom refuses to run in composite mode.

HDMI is just fine, however. Still, that indicates a problem somewhere, and I'm not sure if it's a bug in SDL2 or missing code in ZDoom.

This is an urgent issue since most Doom source ports are converting to SDL2, and Composite output will no longer be an option when playing them.
Strangely, I'm using your zdoom fork on my Rpi2, and it's working fine on my composite cable (if you mean the AV cable that goes to P2 audio jack). Of course I'm running on lowest possible resolution (640x480), but it's working fine here.

BTW, nice work porting zdoom to Rpi2 with sound. It's working like a charm on my device, although I had a hard time gathering all libs and compiling the binaries.
dudleydes wrote:
Smithers wrote:Do you happen to know how I may bind joypad buttons to menu browsing? Ideally I need to be able to navigate up / down, select menu items and exit the menu (I can already call the menu).
I am experiencing issue the same as Smithers. It only relates to Crispy-Heretic and Crispy-Hexen. It's possible to navigate the menus with a gamepad in Crispy-Doom and Crispy-Strife (though I still need a keyboard to press Y confirm exit game). There is a open ticket at the Crispy-Doom github repo that states that the issue relates upstream to the Chocolate Doom source code.

I tried using joy2key to map gamepad input to key presses as I am having a similar issue with eduke32. I can get the gamepad to input the appropriate keys in the console but I have had no success in game (though that may have to do with me not really understanding how to use joy2key). I would prefer a joy2key solution as it can be used for any other ports where it's not possible to navigate menus with a gamepad. I'd appreciate any help with this.
I'm having the exact same issue here. Can't navigate on menus through the controller, neither can I exit the game (since I need ENTER or 'Y' key to do so).

I'm trying to understand how joy2key works. When I run the command if parameters below,

Code: Select all

python /opt/retropie/supplementary/runcommand/joy2key.py /dev/input/js0 1b5b44 1b5b43 1b5b41 1b5b42 0a 09
the program can map DPAD to four arrow keys (by the hex values 0x1b5b44, 0x1b5b43, 0x1b5b41 and 0x1b5b42), and can map first two controller buttons to ENTER and TAB keys (by the hex values 0x0a and 0x09).

When I run the command above through SSH, the key to button mappings works nicely. However, the mappings seems to be ignored inside Zdoom, in a way that none of my mappings are working.

I guess native joy2key from RetroPie won't work on some apps such as Zdoom. Maybe another joy to key mapper, or some crazy binding inside zdoom.

User avatar
EimGhey
Posts: 108
Joined: Thu Mar 31, 2016 11:14 pm

Re: ZDoom - Poor Performance (Pi 2)

Fri Apr 01, 2016 1:07 pm

I am watching this thread as I would love to figure out how to create Doom art mods for Pi which won't make it implode...

Return to “Gaming”