forked from id-Software/Quake
-
Notifications
You must be signed in to change notification settings - Fork 1
wyatt8740/Quake-LinuxUpdate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A brief readme added by Wyatt Ward. I added this readme and some updated Makefiles, as well as tweaking a few of Quake's source files, to make it work properly on a modern Linux system. I did _not_ change any parts of the game to make it look all pretty, or to bring new improvements in graphics to the game. I only changed what was _absolutely essential_ to run the game, plus some things that desperately needed to be changed to work *properly* on modern Linux/Unix systems. Specifically, I am most interested in preserving the software-rendered version of Quake, since no one seems to care about it and everyone uses the later OpenGL port. Perhaps on account of me not knowing almost any 3D graphics programming already, I am not too intimidated by the concept of working on software quake... OpenGL would probably be just as hard. And I prefer how software rendered quake looks. Some more recent noteworthy changes, features, and notes (as of 2023): In the `WinQuake` (original "NetQuake") directory: * Bumped maximum window resolution from 1280x1024 to 2560x2048 for software rendered Quake. Patched some assembly routines related to it, too (for i386). * Added SDL audio backend (borrowed and adapted from Quakespasm). This allows for playing music with a CD drive emulator and getting sound effects simultaneously, without needing two sound cards (since OSS DMA doesn't play nice with software mixing). * Some bad hacks in the makefile to make it link to everything it needs to. * XQuake and GLQuake both function; XQuake is more thoroughly tested. In the `QW` (QuakeWorld) directory (NEW!): * Added support for 24-bit RGB color in X11 software rendered quakeworld. The sources in the `WinQuake` directory supported this already, but QuakeWorld's did not. In many ways, QW seems to be based on an older version of the code. * Bumped maximum window resolution from 1280x1024 to 2560x2048 for software rendered quakeworld. Note that this was more difficult here than in `WinQuake` due to more hardcoded values. Patched some related assembly routines, too (for i386). * Added SDL audio backend (borrowed and adapted from Quakespasm). This allows for playing music with a CD drive emulator and getting sound effects simultaneously, without needing two sound cards (since OSS DMA doesn't play nice with software mixing). * Fixed a crash related to going underwater on some larger screen resolutions. * Some bad hacks in the makefile to make it link to everything it needs to. * XQuakeWorld functions; I play with a friend online using it. * GLQuakeWorld is completely untested and likely needs work. * Extended maximum length of user info string, for partial compatibility with some more "modern" (i.e., incompatible) quakeworld server variants. The original, unmodified source can be found here: https://github.com/id-Software/Quake A good how-to for arguments and troubleshooting and such is here: http://www.linuxdoc.org/HOWTO/Quake-HOWTO-1.html ================================================= : WHAT THIS IS / GENERAL BACKGROUND INFO : ================================================= The how-to did not mention a few problems, which I created fixes for. These include the mouse not working to allow input and no input whatsoever (not even the keyboard) working in fullscreen. I also fixed a buffer overflow caused by the sheer number of OpenGL extensions that modern systems support (the game tries to print them to the console, and in doing so causes a buffer overflow because the string containing all of the extensions is larger than the game expected). The only noticeable difference my tweaks have caused (besides the fact that you now can play the game) is that this string of OpenGL extensions is no longer printed to the terminal (which I doubt most people care about, anyway). I promise I made no tweaks to functionality or controls that would make it differ from the original. ================================================= : COMPILING QUAKE FOR LINUX : ================================================= ++++++++++++++ | DISCLAIMER | ++++++++++++++ I have only built this on 32-bit Linux Mint 14. It should work on 64 bit, but will have to be Compiled with 32-bit libraries and binaries. I think this is merely due to some assembly used, and some changes to update the assembly to the x86_64 architecture could make this work in 64 bit OSes natively. Also, there is a "pure C" implementation of everything that needs assembly on x86; I just need to remember how I used it. I have it working on my Powerbook G4 (PowerPC). With that out of the way here is how to compile it: For the OpenGL GLX version (the high-quality version most sane people want), go to the directory 'WinQuake' and type $ make build_release The makefile named 'Makefile.linuxi386' is the original one from id, which does not work anymore. The GLX and X11 makefiles are derived from this one, but do successfully build. Use them instead! The file 'Makefile.Linuxi386.glx' should be the same as the normal 'Makefile'. ++++++++++++ | X11 Port | ++++++++++++ For the X11 version, the only version I even tried to port and which works well, is simpler to build, has fewer dependencies, and has fewer hardcoded paths, but is lower quality graphics-wise, do $ make -f Makefile.Linuxi386.X11 build_release ================================================= : POTENTIAL BUILD PROBLEMS : ================================================= +++++++++++++ | Libraries | +++++++++++++ If you are missing libraries, headers or whatnot, it will let you know about it quite loudly. You will need a few headers from the linux kernel; if you use ubuntu or an ubuntu variant, the headers should be under something like /usr/src/linux-headers-3.5.0-44/arch/x86/include and /usr/src/linux-headers-3.5.0-44-generic/include ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ $ YOU DO NOT HAVE TO COMPILE THE KERNEL. $ $ YOU DO NOT HAVE TO COMPILE THE KERNEL. $ $ YOU DO NOT HAVE TO COMPILE THE KERNEL. $ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ...Although if you do, enable OSS while you are at it. This can be worked around if you don't compile. All we need is the source files. We have no reason to compile it unless that's something you would normally do anyway. These will have to be edited in the makefile if you have a different version or architecture of the kernel than I did. Search one of the above strings to find where I included them. Replace them appropriately with your kernel versions. If you don't have sources, they are obtainable from most package managers, including apt. A few other paths may have to be changed in the Makefile that I hardcoded, but you can figure those out I think. (Look for 'wyatt' in the makefile; those paths are hardcoded, but there may be more. I honestly don't remember. I only know that when I got the source, id had hardcoded paths in the makefile and i simply changed the paths to fit my environment.) Good luck! ___________________________________________________________________________ ================================================= : PROBLEMS RUNNING THE GAME : ================================================= After building, it will be in the directory 'releasei386'. You will need to copy the directory 'id1' from a quake CD-ROM and place it in the 'bin' directory that your compiled game is in. I have yet to have this problem in Linux, but in windows, I have had blank (white) textures and a flickering display. To fix these, you can add the parameters '-no8bit' '+gl_ztrick 0' to the launching parameters. Note that 'gl_ztrick' _should_ have a "+" sign preceeding it instead of a "-". ================================================= : SOUND PROBLEMS : ================================================= This game uses OSS on Linux; Most modern computers running linux (e.g. Ubuntu, unless you built your own kernel) do not supply this. To fix, install 'aoss' (ALSA OSS wrapper) and run the game using $ aoss ./glquake.glx <parameters> to make it see a fake OSS. The alternative (which will disable sounds but does not require any more package installations) is to pass '-nosound' to the game when invoking. I have not had luck getting sound in Linux Quake. I may need to have the CD-ROM in the drive, but I lost mine years ago and only have the installed version of the game on a old PC's hard disk. I cannot test why sound isn't working, but I can tell you Quake complains about not seeing a CD-ROM. I cannot answer questions about sound support. -Wyatt Ward, 2014-01-06 16:04 EST Last Edited: 2014-01-14 9:25 EST
About
Quake GPL Source - bare minumum tweaks for building and running software rendered X11 quake on modern Linux systems; added SDL2 audio support. QuakeWorld and Netquake work.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C 82.9%
- Assembly 11.5%
- Makefile 5.2%
- Other 0.4%