QuakeSpasm
Page last edited: October 2022.
QuakeSpasm is a modern cross-platform Quake engine based on FitzQuake.
It includes support for 64 bit CPUs and custom music playback, a new
sound driver, some graphical niceities, and numerous bug-fixes and other improvements.
Quakespasm utilizes SDL-1.2 or SDL2 frameworks, choose one which works best for you.
SDL2 has nicer features, smoother mouse input and better support for newer operating systems,
but no CD-ROM support.
Visit the
FitzQuake homepage for a full run-down of the engine's commands and variables.
- To disable some changes, use "quakespasm -fitz"
- Quakespasm's custom data is stored in "quakespasm.pak". Install this file alongside your id1 directory to enable the custom console background and other minor features.
- For different sound backend drivers use :
"SDL_AUDIODRIVER=DRIVER ./quakespasm"
where DRIVER may be alsa, dsp, pulse, esd ...
- Shift+Escape draws the Console.
- From the console, use UP to browse the command line history and
TAB to autocomplete command and map names.
- There is currently no CD Music volume support and SDL2 doesn't support CD audio. cd_sdl.c needs replacing with cd_linux.c, cd_bsd.c etc..
- In windows, alternative CD drives are accessible by
"quakespasm -cddev F" (for example)
- Quakespasm allows loading new games (mods) on the fly with
"game GAMENAME {-quoth/hipnotic/rogue}"
- Use "quakespasm -condebug" to save console log to "qconsole.log". SDL2 builds no longer generate stdout.txt/stderr.txt.
Quakespasm can play various external music formats, including MP3, OGG and FLAC.
- Tracks should be named like "track02.ogg", "track03.ogg" ... (there is no track01) and placed into "Quake/id1/music".
- Unix users may need some extra libraries installed: "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG.
- Use the "-noextmusic" option to disable this feature.
- As of 0.90.0, music is played back at 44100 Hz by default with no need to adjust "-sndspeed".
- See
Quakespasm-Music.txt for more details.
The SDL2 variant of Quakespasm supports Xbox 360 style game controllers.
The default configuration uses the left analog stick for movement and the right for looking.
If your controller doesn't work you can try placing
this file in your Quake directory, it is a community-maintained database that adds support for more controllers to SDL2.
Cvars
- joy_deadzone - Fraction of the stick travel to be deadzone, between 0 and 1. Default 0.175.
- joy_deadzone_trigger - Fraction of trigger range required to register a button press on the analog triggers, between 0 and 1. Default 0.2.
- joy_sensitivity_yaw/pitch - Max angular speed in degrees/second when looking. Defaults are 300 for yaw (turning left/right) and 150 for pitch (up/down).
- joy_exponent - For the look stick, the stick displacement (between 0 and 1) is raised to this power. Default is 3. A value of 1 would give a linear relationship between stick displacement and fraction of the maximum angular speed.
- joy_invert - Set to 1 to invert the vertical axis of the look stick.
- joy_swapmovelook - Set to 1 to swap the left and right analog stick functions. Default 0, move on the left stick, look on the right stick.
- joy_enable - Set to 0 to disable controller support. Default 1.
Buttons
Some of the controller buttons are hardcoded to allow navigating the menu:
- Back - alias for TAB
- Start - alias for ESC
- DPad, analog sticks - mapped to arrow keys
- A Button - alias for ENTER in menus
- B Button - alias for ESC in menus
These buttons can be bound normally:
- LTRIGGER - Left trigger
- RTRIGGER - Right trigger
- LSHOULDER - Left shoulder button
- RSHOULDER - Right shoulder button
- LTHUMB - Clicking the left thumbstick
- RTHUMB - Clicking the right thumbstick
- ABUTTON
- BBUTTON
- XBUTTON
- YBUTTON
quakespasm.pak contains a default.cfg which has been updated to give some default bindings. L/R shoulder buttons are bound to weapon switching, and L/R triggers are jump and attack.
The controller support started as Jeremiah Sypult's implementation in Quakespasm-Rift, and also uses ideas/code from LordHavoc's DarkPlaces.
See the Downloads section to get the sourcecode, then below for platform specific instructions.
Quakespasm can also be built with the cross-platform Codeblocks.
Quakespasm's (optional) custom data is now stored in the file quakespasm.pak. This file should be placed alongside your quakespasm binary and id1 directory.
After extracting the source tarball, "cd Quake" and edit the Makefile for music options.
Streaming music playback requires "libmad" or "libmpg123" for MP3, and "libogg" and "libvorbis" for OGG files.
Then type "make" to compile the program, and copy the "quakespasm" binary (and "quakespasm.pak") to your Quake game directory.
Compile time options include
- make DO_USERDIRS=1 to include user directories support
- make DEBUG=1 for debugging
- make SDL_CONFIG=/PATH/TO/sdl-config for unusual SDL installations
- make USE_SDL2=1 to compile against SDL2 instead of SDL-1.2
QuakeSpasm developers cross-compile windows binaries using
MinGW-w64 and
MinGW.
The project can also be built using Microsoft Visual Studio 2005 and newer versions.
A Quakespasm App (including program launcher and update framework) can be made using the Xcode template found in the MacOSX directory.
Alternatively, have a look at Makefile.darwin for more instructions on building from a console.
QuakeSpasm 0.94 has support for playing the 2021 re-release content: Copy the quakespasm binary to your rerelease installation and run as you normally do.
- Allow mixing lit and unlit textures in the same map.
- Water texture mipmapping support - fixes glistening effect on distant water.
- Fix screen flashes in some maps with AMD's new drivers.
- Defend against zero-sized textures, e.g. __TB_empty in qbj_grue.bsp
- Fix possible file pointer leak in game load code.
- Minor code cleanups. Updated third party code, e.g. SDL, music codecs, etc.
- Thanks to 'temx' for his patches.
- Add support for lit water (patch contributed by Josiah Jack, with fixes from Eric Wasylishen.)
- Add model scale support -- requires protocol 999. (Original patch contributed by Josiah Jack with fixes from temx and Andrei Drexler. Thanks to Eric Wasylishen, MH and Spike for useful discussions.)
- Add sv_cheats cvar for 2021 rerelease (patch from Andrei Drexler).
- Clear the startdemo list on game change (patch by Andrei Drexler).
- Try light trace from entity origin first (patch by Andrei Drexler).
- Backport a few fixes to the bundled SDL2-2.0.22 version.
- Fix console history buffer wrapping.
- Fix wrong external texture use after vid_restart.
- Update lodepng from mainstream git.
- Miscellaneous source code cleanups.
- Server protocol size check fixes for sounds and particles.
- An invalid memory access fix in the jpg screenshot writer.
- Basic dependency tracking in Makefiles.
- Backported a few fixes to the bundled SDL2-2.0.22 version.
- Minor build fix for C++ compilers.
- Other small improvements elsewhere in the code.
- Compatibility with new SDL2 versioning scheme.
- Revised min/max/clamp macros' usage.
- Fixed a potential undefined behavior in R_DrawAliasModel.
- Fixed parsing of the time argument of svc_fog server message. (it has been broken for more than 20 years and has never seem to have been used.)
- Other small improvements elsewhere in the code.
- Backported a few fixes to the bundled SDL2-2.0.22 version.
- Fixed getting stuck with loading plaque upon attempting to load a bad save from the menu
- Fixed SZ_GetSpace server crashes, e.g. in ad_magna or ad_mountain
- Fixed intermission camera angles during demo playback
- Don't reset onground flag on every new server message
- Re-enabled title demos by default (turn off with cl_startdemos 0)
- Don't autoplay next demo after a timedemo
- Fixed bad parsing of cdtrack in hipdemo1 from Scourge of Armagon
- Fixed serverinfo off-by-one nummodels/numsounds for protocol 15
- Support for Quake 2021 update 3
- Implemented quad/pentagram dlights for Quake 2021 rerelease
- Implemented 2021 rerelease localsound builtin & svc_localsound (56)
- Several other improvements to Quake 2021 rerelease support
- Several other small fixes and improvements all over the code
- Updated third party code (SDL, lodepng, miniz, some of the codecs, etc.)
- Thanks to Andrei Drexler, 'atsb' and 'temx' for their several patches.
- Handle sky textures with non-standard sizes and warn about them (e.g. ad_tears)
- Allow loading textures not aligned to 16 pixels and warn about them (eg. the horde2 map of Dimension of the Machine from 2021 rerelease update/2.)
- Updated included SDL2 to latest version 2.0.18.
- 2021 rerelease: Support for playing the latest update.
- 2021 rerelease: Fix pitch black models in lit areas in DOTM.
- 2021 rerelease: Fix black candles in the DOTM start map.
- 2021 rerelease: Look for QuakeEX.kpf under userdir, too.
- Fix lightmap issues after vkQuake surface mark/cull optimizations merge (sf.net bug/50)
- Initial support for playing the 'Quake 2021 re-release' content (thanks to Andrei Drexler for bulk of the work, Guillaume Plourde for Q64 bsp format support.)
- Fix rendering bug when cl_bobcycle was set to zero (sf.net bug/41)
- Fixed buffer overflow with large char skybox names (sf.net bug/38)
- Fixed a missing MAXALIASFRAMES bounds check (sf.net bug/37)
- OpenGL: workaround Intel UHD 600 driver bug (sf.net bug/39)
- OpenGL: merged surface mark & cull optimizations from vkQuake.
- Compensate viewmodel distortion at fov > 90 (based on code from Qrack, thanks to Andrei Drexler for the patch.)
- Raised MAX_GLTEXTURES limit from 2048 to 4096 for now.
- Changed 'model has a skin taller than 480' error into a warning
- Reject lit files if they're the wrong size (eg hipnotic/start.bsp vs id1/start.lit or just a bsp that no longer has any coloured lits, etc)
- External ent files are now versioned using 4 digit crc of the original map's ents, like e1m1@c49d.ent, which is much safer. The old method (e.g. e1m1.ent) still works but isn't recommended.
- Support for external vis files.
- Save: remove CR/LFs from level name to avoids broken saves, e.g. with autumn_sp map.
- Music: improvements to mp3 tag detection / skipping.
- Music: umx loader fix for malformed / crafted files.
- New console command music_jump: Jump to given order in music, like Unreal's music change - only for module (tracker) music.
- Updated third-party libraries (music codecs, SDL, etc.) Other minor fixes, tidy-ups and protability tweaks.
- Source repository moved to git.
- Lightmaps are now dynamically allocated (from QSS), and BLOCK_WIDTH/HEIGHT raised from 128 to 256.
- Fixed several uncheked limits that would crash the Slayer's Testaments mod (sf.net bug #33).
- Raised MAXALIASTRIS from 2048 to 4096, so that the Slayer's Testaments mod works.
- Fixed 'pants' and 'shirt' types so that those textures load correctly on platforms where char type is unsigned by default (sf.net bug #28).
- Windows audio: WASAPI-enabled SDL2 dlls function properly now.
- Update the third-party libraries. Other fixes/cleanups.
- Fixed a fog regression which was introduced in 0.93.0.
- Fixed a crash (buffer overflow) with invalid vis data.
- Fixed buttons crushing players in 64-bit builds.
- Change controller movement to use cubic easing by default; added "joy_exponent_move" cvar.
- config.cfg is no longer written in case of a Sys_Error.
- Fixed Opus encoded cd tracks not being recognized as rippe