User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sat Mar 22, 2014 7:12 pm

Oldbitcollector wrote:I downloaded and extracted the three files from this site into a folder "ctf".

using darkplaces-sdl -game ctf appears to start the game...

Locked up the first time, the second attempt has me wandering around with an axe.
I downloaded the first version of ThreeWave CTF called "Client v3.01" and ran a few map levels. It seemed to work fine, however subsequent versions with "enhancements" may be the cause of the problem. A tendency exists with games or mods where more complex models and textures are added to subsequent versions.

The quality of Quake mods varies and some do not function very well at all. Many mods were designed for desktop systems with gigabytes of ram and the PI with only 512mb or 256mb does not handle mods very well with complex models and high definition textures. Finding a mod that runs well on the PI is a matter of trial and error. The code for many mods is open making it possible to modify and optimize these mods so that they run well on the PI. Sometimes a mod can be "fixed" by simply removing pak files from the mod's folder.

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sat Mar 22, 2014 8:16 pm

autonomous wrote:
Bluelightcrew wrote:The game runs very good an looks nice! I`am using Retropie, without Keyboard. When the game is startet i can play with Gamepad,but i can not controll the Menu with Gamepad.
Do you have a solution for this?
Not at present. I have the same issue with my game controller not being able to control the menus. I will look into running the game without a keyboard in the next release. Meanwhile, code for the Raspberry PI port needs to be merged into the main repository for Darkplaces.

Here's the first cut of a Raspberry PI running "Quake Life":
Image

A portal to another world has opened up at the Black Mesa Research Facility! Hostile aliens from a dimension known as "Planet Quake" have entered the facility and have overwhelmed the marines. You must travel through the portal to Planet Quake and stop the invasion!
If you could get Darkplaces to work completely with a pad (menus) that would be brilliant. I look forward to the next release!

Btw, how would we go about downloading an updated version in future?

zzediker
Posts: 22
Joined: Mon Jul 15, 2013 9:29 pm

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sat Mar 22, 2014 11:15 pm

can darkplaces run brutal doom? or is that a totally different engine?

User avatar
jezmck
Posts: 24
Joined: Sat Sep 10, 2011 4:34 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sun Mar 23, 2014 5:26 pm

autonomous wrote:...Here is an example of real-time system monitoring while running the engine. This tool runs as a service under NodeJS and is displayed in a browser on a desktop system:
Image
What's that? Looks really good...

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sun Mar 23, 2014 6:55 pm

jezmck wrote:What's that? Looks really good...
It's part of a real-time monitoring and visualization toolkit. This particular graph displays the output of ioctl transmitted at 1 second intervals to a browser session where it is graphed. There are other real-time computer visualizations for monitoring the GPU and game engine statistics. The toolkit is designed to monitor all types of data including sensors. I used a previous version of this toolkit to monitor the operating state of an off-grid solar energy system which enabled optimization of energy use within a tight energy budget. (another project!) I will make this available as an open source project sometime in the near future.

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Sun Mar 23, 2014 10:51 pm

I would like to let you know, but when I go to the second level, the level itself is black, yet enemies and health packs are visible. This happens with both the shareware and full PAK's. The same thing sometimes happens with the second demo (title screen demo thing) the level goes black, yet everything else is visible.
Also, I get really high FPS when overclocked to 1GHz. ( Anywhere between 30 - 70fps!)
Cant wait to see what is possible with this port!
I am amazed at what can be done by such a small and cheap device!

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 2:22 am

Nintendo16kid wrote:I would like to let you know, but when I go to the second level, the level itself is black, yet enemies and health packs are visible. This happens with both the shareware and full PAK's. The same thing sometimes happens with the second demo (title screen demo thing) the level goes black, yet everything else is visible.
It doesn't seem like an overclocking/instability issue - maybe you need to do an rpi-update because there were issues with glDiscardFramebufferEXT that caused something like this and it was subsequently fixed.

forgeflow
Posts: 14
Joined: Wed Feb 12, 2014 7:10 am

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 4:03 am

This is awesome. Been trying to get a quake that runs on the Pi for a while.

Couple of things - it detects the joysick (Xbox 360 controller), and the controllers work for game play, but darkplaces completely ignores all the remapping I've done in the xboxdrv configuration. Therefore, it still requires a keyboard and mouse - the joystick inputs (esc, enter, up, down) don't work at all in the game interface.

The video modes are weird - if I pick a more reasonable video mode (like 1280 x 720) then the game runs more smoothly with better frame rate, but it's just a smaller section of the screen - it doesn't actually change the display mode from the monitor's default of 1920 x 1080.

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 4:37 am

forgeflow wrote:This is awesome. Been trying to get a quake that runs on the Pi for a while.

Couple of things - it detects the joysick (Xbox 360 controller), and the controllers work for game play, but darkplaces completely ignores all the remapping I've done in the xboxdrv configuration. Therefore, it still requires a keyboard and mouse - the joystick inputs (esc, enter, up, down) don't work at all in the game interface.

The video modes are weird - if I pick a more reasonable video mode (like 1280 x 720) then the game runs more smoothly with better frame rate, but it's just a smaller section of the screen - it doesn't actually change the display mode from the monitor's default of 1920 x 1080.
I concur that 1080p doesn't make a huge difference in visual quality and framerates are higher at 720p. The video mode issue can be fixed by editing the ~/darkplaces/id1/config.cfg file and modifying the following parameters:

Code: Select all

"vid_width" "1280"
"vid_height" "720"
"vid_conwidth" "1024"
See https://github.com/autonomous1/darkplac ... figuration for more details

For joystick mapping, I would start by editing config.cfg and removing all existing joystick mappings to see how the default settings work. An easy way to work out joystick mappings is to map an unrecognized command to each joystick button which will result in an error message being displayed when the button is pressed: For example, the configuration parameter

Code: Select all

bind JOY5 "J5_BTN"
will display an error message "command J5_BTN not found" when the mapped joystick button is pressed.

Documentation on the full set of joystick configuration options and commands can be found here:
https://github.com/autonomous1/darkplac ... tion-guide

KitchUK
Posts: 256
Joined: Fri Jul 19, 2013 5:40 pm

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 9:03 am

Just a tip, I noticed if you turn off the RT Lighting and change BPP to 16 in the options you can squeeze a couple more FPS out of the game (I'm using 720p).

I currently playing around with the options and commands to see if there is anything extra I can do to increase performance.

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 3:10 pm

I did an update, and it still happens. I might try without overclocking, and see if that would help. (Also, how would I install a mod? Like the Team Fortress or Quake Rally. I have placed the folders in the /darkplaces directory, but they don't appear on the mods menu.)
I am amazed at what can be done by such a small and cheap device!

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 3:36 pm

Ignore my last post, I have just worked out how to install mods. Just had Team fortress running!
I am amazed at what can be done by such a small and cheap device!

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 6:05 pm

Nintendo16kid wrote:Ignore my last post, I have just worked out how to install mods. Just had Team fortress running!
Cool. I added a wiki page for mods that have been tested on the RPi:
https://github.com/autonomous1/darkplac ... places-RPi

Maybe you could add an entry for Team fortress?

There's also a guide on installing and running mods and maps within mods:
https://github.com/autonomous1/darkplac ... Quake-mods

I should mention that some mods contain compressed textures in a format not currently supported by the RPi GPU blob. In Quake Rally for instance, vehicles operate correctly but the racetrack is black. To fix this the open source GPU code needs to be ported to the RPi and modified to include the gl extension EXT_texture_compression_s3tc.

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Mon Mar 24, 2014 11:05 pm

I got TF to run, but after a while, the intro crashes, and then the Pi crashes. I tried a bunch of mods, but most of them failed to load, or crashed shortly after loading.
Do I need to "sudo usermod -a -G video pi" Every time before running Darkplaces?
I am amazed at what can be done by such a small and cheap device!

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Tue Mar 25, 2014 12:32 am

Nintendo16kid wrote:I got TF to run, but after a while, the intro crashes, and then the Pi crashes. I tried a bunch of mods, but most of them failed to load, or crashed shortly after loading.
Do I need to "sudo usermod -a -G video pi" Every time before running Darkplaces?
This has been mentioned before, but many mods have been designed for desktop systems with gigabytes of ram and will not run very well if at all on the RPi. I added a hard limit of 64k vertices to version 1.0 of the engine but more work needs to be done to deal with issues when attempting to load large complex mods.

As a general guideline it is better to start with an earlier version of a mod. In this case I downloaded Team Fortress v2.8, and it seems to run fine, except that it didn't come with maps and it was not a linux-friendly mod with uppercase filenames. So some work needs to be done with Team Fortress to get it to work properly on the RPi. This looks like a great mod, but documentation is needed to make it easy to install and run.

You only need to do the usermod command once.

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Tue Mar 25, 2014 1:09 pm

Just a quick post to report that Darkplaces runs very nicely indeed on an old overclocked Rev1 Model B with 256MB of RAM on a 128/128 split. Thanks autonomous. Your programming skills are truly legendary! :P
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Tue Mar 25, 2014 4:39 pm

Ah, the glitches I was talking about, I have sorted out. I was only running with a 64mb allocation to the GPU, which renders Darkplaces unplayable after a short while. Remember to allocate a minimum of 128mb of ram to the GPU! (I am now running with a 256mb split)
I am amazed at what can be done by such a small and cheap device!

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

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Tue Mar 25, 2014 5:33 pm

Could we play games like Medal of Honor allied assault and return to castle wolfenstein?
Engineers like to solve problems. If there are no problems handily available, they will create their own problems.
Scott Adams

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Tue Mar 25, 2014 7:51 pm

Someone ported Return to Castle Wolfenstein, and it is heavily playable. I have actually played quite a bit at playable FPS. I cant seem to find a download link (By Google-ing), but it exists.
I am amazed at what can be done by such a small and cheap device!

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Wed Mar 26, 2014 5:45 pm

I was wondering if the author could give us some clues as to whether any of the config file settings or in-game settings can be used to decrease the game's memory footprint a little? I only ask as I'm running a 256MB Pi with a 128/128 memory split that throws segmentation faults with many Quake I mods. Am I right in guessing that lack of RAM is my problem?

This isn't a complaint by the way. I still think it's amazing that the original pak files work just fine on my little box of wonders. :D
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

User avatar
autonomous
Posts: 24
Joined: Tue Apr 23, 2013 5:24 pm
Contact: Website

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Wed Mar 26, 2014 9:38 pm

GTR2Fan wrote:I was wondering if the author could give us some clues as to whether any of the config file settings or in-game settings can be used to decrease the game's memory footprint a little? I only ask as I'm running a 256MB Pi with a 128/128 memory split that throws segmentation faults with many Quake I mods. Am I right in guessing that lack of RAM is my problem?

This isn't a complaint by the way. I still think it's amazing that the original pak files work just fine on my little box of wonders. :D
Yes, you are correct that the issue is most likely due to lack of memory, particularly if the errors occur when loading a map. Some mods are designed to run only on a gaming pc and simply won't run on a RPi with 512mb not to mention models with only 256mb. If you are able to run mods successfully on a 256mb RPi, please share the results!

A list of working mods along with installation notes is being compiled here:
https://github.com/autonomous1/darkplac ... places-RPi

Reducing texture memory
The following parameters reduce the amount of memory allocated to textures:
gl_max_size - maximum allowed texture size, can be used to reduce video memory usage
gl_picmip - reduces resolution of textures by powers of 2, for example 1 will halve width/height, reducing texture memory usage by 75%

These parameters will affect the visual appearance. Here is an example of config.cfg parameters that will reduce texture memory:

Code: Select all

"gl_max_size" "512"
"gl_picmip" "2"
Reducing display memory
Reducing the resolution from 1080p to 720p or less may free up a few megs. Another option is to change the number of bits allocated per pixel:

vid_bitsperpixel - how many bits per pixel to render at (32 or 16, 32 is recommended)

config.cfg example:

Code: Select all

"vid_bitsperpixel" "16"
Reducing other memory use
After a map has loaded you can examine memory allocations. The console command memstats displays total memory allocated to textures and vertices. The console command memlist prints a detailed list of allocated memory. Sometimes large amounts of memory may be allocated to sound and it may be possible to remove pak files containing audio files.

Recommended memory split
Model B: 256/256
Model A (or 256mb models): 128/128

The default allocation of 64mb GPU memory does not work, as well as allocating 64mb to the Arm.

The next release will include improved bounds checking to avoid segmentation faults or lockup issues. The engine has these types of checks built-in but again it is configured for a gaming pc. The RPi is stressing memory limitations to the max.

User avatar
Nintendo16kid
Posts: 32
Joined: Sun Dec 29, 2013 10:34 pm
Location: England

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Wed Mar 26, 2014 10:13 pm

Just to let everybody know, but I have been running a LAN server on the PI for the last few hours, and it works really well! :D (Cant port forward to see if I could run a public server) I had 4 computers connect via Wifi to the Pi, and there was very little lag. But, I cant seem to type in the section to name the server, or the 'connect to port" section. I can backspace, but cant type. Still, this didn't effect the gameplay or server! (I also cant underscore in the command line. I don't know if this is my keyboard, or something.) :?
I am amazed at what can be done by such a small and cheap device!

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Wed Mar 26, 2014 10:41 pm

Thanks for the very informative reply autonomous. :)

I'll have another play and see if I can get any mods fully working over the next week or so. It's been a very long time since I last played around with pak files, but I've been looking into PakExplorer in the hope that I may be able to streamline some existing mod paks if they're just nudging my 256MB Pi over the limit. ;)
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

forgeflow
Posts: 14
Joined: Wed Feb 12, 2014 7:10 am

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Thu Mar 27, 2014 3:45 am

autonomous wrote: I concur that 1080p doesn't make a huge difference in visual quality and framerates are higher at 720p. The video mode issue can be fixed by editing the ~/darkplaces/id1/config.cfg file and modifying the following parameters:

Code: Select all

"vid_width" "1280"
"vid_height" "720"
"vid_conwidth" "1024"
the vid_height and vid_width values are already set as such in the config.cfg file. My problem is that the game doesn't switch the video mode to this - the monitor is still displaying 1920 x 1080, with the game in a 1280 x 720 box in the lower left corner.

forgeflow
Posts: 14
Joined: Wed Feb 12, 2014 7:10 am

Re: NEW: Darkplaces Quake engine up and running on Raspberry

Thu Mar 27, 2014 4:50 am

autonomous wrote:For joystick mapping, I would start by editing config.cfg and removing all existing joystick mappings to see how the default settings work. An easy way to work out joystick mappings is to map an unrecognized command to each joystick button which will result in an error message being displayed when the button is pressed: For example, the configuration parameter

Code: Select all

bind JOY5 "J5_BTN"
will display an error message "command J5_BTN not found" when the mapped joystick button is pressed.

Documentation on the full set of joystick configuration options and commands can be found here:
https://github.com/autonomous1/darkplac ... tion-guide
Thank you, that was super helpful. However, after messing around with the configs for a while, I just came to the conclusion that joystick control in the game is just too laggy to be workable. I am very comfortable controlling FPS games with either keyboard/mouse or with a decent joystick (I can fly around Borderlands 2 with a joystick like I was born with it) but I can't control Quake on the Pi with a joystick for the life of me. I keep ending up looking at the ceiling or floor for some reason - I think it has to do with lag - there's just too much controller lag for my brain to make any sense of what's happening. Curiously, the lag is mostly absent using the keyboard and mouse. I think I'm blaming the xboxdrv for the lag - too many software layers between my controls and my killin'.

As for the video size, I just forced my Pi's HDMI mode to 1280 x 720 and then the game runs fine full screen. Working on seeing how it goes with the music next.

Return to “Gaming”