Note: All of the release 6 features of the Q2CP are also included in RoachQuake!
Kept here is a compilation of several of the modifications to the released Quake 2 engine source code. This distribution merges them together into one Windows executable so you don't have to go through the trouble of merging them yourself and then compiling. (Of course, the source is included if you need to compile under Linux or want to study the changes.) The modifications come from myself, the tutorials found on The Quake Standards Group website, and MrG's/Heffo's BeefQuake website. This distribution falls under the GNU General Public License.
Click here to download Quake 2 Compilation Project r6 binaries (If all you want to do is use the program, this is all you need.)
Click here to download Quake 2 Compilation Project r6 source code
Installation: Before copying, you can optionally rename the original copies of the quake2.exe and gamex86.dll as backups in case you want to go back to the old version. Copy the quake2.exe and ref_q2cpgl.dll to your quake2 folder, and copy the gamex86.dll to your baseq2 folder. You can copy the source folder to whereever you like if you want to study or recompile the source code.
Release notes: (From the text file included in the distribution.)
Changes I have made to the engine: (Look for initials "DMP" in the source code)
== r1,r2 ==
- Added r_skydistance cvar to allow skybox to be resized for large maps (note
the changed var. name from prev. release!)
- Changed "intensity" cvar so that it is saved in the config.cfg file
- Added 1280x768 to the video modes menu
- Changed Aaron's code so grenades still cast shadows, and disabled shadows for
the two minelight entities.
- Fixed a few compiler warnings in the code
- Fixed bug where 44KHz playback would revert to 11KHz playback
- Added 44 and 48 KHz playback to options menu & changed options to be more
specific
- Changed 'rate' default from 25000 to 2500
- Changes several video & gl cvars so they default to values that look
better for today's modern gfx cards and not the old Voodoo 1 & Voodoo 2
cards
- Fixed bug where CD audio doesn't play when CD is in a drive other than the
first in the list of CD drives (Now uses cddir cvar)
- Added 'gl_saturation' cvar to control color saturation of paletted textures
- Whereever a documented change existed in the source, I changed the start of
the comment to read " //** " so those changes can be found easily by doing a
simple search of the source for the above string
- Updated version display on console
== r3 (1/26/02) ==
- Fixed crash bug in Heffo's ARB texture compression initialization (cards that
didn't support it crashed Q2)
- Added r_showskybrushes cvar
- Added gl_maxtexsize cvar
- Officially named this the Quake 2 Compilation Project
== r4 (3/1/02) ==
- Fixed command buffer overrun crash bug
- Added dynamic listing of available OpenGL drivers to video menu
- Removed Beefquake script loading warning message during map load (will now
only display if in developer mode)
- Renamed my ref_gl.dll to ref_Q2CP.dll so it works with my new dynamic driver
listing feature
- Added new cvar to renderer: gl_lightcutoff (dynamic light cutoff value)
- Fixed problem with some special FX being disabled when render driver wasn't
named something other than "ref_gl.dll"
- Default value of gl_maxtexsize is now set my querying the graphics card
driver (still limited to max of 1024x1024 for now, though)
- Tweaked default brightness settings again
- Fixed annoying problem of non-dedicated servers getting stopped with a
"connection reset" error whenever a client logged off
== r5 (12/24/03) ==
- Fixed bug where I forgot to set base address in game DLL, caused save games
to not work after quitting the game!
- Added more info to output of game base address error message.
- Made cd_loopcount and cd_looktrack cvars get saved to config file.
- Recompiled with better code optimization enabled; also changed CPU
compile-for type from Pentium to Pentium Pro+.
- Added Parhelia triple monitor support by adding additional video resolutions.
Also renumbered some gl_mode values.
== r6 (12/3/06) ==
- Added custom video resolution support! Specify your custom modes with the new
"vid_modelist" cvar. See the cvar docs below for details on how to format the
mode list.
- Added new cvar to allow the user to disable the BeefQuake water shader
effect, as this effect causes problems with some video driver versions.
- Recompiled code with VC 2003 Toolkit, full optimization turned on and
compiled for newest CPU's (/G7 option).
Changes created by others:
== r1,r2 ==
- Added Aaron's fix that turns off shadows for certain entities
- Added TheInvisible's 1280x1024 support
- Incorporated tompsson@hotmail.com's window taskbar bug fix tutorial
- Added Discoloda's dynamic-light-thru-brush fix tutorial
- Added jkrige's TGA model skin loading tutorial
- Merged in MrG's and Heffo's BeefQuake distro. (See aforementioned site for
all the great new features!)
== r3 ==
- Added part of Nexus' 1024x1024 texture support, changed so max is
configurable (see cvar below)
== r4 ==
- Added Guy Paddock's gl_showtris in multitexture mode fix (you can now turn
gl_showtris on and off w/o having to disable multitexturing!)
- Ported (hopefully) all of MrG's Beefquake bug fixes he did for r2 that were
included in release 3, and a few of the features. Note that motion blur,
stains, and the new particles are not present in this release of Q2CP. (I'm
short on time at the moment.) However, because of the dynamic listing of
renderers, you can switch between Q2CP's renderer and the full Beefquake
renderer on the fly!
- Added MrG's stain interface to the main Quake2.exe so the Q2CP executable is
fully compatible with the Beefquake r3 renderer.
- Removed jkrige's TGA model skin mod since that appears to already be part of
GL_FindImage() in the Beefquake stuff
== r5 ==
- None.
== r6 ==
- None.
Documentation:
If you want to learn how to use the BeefQuake features, I strongly urge you to visit the BeefQuake site!
To learn more about the tutorial features included in this distro, visit the The Quake Standards Group Q2 tutorials page.
As for the new features I myself have added:
This version now supports dynamic lists of OpenGL and software drivers. That
means you can take this Quake2.exe engine version and place all of your
favorite renderers in the same directory, and it will automatically build a
list of them in the video options window that you can scroll through. If you
want to use the original 3.21 renderer, select "Default OpenGL". To select the
Q2 compilation project renderer, select "q2cpgl" from the list. The scanning
mechanism matches any file that starts with "ref_" and ends with "gl.dll". The
name inbetween those strings must have at least 1 character. (Thus ref_gl.dll
gets filtered out and is placed in the old hard-coded section of renderers.)
There is space for 16 characters for the name inbetween (plenty of room for a
meaningful name) anything over that gets safely truncated. Attention Linux
users: This feature needed to be implemented in a module in the
win32 source folder, so if you compile the project in Linux, you won't get this
feature. I haven't been able to get the Q2 source to compile under Linux yet so
I don't know when I'll be able to port it and test it. However, if you want to
port this feature over yourself it should be trivial.
r_skydistance - Setting to change skybox size in order to avoid large maps from clipping in the distance. Default is 2300 (the original skybox size). As you increase the skybox size you may decrease Z-buffer resolution. Experiment!
gl_saturation - Allows you to adjust paletted texture saturation. (Or more specifically, the amount of de-saturation.) This won't have any effect on lighting or any new 24 or 32 bit textures you use in the game. However, since all of the existing textures are paletted, this feature will come in handy for users who have modern 3D cards where the environment seems over-saturated.compared to the old Voodoo 1 and 2 cards the game was designed for. Default value is 1.0, and that causes no change to the saturation. Values less than 1.0 desaturate the colors on a non-linear scale. Specifying values greater than 1.0 to oversaturate will not work. (The colors will simply look strange.) On my nVidia chipset gfx card with the new brightness defaults, a value of 0.89 gives a nice creamy realistic look without causing the lava textures to turn gray.
r_showskybrushes - There was some nifty code in the engine that was set up for debugging purposes that would draw the actual brushes instead of drawing open sky. I took that code and set it to run based on a cvar setting so you don't have to have a compiler to take advantage of this feature. Set r_showskybrushes to 1 to replace the view of the normal sky with the actual sky brush BSP cuts. Set it to 0 to return to the normal sky view again.
gl_maxtexsize - Defaults to 256 (the original engine value) but you can change it to 512 or 1024 (must be a power of 2) to take advantage of high-resolution textures. Although you'll have to have maps (or models) that include larger textures to truly make use of this feature, a few of the standard Quake 2 textures are already larger than 256 pixels. You'll see a little extra sharpness if you increase this to 512 (and have a gfx card that supports it) for these textures.
gl_lightcutoff - Defaults to 64. This value was hard-coded into the renderer, now it is user-defined. If you want the dynamic lights to look like they do in Beefquake, set this to 0. You can also try other values.
gl_ext_disableshaders - Defaults to 0. This value (when set to 1) will cause the BeefQuake water shader effects (and any other future shader effects that might get implemented) to be disabled. If you are having crash issues when this program starts try disabling this variable in the config.cfg and see if that fixes the problem.
vid_modelist - Defaults to "320x240{} 400x300{} 512x384{} 960x720{} 1280x768{16:9} 1280x960{16:10}". The default value sets up custom modes that match those of the original non-modified 3.21 Quake 2 release. Each mode entry is separated by a space, and there can be no spaces between the "x" and the resolution values. Also note that for each mode you can place short optional comments between the two brace characters { }. It is okay to use spaces inside the comment braces as everything inside those braces is displayed verbatim. For my setup, I used it to specify the screen aspect ratio of a particular mode, but you can put whatever you like in here as long as it is short. (Long text will be truncated.) The comments will be displayed along side the mode selected in the video options menu. Because custom modes are now user-defined, the hard-coded extra modes that were in previous Q2CP releases have been removed. (The Parhelia triple monitor support, for example.) However, you can add that mode and any other your video card supports back to the list yourself. You will notice that 640x480 and 1024x768 are not included in the default list - this is because those (and other standard modes) are always available since they remain hard-coded in the program for compatibility. The modes specified here are added into the internal modes list in a sorted order, so 320x240 will display in the list before 640x480 for example. Note: The custom modes only work 100% for my ref_q2cpgl.dll because other GL renderers will not look for this cvar and will instead use their own internal hard-coded list of modes. (You can still use another renderer; however, you'll either have to set up "vid_modelist" to match their internal list or guess at the proper "vid_mode" cvar value to use. In order to set up a custom list, you should either set this vid_modelist cvar from the Quake 2 console or edit the config.cfg file to include the modes you want to be made available.
- David M. Pochron (david@enigmaticsoftware.com)