Convert Figma logo to code with AI

id-Software logoDOOM-3-BFG

Doom 3 BFG Edition

4,889
1,358
4,889
2

Top Related Projects

3,080

Doom 3 GPL source release

1,777

dhewm 3 main repository

Doom 3 GPL source release

2,368

The ioquake3 community effort to continue supporting/developing id's Quake III Arena

Quick Overview

DOOM 3 BFG Edition is an enhanced version of the classic first-person shooter game DOOM 3, released by id Software. This GitHub repository contains the source code for the game, allowing developers to study, modify, and potentially create mods or custom versions of the game.

Pros

  • Open-source availability allows for community contributions and modifications
  • Provides insight into the architecture and design of a AAA game engine
  • Supports multiple platforms, including Windows, Linux, and macOS
  • Includes improvements and optimizations over the original DOOM 3 release

Cons

  • Large codebase may be challenging for newcomers to navigate
  • Requires the official game assets to run, which are not included in the repository
  • Some parts of the code may be outdated or not follow modern best practices
  • Limited documentation for setting up and building the project

Code Examples

// Example of rendering a model in the game engine
void idRenderModelManager::RenderModel( const renderEntity_t *renderEntity, const viewDef_t *viewDef, idRenderModel *model ) {
    // Set up model matrix
    idMat3 axis;
    axis = renderEntity->axis;
    idVec3 origin = renderEntity->origin;

    // Render the model
    model->DrawModel( viewDef, renderEntity, axis, origin );
}
// Example of handling player input
void idPlayer::HandleUserCmds( const usercmd_t *cmds, int numCmds ) {
    for ( int i = 0; i < numCmds; i++ ) {
        const usercmd_t *cmd = &cmds[i];
        if ( cmd->buttons & BUTTON_ATTACK ) {
            FireWeapon();
        }
        if ( cmd->forwardmove || cmd->rightmove ) {
            Move( cmd->forwardmove, cmd->rightmove );
        }
    }
}
// Example of AI behavior for enemies
void idAI::Think( void ) {
    // Update AI state
    UpdateEnemyPosition();
    
    // Choose action based on current state
    if ( IsEnemyVisible() ) {
        Attack();
    } else if ( LastKnownEnemyPos.Valid() ) {
        MoveToPosition( LastKnownEnemyPos );
    } else {
        Patrol();
    }
}

Getting Started

To build and run DOOM 3 BFG Edition from source:

  1. Clone the repository:
    git clone https://github.com/id-Software/DOOM-3-BFG.git
    
  2. Install necessary dependencies (varies by platform)
  3. Build the project using CMake:
    cd DOOM-3-BFG
    mkdir build && cd build
    cmake ..
    make
    
  4. Copy the game assets from an official DOOM 3 BFG Edition installation to the appropriate directory
  5. Run the game executable

Note: Detailed build instructions for specific platforms can be found in the repository's documentation.

Competitor Comparisons

3,080

Doom 3 GPL source release

Pros of DOOM-3

  • Original source code, providing a baseline for modding and study
  • More lightweight, potentially easier to run on older hardware
  • Closer to the original game experience

Cons of DOOM-3

  • Lacks modern graphical improvements and optimizations
  • Missing additional content and features from the BFG Edition
  • May have compatibility issues with newer systems

Code Comparison

DOOM-3:

void idRenderWorldLocal::AddEntityDefs( int numNewDefs, idRenderEntityLocal **newDefs ) {
    int i;

    for ( i = 0 ; i < numNewDefs ; i++ ) {
        AddEntityDef( newDefs[i]->index, newDefs[i] );
    }
}

DOOM-3-BFG:

void idRenderWorldLocal::AddEntityDefs( int numNewDefs, idRenderEntityLocal **newDefs ) {
    for ( int i = 0 ; i < numNewDefs ; i++ ) {
        AddEntityDef( newDefs[i]->index, newDefs[i] );
    }
}

The code comparison shows minor differences in syntax and style, with DOOM-3-BFG using a more modern C++ approach by declaring the loop variable inside the for loop. This reflects the overall trend of code modernization in the BFG Edition.

1,777

dhewm 3 main repository

Pros of dhewm3

  • Cross-platform support (Windows, Linux, macOS)
  • Active community development and maintenance
  • Improved compatibility with modern systems

Cons of dhewm3

  • Lacks some features present in the BFG edition
  • May require additional setup for certain mods

Code Comparison

DOOM-3-BFG:

void idRenderModelStatic::ParseModel( rvmListFile *src ) {
    src->ReadFloatString( &bounds[0][0], 6 );
    src->ReadInt( numJoints );
    src->ReadInt( numMeshes );
    // ... (additional parsing code)
}

dhewm3:

void idRenderModelStatic::ParseModel( idLexer &parser ) {
    parser.ReadFloatString( &bounds[0][0], 6 );
    parser.ReadInt( &numJoints );
    parser.ReadInt( &numMeshes );
    // ... (additional parsing code)
}

The code comparison shows slight differences in parsing methods between the two projects. DOOM-3-BFG uses a custom rvmListFile class for parsing, while dhewm3 utilizes the idLexer class. This reflects the different approaches to file handling and parsing in each project.

Doom 3 GPL source release

Pros of doom3.gpl

  • More active community and ongoing development
  • Better support for modern operating systems and hardware
  • Includes additional features and improvements not found in the official release

Cons of doom3.gpl

  • May lack some of the optimizations present in the BFG edition
  • Potentially less stable due to community-driven development
  • Might not include all content from the BFG edition

Code Comparison

doom3.gpl:

void idRenderWorldLocal::AddEntityDefs( int numNewDefs, idRenderEntityLocal **newDefs ) {
    for ( int i = 0 ; i < numNewDefs ; i++ ) {
        AddEntityDef( newDefs[i]->index, &newDefs[i]->parms );
    }
}

DOOM-3-BFG:

void idRenderWorldLocal::AddEntityRefs( int numNewRefs, idRenderEntityLocal **newRefs ) {
    for ( int i = 0 ; i < numNewRefs ; i++ ) {
        AddEntityRef( newRefs[i]->index, &newRefs[i]->parms );
    }
}

The code comparison shows minor differences in function and variable naming conventions between the two repositories, but the overall structure and functionality appear similar.

2,368

The ioquake3 community effort to continue supporting/developing id's Quake III Arena

Pros of ioq3

  • Open-source and actively maintained by the community
  • Supports multiple platforms including Windows, macOS, and Linux
  • Includes various improvements and bug fixes over the original Quake 3 engine

Cons of ioq3

  • Limited to Quake 3 Arena and its mods, not as versatile as DOOM 3 BFG
  • May require more technical knowledge to set up and configure

Code Comparison

DOOM 3 BFG (C++):

void idRenderModelStatic::ParseModel( idLexer &parser ) {
    idToken token;
    while ( parser.ReadToken( &token ) ) {
        if ( !token.Icmp( "mesh" ) ) {
            ParseMesh( parser );
        }
    }
}

ioq3 (C):

void R_LoadMD3( model_t *mod, void *buffer, const char *name ) {
    int i, j;
    md3Header_t *pinmodel;
    md3Frame_t *frame;
    md3Surface_t *surf;
    md3Shader_t *shader;
    md3Triangle_t *tri;
    md3St_t *st;
    md3XyzNormal_t *xyz;
    md3Tag_t *tag;
    int version;
    int size;
}

Both repositories focus on game engines, but DOOM 3 BFG is more modern and uses C++, while ioq3 is based on the older Quake 3 engine and primarily uses C. ioq3 is more community-driven and open, while DOOM 3 BFG is officially maintained by id Software.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Doom 3 BFG Edition GPL Source Code

This file contains the following sections:

GENERAL NOTES LICENSE

GENERAL NOTES

Game data and patching:

This source release does not contain any game data, the game data is still covered by the original EULA and must be obeyed as usual.

You must patch the game to the latest version.

Note that Doom 3 BFG Edition is available from the Steam store at http://store.steampowered.com/app/208200/

Compiling on win32:

A project file for Microsoft Visual Studio 2010 is provided in neo\doom3.sln We expect the solution file is compatible with the Express releases

You will need the Microsoft DirectX SDK installed as well. If it does not reside in "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" you will need to update the project files accordingly.

Steam:

The Doom 3 BFG Edition GPL Source Code release does not include functionality for integrating with Steam. This includes roaming profiles, achievements, leaderboards, matchmaking, the overlay, or any other Steam features.

Bink:

The Doom 3 BFG Edition GPL Source Code release does not include functionality for rendering Bink Videos.

Back End Rendering of Stencil Shadows:

The Doom 3 BFG Edition GPL Source Code release does not include functionality enabling rendering of stencil shadows via the "depth fail" method, a functionality commonly known as "Carmack's Reverse".

Other platforms, updated source code, security issues:

If you have obtained this source code several weeks after the time of release, it is likely that you can find modified and improved versions of the engine in various open source projects across the internet.

Depending what is your interest with the source code, those may be a better starting point.

LICENSE

See COPYING.txt for the GNU GENERAL PUBLIC LICENSE

ADDITIONAL TERMS: The Doom 3 BFG Edition GPL Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU GPL which accompanied the Doom 3 BFG Edition GPL Source Code. If not, please request a copy in writing from id Software at id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.

EXCLUDED CODE: The code described below and contained in the Doom 3 BFG Edition GPL Source Code release is not part of the Program covered by the GPL and is expressly excluded from its terms. You are solely responsible for obtaining from the copyright holder a license for such code and complying with the applicable license terms.

JPEG library

neo/renderer/jpeg-6/*

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.

zlib library

neo/framework/zlib/*

Copyright (C) 1995-2005 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:

  1. 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.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Base64 implementation

neo/idlib/Base64.cpp

Copyright (c) 1996 Lars Wirzenius. All rights reserved.

June 14 2003: TTimo ttimo@idsoftware.com modified + endian bug fixes http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=197039

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. 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.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.

IO for uncompress .zip files using zlib

neo/framework/Unzip.cpp neo/framework/Unzip.h

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:

  1. 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.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

MD4 Message-Digest Algorithm

neo/idlib/hashing/MD4.cpp 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 "RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing this software or this function.

License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm" in all material mentioning or referencing the derived work.

RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind.

These notices must be retained in any copies of any part of this documentation and/or software.

MD5 Message-Digest Algorithm

neo/idlib/hashing/MD5.cpp This code implements the MD5 message-digest algorithm. The algorithm is due to Ron Rivest. This code was written by Colin Plumb in 1993, no copyright is claimed. This code is in the public domain; do with it what you wish.

CRC32 Checksum

neo/idlib/hashing/CRC32.cpp Copyright (C) 1995-1998 Mark Adler

OpenGL headers

neo/renderer/OpenGL/glext.h neo/renderer/OpenGL/wglext.h

Copyright (c) 2007-2012 The Khronos Group Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Materials.

THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.

Timidity

doomclassic/timidity/*

Copyright (c) 1995 Tuukka Toivonen

From http://www.cgs.fi/~tt/discontinued.html :

If you'd like to continue hacking on TiMidity, feel free. I'm hereby extending the TiMidity license agreement: you can now select the most convenient license for your needs from (1) the GNU GPL, (2) the GNU LGPL, or (3) the Perl Artistic License.