A few months back I wrote an article outlining the various options Linux users now have for playing Doom 3, as well as stating which of the three contenders I felt to be the best option in 2017. Having already gone to the trouble of getting the original Doom 3 binary working on my modern Arch Linux system, it made me wonder just how much effort it would take to get the closed source Quake 4 port up and running again as well.
Getting it running
Quake 4 was ported to Linux by Timothée Besset in 2005, although the binaries themselves were later taken down along with the rest of the id Software FTP server by ZeniMax. The original Linux FAQ page is still online though, and mirrors hosting the Linux installer still exist, such as this one run by the fan website Quaddicted. Once downloaded this will give you a graphical installer which will install the game binary without any of the game assets.
These will need to be taken from either the game discs of a retail Windows version as I did, or taken from an already installed Windows version of the game such as from Steam. Follow the steps in the Linux FAQ to the letter for best results. Please note that the GOG.com release of Quake 4 is unique in not supplying a valid CD key, something which is still required for the Linux port to launch. There are ways to get around this, but we only condone these methods for legitimate purchasers.
Like with Doom 3 I had to remove the libgcc_s.so.1 and libstdc++.so.6 libraries that the game came with in the install directory in order to get it to run. I also ran into the same sound issue I had with Doom 3, meaning I had to modify the Quake4Config.cfg file located in the hidden ~/.quake4/q4base directory in the same fashion as before. However, this time I ran into a whole host of other issues that made me have to modify the configuration file as well.
First off the language the game wanted to use would always default to Spanish, meaning I had to manually tell the game to use English instead. I also ran into a known issue on all platforms wherein the game would not properly recognize the available VRAM on modern graphics cards, and as such would force the game to use lower image quality settings. Quake 4 will also not render see-through surfaces unless anti-aliasing is enabled, although going beyond 8x caused the game not to load for me.
Appending the following to the end of the Quake4Config.cfg file resolved all of my issues:
seta image_downSize "0"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta image_ignoreHighQuality "0"
seta image_roundDown "0"
seta image_useCompression "0"
seta image_useNormalCompression "0"
seta image_anisotropy "16"
seta image_lodbias "0"
seta r_renderer "best"
seta r_multiSamples "8"
seta sys_lang "english"
seta s_alsa_pcm "hw:0,0"
seta com_allowConsole "1"
Please note that this will also set the game to use 8x anti-aliasing and restore the drop down console to how it worked in all of the previous Quake games. Similar to the Linux port of Doom 3 the Linux version of Quake 4 also does not support Creative EAX ADVANCED HD audio technology. Unlike Doom 3 though Quake 4 does seem to also feature an alternate method for surround sound, and widescreen support was thankfully patched into the game soon after its release.
Playing the game
Over the years Quake 4 has gained something of a reputation as the black sheep of the Quake family, with many people complaining that the game's vehicle sections, squad mechanics, and general aesthetic made it feel too close to contemporary military shooters of the time. In the game's heart of hearts though it really does feel like a concerted sequel to Quake II, with some of developer Raven Software's own Star Trek: Voyager - Elite Force title thrown in for good measure.
To me at least Quake 4 does stand as being one of the "Last of the Romans" in terms of being a first person shooter that embraced classic design ideals at a time when similar titles were not getting the support of major publishers. Most of the game still features the player moving between levels featuring fixed enemy placements, a wide variety of available weapons, traditional health packs, and an array of enemies each sporting unique attributes and skills.
Quake 4 also offers a well made campaign that I found myself going back to on a higher skill level not long after I had already finished my first try at the game. Certain aspects like the vehicle sections do indeed drag the game down a bit, and the multiplayer aspect pales in comparison to its predecessor Quake III Arena, but overall I am quite pleased with what Raven Software was able to accomplish with the Doom 3 engine, especially when so few others tried.
Final thoughts
If anyone ever needed a reason to be reminded of the value of video game source code releases, this is it. Most of the problems I encountered could have been easily sidestepped if Quake 4 source ports were available, but with the likes of John Carmack and Timothée Besset gone from id Software and the current climate at ZeniMax not looking too promising, it is doubtful that any such creations will ever materialize. Doom 3 source ports look to be the end of the road.
Instead we are stuck using this cranky 32 bit binary with an obstructive CD Key check and a graphics system that freaks out at the sight of any modern video card sporting more than 512 MB of VRAM. The game itself has aged well, with graphics that still look great and dynamic lighting that is better than what is included with many modern titles. It is just a shame that it is now such a pain to get running, not just on Linux, but on any platform.
Why, Zenimax?
I still can't figure out: why are they so actively anti-linux. Yes it constitutes a minority among gamers, still, wouldn't explain why aren't they publishing games that already have tested Linux support.
The only logical explanation would be a contract with Microsoft, but then why aren't they pioneering DX12 and blatantly supporting Vulkan.
Boiling Steam did an interview with Tim Basset, he seems to paint it not so much of a resentment, but lack of knowledge
Interesting podcast.
Not sure this answers my question. He didn't say anything pertaining directly to Bethsoft and its parent ZeniMax other than "they're more business conscious".
An interesting post, because I am currently doing a couple of tests and comparisons between the native version and the windows (wine) one using mesa (radeonsi). I don't know why, but on wine, I get a much more smooth gameplay, and finally being able to maintain a 60fps rate without slowdowns, and beside that, now I can use some graphics mods (like sikkmod). I really was frustrated with this, the native version (smp and non-smp) gave me audio problems in addition to lower performance, using the same settings on both platforms. I do not understand, since based on this quote from here :
"... This means that each call to an OpenGL function must be" translated "and can not be directly used by the Windows program."
... perfomance was supposed to be lower.
To get "fixed" frame rate I needed to disable vsync (game), set the option "com_fixedTic" to "1" (the game will be accelerated if your graphic card can exceed 60fps, so to fix this, I needed a limiter (the next tool)) and use strangle to limit the frames at 60. The same process applies to both native and wine versions.
Another advantage in using wine is the possibility of using the virtual desktop, and open the game on the monitor I want (dual monitor here). It's 2018, and this fullscreen problem in dual monitors settings has never been appropriate for certain old native games.
I guess this has to do with the fact that Wine and SDL are actively developed projects with many contributors, while the game itself was taken down by ZeniMax. This means that you can potentially get higher performance than on Windows using a compatibility layer.
A minor grammar question: "...such as this one ran by the fan website Quaddicted." The use of "ran" here doesn't look quite right?
Thanks also to everyone else for the interesting additional info!
ip netns add NI
ip netns exec NI ip set up dev lo
ip netns exec NI <game>
# Wait for game to stop
ip netns delete NI
It will create a network namespace NI, up dev lo (usually important for a lot of things), and start the game within that namespace.
That game will really have no clue about a network, but still has full access to your x-server (as it can reach the socket).
When I first started gaming heavily on Linux starting back in 2007 on Fedora games using OSS were the bane of my existence, as even with the methods for emulating it under ALSA and then later PulseAudio it almost never worked well for me. Just using ALSA for Quake 4 works fine in my experience as long as you specify the correct PCM device and it is not engaged.I've found that if you want to do real gaming, you also need a real sound card. Not those cheap ass HD single PCM channel things. I don't know where it wen't wrong, but the htpc like machines I had in 1999 had the YMF40 chipset, featuring 40 PCM channels.
I've found that the soundblaster live is also pretty good, remixing the 128 channels(?) internally at 48kHz?
I've found that if you want to do real gaming, you also need a real sound card. Not those cheap ass HD single PCM channel things.Considering that my left speaker has a loose cable and keeps cutting in and out, I think my use of an on-board sound chip is the least of my problems. ;)
A minor grammar question: "...such as this one ran by the fan website Quaddicted." The use of "ran" here doesn't look quite right?It seems you are correct, looking into it. Fixed now.
Holy cow, are you still around? I though devs of that site moved on and never looked back, silly me. :-) Well, ETQW requires pre-2.14 glibc to work properly which is not an easy task with current distros. In fact a custom build recent glibc with "disable-multi-arch" option seems to solve the issue but I couldn't figure out how to compile glibc on Ubuntu. :-)
http://forums.warchest.com/showthread.php/32089-ETQW-oddities-with-glibc-2-15-FIX?p=570552&viewfull=1#post570552
http://forums.warchest.com/showthread.php/32089-ETQW-oddities-with-glibc-2-15-FIX?p=396658&viewfull=1#post396658
Also, Quake 4 and ETQW's "improved" binaries have non-standard (probably proprietary) SDL_GL_DisableContext and SDL_GL_EnableContext_Thread functions. As I recently found SDL Compatibility Library which allows SDL 1.2 applications to use SDL 2.0, I wonder if it's possible to port those functions to default SDL 1.2 somehow?
https://github.com/MrAlert/sdlcl/issues/14
The iD patch to SDL1 is now up at idgames-smp.patch trimmed of some Mac and library naming noise. It isn't included in the current Loki libs but I'll include it with the next update.
The patch was included with the QuakeWars Linux installer (not just iD's dead FTP) and I only got QuakeWars after the last Loki libs release, hence why it's not included. You can see the original sdl.1.2.12.patch patch as source at just one site on the internet (according to a Google search for added function names) without having to extract the QuakeWars installer.
Last edited by Swanny on 16 January 2018 at 1:22 am UTC
padsp /pathto/ut2004
seta r_useSMP "1"
seta sys_videoRam "512"
seta r_multiSamples "2"
seta image_downSize "0"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta image_ignoreHighQuality "0"
seta image_roundDown "0"
seta image_useCompression "0"
seta image_useNormalCompression "0"
seta image_anisotropy "16"
seta image_lodbias "0"
seta r_renderer "best"
seta sys_lang "english"
seta s_alsa_pcm "hw:0,0"
seta com_allowConsole "1"
seta s_numberOfSpeakers "2"
When SMP works I am getting a near solid 60 FPS in most instances now. :)
Last edited by Hamish on 19 March 2018 at 10:10 pm UTC
I wonder if it could be possible to create an AppImage of Quake4 with these modifications. That way you could always get it to run even if your system libraries change. Having classics like Quake4 running years or decades later would be great.
Like a flatpak/snap/whatever package this week?
unbindall
bind "TAB" "_impulse19"
bind "ESCAPE" "togglemenu"
bind "SPACE" "_moveup"
bind "+" "_impulse14"
bind "0" "_impulse9"
bind "1" "_impulse0"
bind "2" "_impulse1"
bind "3" "_impulse2"
bind "4" "_impulse3"
bind "5" "_impulse4"
bind "6" "_impulse5"
bind "7" "_impulse6"
bind "8" "_impulse7"
bind "9" "_impulse8"
bind "<" "_ingameStats"
bind "a" "_moveleft"
bind "d" "_moveright"
bind "f" "_impulse50"
bind "r" "_impulse13"
bind "s" "_back"
bind "t" "clientmessagemode"
bind "w" "_forward"
bind "x" "_movedown"
bind "y" "clientmessagemode 1"
bind "z" "_tourney"
bind "BACKSPACE" "clientDropWeapon"
bind "è" "_impulse15"
bind "F1" "_impulse28"
bind "F2" "_impulse29"
bind "F3" "_impulse17"
bind "F5" "savegame quick"
bind "F6" "savegame quick"
bind "F7" "_impulse22"
bind "F9" "loadgame quick"
bind "F12" "screenshot"
bind "MOUSE1" "_attack"
bind "MOUSE2" "_impulse13"
bind "MOUSE3" "_zoom"
bind "MWHEELDOWN" "_impulse14"
bind "MWHEELUP" "_impulse15"
bind "UPARROW" "_forward"
bind "DOWNARROW" "_back"
bind "LEFTARROW" "_left"
bind "RIGHTARROW" "_right"
bind "DEL" "_lookdown"
bind "PGDN" "_lookup"
bind "END" "_impulse18"
seta sv_punkbuster "0"
seta cl_punkbuster "0"
seta com_videoRam "512"
seta com_showFPS "0"
seta com_allowConsole "1"
seta com_purgeAll "1"
seta com_machineSpec "3"
seta sys_lang "english"
seta com_preloadDemos "0"
seta com_compressDemos "1"
seta com_lastQuicksave "Quick1"
seta com_skipLevelLoadPause "0"
seta com_guid "jLble+quvoU"
seta gui_configServerRate "0"
seta m_strafeSmooth "4"
seta m_smooth "4"
seta m_strafeScale "6.25"
seta m_yaw "0.022"
seta m_pitch "0.022"
seta m_accel "0"
seta sensitivity "5"
seta in_joystickLeftStickMove "1"
seta in_toggleZoom "0"
seta in_toggleCrouch "0"
seta in_toggleRun "0"
seta in_alwaysRun "1"
seta in_freeLook "1"
seta in_anglespeedkey "1.5"
seta in_pitchspeed "140"
seta in_yawspeed "140"
seta net_clientRepeaterDelay "0"
seta net_httpServerPlayerBW "0"
seta net_httpServerGlobalBW "0"
seta net_httpServerPort "0"
seta net_httpProxyMode "1"
seta net_httpProxy ""
seta net_reportUsageStatistics "0"
seta net_clientDownload "1"
seta net_serverAllowServerMod "0"
seta net_spawnRepeater "0"
seta net_LANRepeater "0"
seta net_LANServer "0"
seta net_menuLANServer "0"
seta net_master4 ""
seta net_master3 ""
seta net_master2 ""
seta net_master1 ""
seta net_clientUseroriginTime "100"
seta net_clientUsercmdPacking "2"
seta net_clientPrediction "10"
seta net_clientMaxRate "16000"
seta net_serverMaxClientRate "10000"
seta net_serverMenuDedicated "0"
seta ri_maxViewers "0"
seta demo_enforceFS "1"
seta g_friendsList ""
seta g_favoritesList ""
seta image_downSizeLimit "256"
seta image_ignoreHighQuality "0"
seta image_downSizeBumpLimit "256"
seta image_downSizeSpecularLimit "256"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_useCache "0"
seta image_cacheMegs "100"
seta image_cacheMinK "30"
seta image_usePrecompressedTextures "0"
seta image_useNormalCompressionLoadDDSForPal "1"
seta image_useNormalCompression "0"
seta image_useAllFormats "1"
seta image_useCompression "0"
seta image_downSize "0"
seta image_lodbias "0"
seta image_anisotropy "16"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta r_skipSky "0"
seta r_forceAmbient "0.7"
seta r_debugArrowStep "120"
seta r_debugLineWidth "1"
seta r_debugLineDepthTest "0"
seta r_forceLoadImages "0"
seta r_shadows "1"
seta r_useSMP "1"
seta r_skipBump "0"
seta r_skipSpecular "0"
seta r_skipNewAmbient "0"
seta r_renderer "best"
seta r_ignoreHWGamma "0"
seta r_brightness "1.4"
seta r_gamma "1"
seta r_swapInterval "1"
seta r_useIndexBuffers "0"
seta r_customHeight "486"
seta r_customWidth "720"
seta r_fullscreen "1"
seta r_displayRefresh "0"
seta r_mode "17"
seta r_aspectRatio "1"
seta r_alphaToCoverage "1"
seta r_multiSamples "2"
seta gui_mediumFontLimit "0.60"
seta gui_smallFontLimit "0.30"
seta bse_rateCost "1.0"
seta bse_rateLimit "3.0"
seta bse_scale "1.2"
seta s_maxChannelsMixed "24"
seta s_musicVolume "0.5"
seta s_decompressionLimit "2"
seta s_globalFraction "0.8"
seta s_useOcclusion "1"
seta s_playDefaultSound "1"
seta s_maxSoundsPerShader "0"
seta s_doorDistanceAdd "150"
seta s_volume "0.2"
seta s_radioChatterFraction "0.9"
seta s_speakerFraction "0.65"
seta s_numberOfSpeakers "2"
seta s_subFraction "0.5"
seta s_meterTopTime "2000"
seta s_reverse "0"
seta s_mp_maxWindow "0.4"
seta s_mp_minVolume "0.15"
seta s_earSeperationAlgo "0"
seta s_spatializationDecay "2"
seta s_dotbias2 "1.1"
seta s_minVolume2 "0.25"
seta s_dotbias6 "0.8"
seta s_minVolume6 "0"
seta s_dsp "/dev/dsp"
seta s_driver "best"
seta s_alsa_lib "libasound.so.2"
seta s_alsa_pcm "hw:0,0"
seta r_useSDLModes "0"
seta sys_videoRam "512"
seta ui_name "Jugador"
seta ui_model "model_player_marine"
seta ui_skin "base"
seta si_fragLimit "10"
seta si_timeLimit "10"
seta si_map "game/hangar1"
seta si_gameType "singleplayer"
seta g_showHudPopups "1"
seta net_clientLagOMeter "0"
seta g_spectatorChat "0"
seta si_serverURL ""
seta net_serverDlTable ""
seta net_serverDlBaseURL ""
seta net_serverDownload "0"
seta g_announcerDelay "1000"
seta g_mapCycle "mapcycle"
seta si_voteFlags "0"
seta g_gameReviewPause "30"
seta g_password ""
seta g_gunViewStyle "0"
seta g_crosshairCustomFile "gfx/guis/crosshairs/crosshair_blaster.tga"
seta g_crosshairCustom "0"
seta g_crosshairColor "0 1 0 1"
seta g_crosshairSize "32"
seta g_brassTime "2"
seta g_showProjectilePct "0"
seta g_showHud "1"
seta g_simpleItems "0"
seta g_skipItemShadowsMP "0"
seta g_skipPlayerShadowsMP "0"
seta g_showPlayerShadow "0"
seta pm_vehicleSoundLerpScale "10"
seta pm_vehicleCameraScaleMax "300"
seta pm_vehicleCameraSpeedScale "0.5"
seta pm_vehicleCameraMinDist "300"
seta pm_vehicleCameraSnap "1"
seta pm_zoomedSlow "100"
seta g_editEntityTextDistance "256"
seta g_editEntityDistance "512"
seta g_showcamerainfo "0"
seta g_healthTakeLimit "25"
seta g_healthTakeAmt "5"
seta g_healthTakeTime "5"
seta g_useDynamicProtection "1"
seta g_armorProtectionMP "0.66667"
seta g_armorProtection "0.66667"
seta g_nightmare "0"
seta g_decals "1"
seta g_doubleVision "1"
seta g_projectileLights "1"
seta g_muzzleFlash "1"
seta g_forceMarineModel ""
seta g_forceStroggModel ""
seta g_forceModel ""
seta ui_showGun "1"
seta ui_autoReload "1"
seta ui_autoSwitch "1"
seta ui_hitscanTint "120.0 0.6 1.0"
seta ui_clan ""
seta ui_model_strogg ""
seta ui_model_marine ""
seta ui_team "Marine"
seta si_controlTime "120"
seta si_autobalance "1"
seta si_shuffle "0"
seta si_spectators "1"
seta si_usePass "0"
seta si_warmup "1"
seta si_teamDamage "0"
seta si_suddenDeathRestart "1"
seta g_privatePassword ""
seta si_privatePlayers "0"
seta si_allowHitscanTint "2"
seta si_allowVoting "0"
seta si_useReady "0"
seta si_tourneyLimit "3"
seta si_captureLimit "5"
seta si_minPlayers "1"
seta si_maxPlayers "12"
seta si_mapCycle ""
seta si_dropWeaponsInBuyingModes "0"
seta si_isBuyingEnabled "0"
seta si_name "Quake 4 Server"
seta si_voiceChat "1"
seta image_roundDown "0"
Last edited by Hamish on 19 March 2018 at 10:06 pm UTC
I've made all the suggested changes to the quake4config.cfg file but I have crappy video. It looks like a 1970's cartoon. No shading, flat, boring. I'm running the Nvidia driver on Ubuntu 17.10. I've got the video settings in the game set to Ultra, wide screen.Sounds to me like you have somehow toggled the "Force ambient light" option in the Advanced Settings. Turn that off and you should be golden.
I didn't have to do any special tweaking on my system (openSUSE Leap 42.3) to get it running.
I just installed with the script and then replaced all the .pak files with the ones in the GOG's version.
Sound worked out of the box and I didn't have to replace any library.
Here is my full AutoExec.cfg file for the record:
seta r_useSMP "1"
seta sys_videoRam "512"
seta r_multiSamples "2"
seta image_downSize "0"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta image_ignoreHighQuality "0"
seta image_roundDown "0"
seta image_useCompression "0"
seta image_useNormalCompression "0"
seta image_anisotropy "16"
seta image_lodbias "0"
seta r_renderer "best"
seta sys_lang "english"
seta s_alsa_pcm "hw:0,0"
seta com_allowConsole "1"
seta s_numberOfSpeakers "2"
When SMP works I am getting a near solid 60 FPS in most instances now. :)
All of those settings are set automatically if the game is en "Ultra: with the exception of:
seta com_allowConsole "1"
seta image_roundDown "0"
seta r_useSMP "1"
seta sys_videoRam "512"
Can you explain why you needed image_roundDown "0" ?
Like you said, the only playable anti-aliasing configuration is r_multiSamples "2", I don't know why, my system handled Doom3 and RBDoom3BFG with r_multiSamples "8" just fine.
Also, if you use NVIDIA DON'T enable GLThreadedOptimizations, this will make the game unplayable when using anti-aliasing.
Also, the game crashes on exit every time, does anyone know how to fix this?
---------------------------------------------
Shutdown event system
---------------------------------------------
shutdown terminal support
Segmentation fault (core dumped)
EDIT:
It seems I was wrong about GLThreadedOptimizations, they do not affect performance. I don't know what combination I tried before that broke my game.
Last edited by itaranto on 22 July 2018 at 6:18 pm UTC
Can you explain why you needed image_roundDown "0" ?I am not an expert on the various settings; I was mostly working back from other guides. If you can find no value to using that particular setting then feel free to go without it. You probably know more about this than I do.
Also, the game crashes on exit every time, does anyone know how to fix this?I have never had that problem, but I would suggest removing the bundled libgcc_s.so.1 and libstdc++.so.6 libraries just to see if forcing the game to use your own system libraries resolves the issue.
Also, the game crashes on exit every time, does anyone know how to fix this?I have never had that problem, but I would suggest removing the bundled libgcc_s.so.1 and libstdc++.so.6 libraries just to see if forcing the game to use your own system libraries resolves the issue.
Yep, renaming/removing libgcc_s.so.1 and libstdc++.so.6 did the job.
Also, I had to set seta r_alphaToCoverage "0" in order to fix transparent textures (e.g. windows).
So, my actual AutoExec.cfg is:
seta com_allowConsole "1"
seta com_showFPS "1"
seta image_anisotropy "8"
seta image_downSize "0"
seta image_downSizeBump "0"
seta image_downSizeSpecular "0"
seta image_filter "GL_LINEAR_MIPMAP_LINEAR"
seta image_ignoreHighQuality "0"
seta image_lodbias "0"
seta image_roundDown "0"
seta image_useCompression "0"
seta image_useNormalCompression "0"
seta m_smooth "0"
seta r_alphaToCoverage "0"
seta r_multiSamples "0"
seta r_renderer "best"
seta r_useSMP "1"
seta s_alsa_pcm "hw:0,0"
seta s_driver "alsa"
seta sys_lang "english"
seta sys_videoRam "1024"
Bonus:
I did some tweaking to make corpses persistent and to enable self-shadowing for actors/monsters (this is really a HUGE improvement).
First, I downloaded this mod:
https://gamefront.online/files/4281546/q4_corpsstay_and_selfshadow_v01.zip
After downloading the mod, I extracted the pk files into my quake4/q4base directory.
What it does is, basically sets the "burnaway" attribute to <SOME_BIG_VALUE> in:
def/ai/
actor.def
monster_boss_buddy.def
monster_harvester_combat.def
monster_makron.def
monster_network_guardian.def
monster_strogg_hover.def
monster_strogg_marine.def
and comments the "noSelfShadow" attribute in:
materials/
characters.mtr
monsters.mtr
Now I have to play Prey :)
Last edited by itaranto on 2 August 2018 at 11:52 pm UTC
Sorry for the bit off-topic, but I started the new Prey game last week. So far I liked the plot of the original better. Did the port of that get finished?I do have an article on the original Prey:
https://www.gamingonlinux.com/articles/playing-prey-on-linux-in-2018.11118
Last edited by Hamish on 4 August 2018 at 1:30 am UTC
See more from me