Top Related Projects
Quick Overview
Quake III Arena is a legendary first-person shooter game developed by id Software. This GitHub repository contains the source code for the game engine, which was released under the GPL license in 2005. It serves as a valuable resource for game developers and enthusiasts interested in studying or modifying the iconic Quake III engine.
Pros
- Open-source availability allows for community contributions and modifications
- Highly optimized and efficient game engine architecture
- Cross-platform support (Windows, Linux, macOS)
- Serves as an educational resource for game development techniques
Cons
- Dated codebase (originally released in 1999)
- Lacks modern graphics features found in contemporary game engines
- Complex codebase may be challenging for beginners to understand
- Does not include game assets, which are still proprietary
Code Examples
- Player movement calculation:
void PM_Accelerate( vec3_t wishdir, float wishspeed, float accel ) {
int i;
float addspeed, accelspeed, currentspeed;
currentspeed = DotProduct (pm->ps->velocity, wishdir);
addspeed = wishspeed - currentspeed;
if (addspeed <= 0) {
return;
}
accelspeed = accel*pml.frametime*wishspeed;
if (accelspeed > addspeed) {
accelspeed = addspeed;
}
for (i=0 ; i<3 ; i++) {
pm->ps->velocity[i] += accelspeed*wishdir[i];
}
}
- Rendering a frame:
void SCR_UpdateScreen( void ) {
static int recursive;
if ( !scr_initialized || recursive ) {
return;
}
recursive = 1;
// if running in stereo, we need to draw the frame twice
if ( cls.glconfig.stereoEnabled ) {
SCR_DrawScreenField( STEREO_LEFT );
SCR_DrawScreenField( STEREO_RIGHT );
} else {
SCR_DrawScreenField( STEREO_CENTER );
}
if ( com_speeds->integer ) {
re.EndFrame( &time_frontend, &time_backend );
} else {
re.EndFrame( NULL, NULL );
}
recursive = 0;
}
- Collision detection:
qboolean CM_BoundsIntersect(const vec3_t mins, const vec3_t maxs,
const vec3_t mins2, const vec3_t maxs2)
{
if (maxs[0] < mins2[0] - SURFACE_CLIP_EPSILON ||
maxs[1] < mins2[1] - SURFACE_CLIP_EPSILON ||
maxs[2] < mins2[2] - SURFACE_CLIP_EPSILON ||
mins[0] > maxs2[0] + SURFACE_CLIP_EPSILON ||
mins[1] > maxs2[1] + SURFACE_CLIP_EPSILON ||
mins[2] > maxs2[2] + SURFACE_CLIP_EPSILON)
{
return qfalse;
}
return qtrue;
}
Getting Started
To build and run Quake III Arena from source:
-
Clone the repository:
git clone https://github.com/id-Software/Quake-III-Arena.git
-
Install necessary dependencies (varies by platform)
-
Build the project:
cd Quake-III-Arena make
-
Run the game (requires game assets):
./ioquake3
Note: You'll need to obtain the game assets separately, as they are not included in the open-source release.
Competitor Comparisons
DOOM Open Source Release
Pros of DOOM
- More historically significant and influential in the gaming industry
- Simpler codebase, easier for beginners to understand and modify
- Broader modding community and available resources
Cons of DOOM
- Older technology, less advanced graphics and gameplay mechanics
- Limited multiplayer capabilities compared to Quake III Arena
- Less optimized for modern hardware and operating systems
Code Comparison
DOOM (main game loop):
void D_DoomLoop (void)
{
while (1)
{
// Frame syncronous IO operations
I_StartFrame ();
// Process one or more tics
TryRunTics ();
// Move positional sounds
S_UpdateSounds (players[consoleplayer].mo);
// Update display, next frame
D_Display ();
}
}
Quake III Arena (main game loop):
void Com_Frame( void ) {
// if not running as a server, sleep a bit
if ( com_dedicated->integer == 0 && com_timedemo->integer == 0 && com_sv_running->integer == 0 ) {
NET_Sleep( com_frameMsec->integer );
}
// make sure all queued events are run
Com_QueueEvent( 0, SE_NONE, 0, 0, NULL, NULL );
Com_EventLoop();
// update the game
CL_Frame( msec );
}
Both games use a main loop structure, but Quake III Arena's implementation is more complex, reflecting its more advanced features and multiplayer focus.
The ioquake3 community effort to continue supporting/developing id's Quake III Arena
Pros of ioq3
- Active development and community support
- Cross-platform compatibility (Windows, macOS, Linux)
- Improved graphics and performance optimizations
Cons of ioq3
- Potential compatibility issues with original Quake III Arena mods
- Slightly different gameplay feel due to engine modifications
Code Comparison
Quake-III-Arena (original):
void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {
// ... (original code)
}
ioq3:
void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demoPlayback ) {
// ... (modified code with additional features and optimizations)
}
The ioq3 project is an open-source continuation of the Quake III Arena engine, offering improved features and ongoing development. While it maintains compatibility with the original game, some differences in gameplay and mod support may exist. The code comparison shows that ioq3 builds upon the original codebase, adding enhancements and optimizations while preserving the core functionality.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Quake III Arena GPL source release
This file contains the following sections:
LICENSE GENERAL NOTES COMPILING ON WIN32 COMPILING ON GNU/LINUX COMPILING ON MAC
LICENSE
See COPYING.txt for the GNU GENERAL PUBLIC LICENSE
Some source code in this release is not covered by the GPL:
IO on .zip files using portions of zlib
lines file(s) 4299 code/qcommon/unzip.c 4546 libs/pak/unzip.cpp Copyright (C) 1998 Gilles Vollant zlib is Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
- This notice may not be removed or altered from any source distribution.
MD4 Message-Digest Algorithm
lines file(s) 299 code/qcommon/md4.c 277 common/md4.c Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified as the <93>RSA Data Security, Inc. MD4 Message-Digest Algorithm<94> in all mater ial mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such work s are identified as <93>derived from the RSA Data Security, Inc. MD4 Message-Dig est Algorithm<94> in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchanta bility of this software or the suitability of this software for any particular p urpose. It is provided <93>as is<94> without express or implied warranty of any kind.
checksums are used to validate pak files
standard C library replacement routines
lines file(s) 1324 code/game/bg_lib.c Copyright (c) 1992, 1993 The Regents of the University of California. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors.
- Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ADPCM coder/decoder
lines file(s) 330 code/client/snd_adpcm.c Copyright 1992 by Stichting Mathematisch Centrum, Amsterdam, The Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
JPEG library
code/jpeg-6 libs/jpeg6 Copyright (C) 1991-1995, Thomas G. Lane
Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind.
These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us.
NOTE: unfortunately the README that came with our copy of the library has been lost, so the one from release 6b is included instead. There are a few 'glue type' modifications to the library to make it easier to use from the engine, but otherwise the dependency can be easily cleaned up to a better release of the library.
GENERAL NOTES
A short summary of the file layout:
code/ Quake III Arena source code ( renderer, game code, OS layer etc. ) code/bspc bot routes compiler source code lcc/ the retargetable C compiler ( produces assembly to be turned into qvm bytecode by q3asm ) q3asm/ assembly to qvm bytecode compiler q3map/ map compiler ( .map -> .bsp ) - this is the version that comes with Q3Radiant 200f q3radiant/ Q3Radiant map editor build 200f ( common/ and libs/ are support dirs for radiant )
While we made sure we were still able to compile the game on Windows, GNU/Linux and Mac, this build didn't get any kind of extensive testing so it may not work completely right. Whenever an id game is released under GPL, several projects start making the source code more friendly to nowaday's compilers and environements. If you are picking up this release weeks/months/years after we uploaded it, you probably want to look around on the net for cleaned up versions of this codebase as well.
COMPILING ON WIN32
VC7 / Visual C++ 2003 project files are provided: code/quake3.sln q3radiant/Radiant.sln
To compile the qvms, you need to run some batch files: you will need to have lcc.exe q3cpp.exe q3rcc.exe and q3asm.exe in your path ( some precompiled binaries are provided in lcc/bin and code/win32/mod-sdk-setup/bin ) the qvm batch files are in code/game code/cgame code/q3_ui code/ui ..
COMPILING ON GNU/LINUX
the build system using cons, which may be known as scons's perl ancestor now you don't have to track it down though, the build script is provided in the tree you will need nasm and gcc 2.95 make sure you have the X Direct Graphics Access and X Video Mode extensions headers for your X11 a typical compile command goes like this: [..]/code$ ./unix/cons -- gcc=gcc-2.95 g++=g++-2.95
COMPILING ON MAC
project file for OSX compile is in code/macosx/Quake3.pbproj
Top Related Projects
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot