Google+

Translate

06 January 2016

Quake IV Linux PC Gaming 2016 (Quake 4)




Quake IV... Yes it's an older game(2005), and it has aged, but still a very enjoyable experience and a decent single player campaign, with some perhaps not so subtle references to classic Sci-Fi movies and culture very evident inspiration for the developers(Raven Software, who have put out many other quality titles), and the nods to some of my favourite films including 1986's Aliens, and 1997's Starship Troopers in the opening cinematic are very much noted and appreciated.




A direct sequel to Quake II, and taking place during the same conflict as Enemy Territory: Quake Wars, The game is single player focused, but does have multi player similar to Quake 3 Arena. The game engine has been open sourced under GPL license but the game assets are not.

Now, Down to Business, getting the damn thing working on a modern and up to date Linux system, some of the settings will also apply to windows, but this post will focus on Linux, for some reason i wasn't able to get the game to run without crashing under windows I'm pretty sure it's a rogue setting somewhere messing things up though.
So, What I'll cover here:
  • Installation
  • Sound
  • Graphics
  • Multi-Monitor issues
  • Multicore CPU / SMP support
For anything else there are many great guides and forum posts out there already.

Getting Started:

Firstly you'll need either a retail (CD/DVD) or digital (Steam) version of the game to get the required game content in the form of .PK4 files, works just the same with both the steam and retail CDs / DVD, I have both the Steam version and the Retail DVD I purchased way back on release, There may be other options in regards to acquiring the files but that's up to you :D

You will also need a valid CD key to play the game.

The files needed:

You can copy over all of the .pk4 files(although some will be created by the Linux installer anyway) also make sure you get the language files which are the zpak_english.pk4 or whatever language you prefer, make sure you get em all.

How to install:

As with many of the other idtech games there are linux patches and installers available going back to the original doom / quake / hexen / heretic games. But how we go about installing is down to which Linux Distro you use.

Arch / Arch based:

The latest version of the installer can be found in the AUR with the Demo installer also there, so installation if pretty easy here, install same as any AUR package, Currently I'm using Manjaro KDE, so to installed I'd simply enter the following command:

yaourt quake4

This brings up Quake 4 1.4.2-3 which is the full game installer(minus in game content, see above) quake4-demo 1.0-5, and quake4-multiplayer-demo 1.4.2-1.

The one we want is the full game, which is option 1.

Install as normal, the default installation path is "/opt/quake4" and also the config files / save games / quake4key file will be located in "/home/username/.quake4/"

Copying the game content files:

The files need to go into the "/opt/quake4/q4base" directory, you'll need root access to copy files into this directory, I have noticed that there is also a q4base directory within "/home/username/.quake4/" but I'm unsure if the files can also be placed there(in which case root access wouldn't be needed).

Steam Version: Simply copy the .pk4 files listed above into the "/opt/quake4/q4base/" directory, but you'll also need to copy your "quake4key" file into the "/home/username/.quake4/q4base/" directory

Note: You may need to run the game once before the .quake4 directory is created, I Didn't check if this is required.

Overwrite any files if necessary.

For the Retail version, the .pk4 files will all be on the DVD/CDs, simply copy them fron the DVD/CDs, and when you run the game enter your valid CD Key when prompted.

For other Linux Distributions you can check if the installer is held in the repositories, or simple download the installer and run it manually:

It can be downloaded from many sources including the id software FTP server:

ftp://ftp.idsoftware.com/idstuff/quake4/linux/

It's a binary file so simple make it executable and then run
chmod +x and ./quake4-linux-1.4.2.x86.run

Follow the instructions / agree to licenses etc.

Note: Before doing anything else, try to launch the game and set the in game settings, eg controls, resolution and graphic options, this means less to set in the config file later and you'll know the game actually runs before messing with anything else.

NOW! for the Issues I personally encountered:

Sound:

Sound was crackling and missing channels and well just not right, easy fix, all you need to do is set the following options in the Quake4Config.cfg file:

seta s_numberOfSpeakers "2"  <<< Set your speakers Stereo for me so 2.

Note: For some reason the game kept setting this back to surround "6" speakers each time on start-up of the game, so I just set the config file to read only which solved the issue.

seta s_dsp "/dev/dsp"
seta s_driver "alsa"                   <<< Change from "best".

Note: There may be other acceptable options here such as OpenAL or OSS, and I didn't try "pulse" or "pulseaudio" so feel free to experiment here alsa worked for me. 

seta s_alsa_lib "libasound.so.2"
seta s_alsa_pcm "plughw:1"      <<< Change to whatever your soundcard ID is.

Now to find out what your sound card ID is (systems these days normally have multiple sound devices, eg USB DACs, onboard sound, USB headsets, HDMI sound from GPUs etc) so this needs to be set correctly, I use a USB sound card, if you type "aplay -l" this will list all your alsa sound devices and also their IDs

Example output from my system:

[*****@syndesktop ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0


So what we take from that is the alsa device ID for my usb sound card is hw1:0
or "plughw:1" which is what I put in the Quake4Config.cfg file for "seta s_alsa_pcm"

BOOM! sound issues sorted.

Graphics:

Quake IV has an annoying bug where it incorrectly detects system resources and locks the settings to low making textures look like a terrible N64 style blurry mess, even if you set the in game settings to ultra. Luckily there's a fix for this too and it just means going back into the Quake4Config.cfg file and making some changes, there's a lot you can tweak in here so be careful what you mess with.



Note: The game will initially default to 640x480 4:3 Low settings, but does support 16:9 and 1920x1080 (custom resolutions can also be set in the config file)

Settings that need setting!

seta image_ignoreHighQuality "0"  << Set this to 0 default is 1
seta image_downSizeBump "0"       << Set this to 0
seta image_downSizeSpecular "0"  << Set this to 0
seta image_cacheMegs "100"          << can be set larger if needed
seta image_cacheMinK "30"            << can be set larger but shouldn't need to
seta image_downSize "0"                 << Set to 0
seta image_anisotropy "8"               << Can you guess what these are?
seta r_multiSamples "16"                 << ..

seta sys_videoRam "8192"               << Set your GPU's VRAM in MB mine is 8GB

Once these are set, you may want to set the Quake4Config.cfg file to read only, which will stop the game from making any changes to your configuration. So you'll probably want to have your controls and everything else set as you like it before setting to read only.

All of these settings can also be set via console command within quake 4(make sure you enable the console) and also as command line / launcher options if need be / you prefer doing that, although I find the config file a more tidy way.

Muliple Monitors:

Now I run 2 monitors of different sizes and resolutions, and when set to full screen and ran at 1920x1080 the game likes to run in the middle of the two screens spanned across them, which isn't ideal, ideally I'd like to have the game run on my main 1920x1080 monitor, a lot of SDL / OpenGL games can have this issue, but depending on your desktop environment it's an easy fix.

As mentioned before I'm using Manjaro KDE plasma, one of the nice things about KDE is that you can set specific per-application / per-window rules and force them / remember them. So this fix / workaround can be applied to any game or application, there may be similar options available in other Desktop Environments / window managers.

Fix: Set the game to windowed mode, right click on the window title bar, and click "Special Application Settings" here you will be able to set rules for the application window including default start up position(by pixel) and location (eg top left) you'll also be able to set it to borderless and to have no title bar, and to be full screen, Another important rule to set is the focus stealing provention, this will prevent mouse movement roaming outside the game window and key presses from running system shortcuts. If you are getting screen tearing you can also try the "block compositing" option, which can also be set globally somewhere(cant remember where right now).

Multicore CPU support: The game does support multicore cpus so if you do want better performance you can run the quake4-smp executable instead of the default executable, there is an option to enable smp in the config file, although I am not sure if this is required if running the smp executable, I've not played around with this much.

And that should be all folks! Enjoy the game, It still looks pretty decent to this day, considering how old it is now, being initially released in October 2005, that's over 10 years ago now.

No comments:

Post a Comment