How videogamepreservation/dukenukem3d works
Main Components
• Game Engine & Core Logic:
• Represented by source code in directories like SRC and source. Files such as ENGINE.C/ENGINE.OBJ, GAME.C, and other support files (e.g., BUILD.H, PRAGMAS.H) illustrate the core game loop, physics, and overall game logic.
• Also, files in extras and kenbuild_data hint at legacy or experimental features that relate to the main engine.
• Build Engine:
• The Duke 3D game is built upon Ken Silverman’s Build Engine. Although some of the build engine code is integrated into the source (via .OBJ and .H files) and partially provided in its own separate archive (e.g., BUILD.TXT, BUILDINF.TXT), it is a distinct module. Make sure to show the interaction between the game logic and the Build Engine that handles rendering, geometry, and level design.
• Audio Library:
• The entire audiolib directory is dedicated to the sound system. It contains subdirectories for source code (SOURCING the audio routines), precompiled objects, libraries (LIB & OBJ), and even utility batch files. This module is responsible for sound effects, music, and even networking considerations related to audio.
• Utility Tools & Extras:
• The UTIL folder includes source code for map conversion, asset extraction, and configuration setup. The extras folder and kenbuild_data include older versions or experimental code that might serve educational or optional purposes.
• Test Data & External Assets:
• The testdata directory stores configuration and demo files used to test the game.
• The release also includes documentation (READMEs, GNU.TXT) and build scripts (MAKEFILEs). These elements, while not “runtime” components, are important for the build and deployment pipelines.
Relationships and Interactions
• Utility modules (from UTIL and extras) are often used during development or for level and asset processing. Therefore, these can be depicted as standalone tools or helper services that feed processed data (e.g., maps and art assets) into the Game Engine.
• The configuration and compiling infrastructure (the Makefiles and build scripts) should be noted as supporting processes that bind together the various modules into the final executable (DUKE3D.EXE).
Architectural Patterns/Design Principles
• Build and Deployment Pipeline: Show that the Makefiles compile the different modules and link them together. You might also note that the project uses external components (such as DOS/4GW and Watcom assemblies) which need to be bound during the distribution process.
Relevant Technologies, Frameworks, and Libraries
• Watcom C/C++ Compiler: The README details how the project is built using Watcom (or Open Watcom). This is an important part of the build chain.
• DOS/4GW Extender: Since Duke3D is a DOS game, the extender is critical. Even though its source isn’t included, it plays a part in running the final executable on modern systems.
• Assembly Files: Notice files like A.ASM, K.ASM, and various .ASM files in the Build Engine and audio modules. These indicate performance-critical routines that interact closely with hardware.
• Clearly labeled modules for:
• Game Core/Engine (from SRC and source folders)
• Build Engine (representation of rendering, level handling)
• Audio Library (complete audiolib breakdown)
• Utility/Extra Tools (UTIL, extras folders)
• External Dependencies (DOS/4GW, Make/Build Tools)
• Data and control flow from the Game Engine → Build Engine (rendering calls)
• Event-driven calls from the Game Engine → Audio Library (sound events)
• Data asset pipelines from Utility Tools → Game Engine
• Build-time processes aggregating distributed components into DUKE3D.EXE
• Runtime execution modules (e.g., rectangles for game core, ovals for audio/graphics engines)
• Development/build modules (e.g., hexagons or clouds for utilities and external tools)
• Labels for:
• Source code directories that are tied to specific behaviors (e.g., game input from keyboards, network handling, etc.)