Skip to content

Commit 9a45676

Browse files
Merge branch 'master' into swf-as3-support
2 parents 4fa3f74 + a9c8a27 commit 9a45676

File tree

5 files changed

+99
-80
lines changed

5 files changed

+99
-80
lines changed

README.md

Lines changed: 61 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This file contains the following sections:
3333
9. [Compiling on Windows](#compile_windows)
3434
10. [Compiling on Linux](#compile_linux)
3535
11. [Compiling on macOS](#compile_macos)
36-
12. [Installation, Getting the Game Data, Running the Game](#installation)
36+
12. [Installation](#installation)
3737
13. [New Console Variables](#console)
3838
14. [Known Issues](#issues)
3939
15. [Bug Reports](#reports)
@@ -85,14 +85,19 @@ RBDOOM-3-BFG allows mod editing and has many tiny fixes so custom content can be
8585
* New PBR related material keywords like basecolormap, normalmap, rmaomap
8686
* invertGreen( normalmap.png ) material keyword to allow flipping the Y-Axis for tangent space normal maps
8787
* glTF2 .glb model support for static and skinned models (thanks to Harrie van Ginneken)
88+
* Added back dmap and aas compilers as `standalone rbdmap.exe` tool (thanks to Pat Raynor) and improved them to work with TrenchBroom and Blender
8889
* Changed dmap to support compiling maps straight from glTF2 .glb models instead of .map files using a new polygon based workflow
8990
* Wavefront OBJ model support to make it easier getting static models from Blender/Maya/3D Studio Max into TrenchBroom
90-
* Added back dmap and aas compilers (mapping tools, thanks to Pat Raynor) and improved them to work with TrenchBroom and Blender
9191
* Added in-engine Flash debugging tools and new console variables
9292
* Added support for Mikkelsen tangent space standard for new assets (thanks to Stephen Pridham)
9393
* Bumped the static vertex cache limit of 31 MB to roughly ~ 128 MB to help with some custom models and maps by the Doom 3 community
9494
* com_showFPS bigger than 1 uses ImGui to show more detailed renderer stats like the original console prints with r_speeds
95-
* Native C++ AI & Weapons framework instead of Doomscript in the IcedHellfire mod by Justin Marshall (mods/icedhellfire branch)
95+
* .png .exr .hdr image support
96+
* .ogg sound file support
97+
* .pk4 archive support
98+
* Reworked virtual filesystem so .resources and .pk4 archives in mod directories have a higher priority than in base/
99+
* Native C++ AI & Weapons framework instead of Doomscript in the IcedHellfire mod by Justin Marshall (`mods/icedhellfire` Git branch)
100+
96101

97102
If you want to start mod from a directory, you should first specify your mod directory adding the following command to the launcher:
98103

@@ -115,7 +120,7 @@ Short term goals:
115120

116121
---
117122
# May or may not ".plan" <a name="plan2"></a>
118-
* Replace expensive multipass forward shading with a faster forward+ solution
123+
* Replace traditional multipass forward shading with a faster forward+ solution
119124
* [Volumetric Lighting](http://www.alexandre-pestana.com/volumetric-lights/)
120125
* ReSTIR or some other realtime path tracing
121126
* Optional alternative collision detection and physics with PhysX 5 or Jolt
@@ -407,7 +412,7 @@ See LICENSE_EXCEPTIONS.md for all parts of the code that are not covered by the
407412

408413
This project's GitHub.net Git repository can be checked out through Git with the following instruction set:
409414

410-
> git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git
415+
> git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode
411416

412417
Existing repositories can be updated manually:
413418

@@ -426,11 +431,11 @@ Existing repositories can be updated manually:
426431
3. Download and install the latest Vulkan SDK from LunarG: https://www.lunarg.com/vulkan-sdk/
427432
You can skip this step if you compile with DX12 only by adding -DUSE_VULKAN=OFF to the CMake options.
428433

429-
4. Generate the VS2022 projects using CMake by doubleclicking a matching configuration .bat file in the neo/ folder.
434+
4. Generate the VS2022 projects using CMake by doubleclicking a matching configuration .bat file in the `DoomCode/neo/` folder.
430435
Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
431436

432437
5. Use the VS2022 solution to compile what you need:
433-
RBDOOM-3-BFG/build/RBDoom3BFG.sln
438+
`DoomCode/build/RBDoom3BFG.sln`
434439

435440

436441
## Optional if you want to use FFmpeg
@@ -441,25 +446,23 @@ Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
441446

442447

443448
---
444-
# Compiling on Linux <a name="compile_linux"></a>
445-
446-
1. Go to https://github.com/microsoft/DirectXShaderCompiler and download the DXC binaries for Linux and put them into your local PATH.
447-
E.g. Unpack dxc-artifacts.tar.gz to your home directory and add this to your ~/.profile
449+
# Compiling on and Running on Linux <a name="compile_linux"></a>
448450

449-
> # DXC compiler
450-
> PATH="~/dxc-artifacts/bin:$PATH"
451+
1. Go to https://github.com/microsoft/DirectXShaderCompiler/releases/tag/v1.8.2405 and download the DXC binaries for Linux and put them into your local PATH.
452+
453+
E.g. Unpack linux_dxc_2024_05_24.x86_64.tar.gz to `~/.local` and make `~/.local/bin/dxc` as executable with chmod +x
451454

452-
As an alternative to modifying your PATH, you can add -DDXC\_CUSTOM_PATH=\<path-to-dxc-binary> to the CMake options.
455+
As an alternative you can add `-DDXC_CUSTOM_PATH=<path-to-dxc-binary>` to the CMake options.
453456

454457
2. You need the following dependencies in order to compile RBDoom3BFG with all features:
455458

456459
On Debian or Ubuntu:
457460

458-
> apt-get install cmake libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev
461+
> apt-get install cmake libsdl2-dev libopenal-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libvulkan-dev libncurses-dev
459462

460463
On Fedora
461464
462-
> yum install cmake SDL-devel openal-devel ffmpeg-devel
465+
> yum install cmake SDL-devel openal-devel ffmpeg-devel ncurses-devel
463466

464467
On ArchLinux
465468

@@ -471,15 +474,30 @@ Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
471474

472475
You don't need FFmpeg to be installed. You can turn it off by adding -DFFMPEG=OFF and -DBINKDEC=ON to the CMake options. It is enabled by default because the bundled libbinkdec is slow during development if compiled for Debug mode.
473476

474-
3. Generate the Makefiles using CMake:
477+
3. Checkout the source code into a new `DoomCode` directory
475478

476-
> cd neo/
479+
> git clone --recursive https://github.com/RobertBeckebans/RBDOOM-3-BFG.git DoomCode
480+
481+
4. Generate the Makefiles using CMake:
482+
483+
> cd DoomCode/neo/
477484
> ./cmake-linux-release.sh
478485

479-
4. Compile RBDOOM-3-BFG targets with
486+
5. Compile the engine and tools in `DoomCode/build/` with
480487

481-
> cd ../build
482-
> make
488+
> make -j<number of your cores>
489+
490+
6. Copy the base folder of your `Steam/steamapps/common/DOOM 3 BFG Edition/base/` over to `DoomCode/base/` See also [Installation](#installation)
491+
492+
7. [`OPTIONAL`] Download https://www.moddb.com/mods/rbdoom-3-bfg/downloads/rbdoom-3-bfg-130 and unpack it over your `DoomCode/` folder and then run in `DoomCode/`
493+
494+
> git checkout .
495+
496+
With this the local git files are newer for the files that have the same names.
497+
498+
8. Copy `DoomCode/build/RBDoom3BFG` to `DoomCode/`
499+
500+
9. Start the game in `DoomCode/`
483501

484502
---
485503
# Compiling on macOS <a name="compile_macos"></a>
@@ -521,35 +539,37 @@ Recommended in this case is `cmake-vs2022-win64-no-ffmpeg.bat`
521539
> cd ../build
522540
> make
523541

524-
For Xcode builds double click on RBDOOM-3-BFG/xcode-\<buildtype\>/RBDoom3BFG.xcodeproj and start the build. The generated Xcode project file is pre-configured with the correct targets and build settings.
542+
For Xcode builds double click on `DoomCode/xcode-\<buildtype\>/RBDoom3BFG.xcodeproj` and start the build. The generated Xcode project file is pre-configured with the correct targets and build settings.
525543

526544
---
527-
# Installation, Getting the Game Data, Running the Game <a name="installation"></a>
545+
# Installation <a name="installation"></a>
528546

529547
## For 99% of all users:
530548

531-
1. Download the newest version from the [RBDOOM-3-BFG Mod DB Page](https://www.moddb.com/mods/rbdoom-3-bfg)
549+
1. Download the newest version from the [RBDOOM-3-BFG ModDB Page](https://www.moddb.com/mods/rbdoom-3-bfg)
532550

533551
<a href="https://www.moddb.com/mods/rbdoom-3-bfg" title="View RBDOOM-3-BFG on Mod DB" target="_blank"><img src="https://button.moddb.com/popularity/medium/mods/49231.png" alt="RBDOOM-3-BFG" /></a>
534552

535-
2. There are usually 2 kinds of RBDOOM-3-BFG packages. The Full and the Lite version.
553+
There are usually 2 kinds of RBDOOM-3-BFG packages. The Full and the Lite version.
536554
With the Full version you have the Win64 binaries, the baked environment probes and lightgrid data for all BFG single player maps like RBDOOM-3-BFG-1.3.0.42-`full`-win64-20211030-git-b4e0366.7z (6.18 GB download).
537-
The Lite version has the `lite` in the filename like RBDOOM-3-BFG-1.3.0.42-lite-win64-20211030-git-b4e0366.7z.
555+
556+
The Lite version has the `lite` in the filename like RBDOOM-3-BFG-1.5.1.2-lite-win64-20230523-git-39ae120.7z.
538557
Those packages don't ship with the precomputed light data but have everything else needed to run the mod and the tools like the custom TrenchBroom build.
539558

540-
3. Simply extract both packages over your
541-
`C:\Program Files (x86)\Steam\SteamApps\common\Doom 3 BFG Edition\` directory and run RBDoom3BFG.exe.
559+
2. Make a new `DoomBFG` folder
560+
561+
3. Copy `base/` from your Steam Doom 3 BFG folder into `DoomBFG`
562+
563+
4. Download the RBDOOM-3-BFG 1.3.0 full package from the RBDOOM-3-BFG ModDB page and extract it over `DoomBFG`
564+
565+
5. Do the same with the newest version version which acts like a patch
542566

543567
This should also work fine with your GOG installation.
544568

545569
---
546570
## The following instructions are primarily intented for `Linux` users and all hackers on other operating systems.
547571

548-
To play the game, you need the game data from a legal copy of the game.
549-
550-
Currently this requires a Windows installer, whether that be the GOG installer or by using Steam for Windows.
551-
552-
Note: the original DVD release of Doom 3 BFG contains encrypted data that is decoded by Steam on install.
572+
Linux users are advised the compile the engine from the Github source code and to put the `base/` data from the retail game into the `DoomCode/base/` directory.
553573

554574
On Linux and macOS the easiest way to install is with SteamCMD: https://developer.valvesoftware.com/wiki/SteamCMD.
555575
See the description on https://developer.valvesoftware.com/wiki/SteamCMD#Linux (macOS is directly below that) on how to install SteamCMD on your system. You won't have to create a new user.
@@ -572,9 +592,9 @@ Once Wine is installed and configured on your system install Doom 3 BFG edition
572592

573593
(there will be several .exe files from GOG, make sure all of them are in the same directory)
574594

575-
Once this is complete, by default you can find your Doom 3 BFG "base/" directory at ".wine/drive_c/GOG\ Games/DOOM\ 3\ BFG/base".
595+
Once this is complete, by default you can find your Doom 3 BFG `base/` directory at `.wine/drive_c/GOG\ Games/DOOM\ 3\ BFG/base`.
576596

577-
Note that you may want to create a autoexec.cfg file in whatever "base/" directory you use with the following content:
597+
Note that you may want to create a autoexec.cfg file in the `DoomCode/base/` directory with the following content:
578598

579599
* set sys_lang "english"
580600

@@ -587,48 +607,15 @@ This will ensure the game and its menus are in english and don't default to some
587607
* set sys_lang "japanese"
588608
* set sys_lang "spanish"
589609

590-
Anyway:
591-
592-
1. Install Doom 3 BFG in Steam (Windows version) or SteamCMD, make sure it's getting
593-
updated/patched.
594-
595-
2. Create your own Doom 3 BFG directory, e.g. /path/to/Doom3BFG/
596-
597-
3. Copy the game-data's base dir from Steam or GOG to that directory
598-
(e.g. /path/to/Doom3BFG/), it's in
599-
/your/path/to/Steam/steamapps/common/DOOM 3 BFG Edition/base/
600-
or, if you used SteamCMD or GOG installer with Wine, in the path you used above.
601-
602-
4. Copy your RBDoom3BFG executable and the optional FFmpeg DLLs (if Windows FFmpeg enabled) to your own
603-
Doom 3 BFG directory (/path/to/Doom3BFG). Your Doom 3 BFG directory now should look like:
604-
605-
/path/to/Doom3BFG/
606-
* RBDoom3BFG (or RBDoom3BFG.exe on Windows)
607-
* avcodec-58.dll (Windows FFmpeg only)
608-
* avformat-58.dll (Windows FFmpeg only)
609-
* avutil-56.dll (Windows FFmpeg only)
610-
* swresample-3.dll (Windows FFmpeg only)
611-
* swscale-5.dll (Windows FFmpeg only)
612-
* base/
613-
* classicmusic/
614-
* _common.crc
615-
* (etc)
616-
617-
5. On macOS the RBDoom3BFG executable will also search for game data within an app bundle's Contents/Resources/base folder, and as a last resort, within the absolute path /Applications/RBDoom3BFG.app/Contents/Resources/base. In addition, if you want the game to be standalone without dependencies on pre-installed dynamic libs, you can use macdylibbundler to bundle all external dylib dependencies into the app bundle (see https://github.com/auriamg/macdylibbundler or simply install via "brew install dylibbundler" or "sudo port install dylibbundler"). For example, the following command will copy all external dylib dependencies to the Contents/libs directory of the game's app bundle and adjust the rpaths within the RBDoom3BFG executable and copied dylibs.
618-
619-
> dylibbundler -od -b -x RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG -d RBDoom3BFG.app/Contents/libs/
620-
621-
After running dylibbundler you may need to re-sign the modified executable and dylibs if planning to run on **Apple Silicon** machines. Newer versions of dylibbundler now do this automatically. The output of dylibbundler will indicate which executable and dylibs (if any) require re-signing. This code signing step is not needed for x86-based Macs.
622-
623-
> codesign -s - --force RBDoom3BFG.app/Contents/libs/lib<modified-by-dylibbundler>.dylib
624-
...
625-
> codesign -s - --force RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG
610+
On macOS the RBDoom3BFG executable will also search for game data within an app bundle's Contents/Resources/base folder, and as a last resort, within the absolute path /Applications/RBDoom3BFG.app/Contents/Resources/base. In addition, if you want the game to be standalone without dependencies on pre-installed dynamic libs, you can use macdylibbundler to bundle all external dylib dependencies into the app bundle (see https://github.com/auriamg/macdylibbundler or simply install via "brew install dylibbundler" or "sudo port install dylibbundler"). For example, the following command will copy all external dylib dependencies to the Contents/libs directory of the game's app bundle and adjust the rpaths within the RBDoom3BFG executable and copied dylibs.
626611

627-
6. Run the game by executing the RBDoom3BFG executable.
612+
> dylibbundler -od -b -x RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG -d RBDoom3BFG.app/Contents/libs/
628613

629-
7. Enjoy
614+
After running dylibbundler you may need to re-sign the modified executable and dylibs if planning to run on **Apple Silicon** machines. Newer versions of dylibbundler now do this automatically. The output of dylibbundler will indicate which executable and dylibs (if any) require re-signing. This code signing step is not needed for x86-based Macs.
630615

631-
8. If you run into bugs, please report them, see [Bug Reports](#reports)
616+
> codesign -s - --force RBDoom3BFG.app/Contents/libs/lib<modified-by-dylibbundler>.dylib
617+
...
618+
> codesign -s - --force RBDoom3BFG.app/Contents/MacOS/RBDoom3BFG
632619

633620
---
634621
# New Console Variables and Commands <a name="console"></a>

RELEASE-NOTES.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,29 @@ TBD - RBDOOM-3-BFG 1.6.0
1919
_______________________________
2020

2121

22+
## .plan - July 11, 2024
23+
24+
This update fixes a critical issue where the loading screen inadvertently caused textures to load recursively. This fix ensures a smoother, more efficient experience by optimizing texture management and significantly reducing redundancy in video memory on low VRAM graphics cards.
25+
26+
Changelog:
27+
28+
* Updated README to reflect some of the newer changes
29+
30+
* Allow skipping intro videos with Escape or Xbox controller Menu button
31+
32+
* Fixed VRAM memory leak when reloading maps
33+
34+
* Added cvar binaryLoadGuis so mods can override .gui files
35+
36+
* Extended listCvars with -new option to show all RBDoom related cvars
37+
38+
* Added new loading screen progressbar when loading textures
39+
40+
* Fixed a couple of bugs regarding Flash JSON reimport
41+
42+
* Show binarization indicator for 2D packed mipchain EXR files
43+
44+
2245
## .plan - June 28, 2024
2346

2447
This build brings back .pk4 support and the classic flash light through a gameplay option.

neo/renderer/Cinematic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you have questions concerning this license or the applicable additional terms
3838

3939

4040
// SRS - Add cvar to control whether cinematic audio is played: default is ON
41-
idCVar s_playCinematicAudio( "s_playCinematicAudio", "1", CVAR_BOOL, "Play audio if available in cinematic video files" );
41+
idCVar s_playCinematicAudio( "s_playCinematicAudio", "1", CVAR_BOOL | CVAR_NEW, "Play audio if available in cinematic video files" );
4242

4343
// DG: get rid of libjpeg; as far as I can tell no roqs that actually use it exist
4444
//#define ID_USE_LIBJPEG 1

neo/renderer/ModelManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ If you have questions concerning this license or the applicable additional terms
4242

4343
extern idCVar r_vkUploadBufferSizeMB;
4444

45-
idCVar binaryLoadRenderModels( "binaryLoadRenderModels", "1", 0, "enable binary load/write of render models" );
45+
idCVar binaryLoadRenderModels( "binaryLoadRenderModels", "1", CVAR_NEW, "enable binary load/write of render models" );
4646
idCVar preload_MapModels( "preload_MapModels", "1", CVAR_SYSTEM | CVAR_BOOL, "preload models during begin or end levelload" );
4747

4848
// RB begin
49-
idCVar postLoadExportModels( "postLoadExportModels", "0", CVAR_BOOL | CVAR_RENDERER, "export models after loading to OBJ model format" );
49+
idCVar postLoadExportModels( "postLoadExportModels", "0", CVAR_BOOL | CVAR_RENDERER | CVAR_NEW, "export models after loading to OBJ model format" );
5050
// RB end
5151

5252
class idRenderModelManagerLocal : public idRenderModelManager

neo/ui/UserInterface.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ idUserInterfaceManager* uiManager = &uiManagerLocal;
4444
idDeviceContext* dc;
4545

4646
idCVar g_useNewGuiCode( "g_useNewGuiCode", "1", CVAR_GAME | CVAR_INTEGER, "use optimized device context code, 2 = toggle on/off every frame" );
47+
idCVar binaryLoadGuis( "binaryLoadGuis", "1", CVAR_NEW, "enable binary load/write of particle decls" );
4748

4849
extern idCVar sys_lang;
4950

@@ -123,6 +124,12 @@ void idUserInterfaceManagerLocal::SetSize( float width, float height )
123124

124125
void idUserInterfaceManagerLocal::Preload( const char* mapName )
125126
{
127+
// RB: allow skipping binary preloading so modders can add new .gui files
128+
if( !binaryLoadGuis.GetBool() )
129+
{
130+
return;
131+
}
132+
126133
if( mapName != NULL && mapName[ 0 ] != '\0' )
127134
{
128135
mapParser.LoadFromFile( va( "generated/guis/%s.bgui", mapName ) );
@@ -374,7 +381,6 @@ bool idUserInterfaceLocal::IsInteractive() const
374381

375382
bool idUserInterfaceLocal::InitFromFile( const char* qpath, bool rebuild, bool cache )
376383
{
377-
378384
if( !( qpath && *qpath ) )
379385
{
380386
// FIXME: Memory leak!!
@@ -417,7 +423,7 @@ bool idUserInterfaceLocal::InitFromFile( const char* qpath, bool rebuild, bool c
417423
state.Set( "text", "Test Text!" );
418424

419425
idTokenParser& bsrc = uiManagerLocal.GetBinaryParser();
420-
if( !bsrc.IsLoaded() || !bsrc.StartParsing( source ) )
426+
if( !bsrc.IsLoaded() || !bsrc.StartParsing( source ) || !binaryLoadGuis.GetBool() )
421427
{
422428
idParser src( LEXFL_NOFATALERRORS | LEXFL_NOSTRINGCONCAT | LEXFL_ALLOWMULTICHARLITERALS | LEXFL_ALLOWBACKSLASHSTRINGCONCAT );
423429
src.LoadFile( source );
@@ -470,18 +476,21 @@ bool idUserInterfaceLocal::InitFromFile( const char* qpath, bool rebuild, bool c
470476
desktop->SetupFromState();
471477

472478
}
479+
473480
interactive = desktop->Interactive();
481+
474482
if( uiManagerLocal.guis.Find( this ) == NULL )
475483
{
476484
uiManagerLocal.guis.Append( this );
477485
}
486+
478487
loading = false;
488+
479489
return true;
480490
}
481491

482492
const char* idUserInterfaceLocal::HandleEvent( const sysEvent_t* event, int _time, bool* updateVisuals )
483493
{
484-
485494
time = _time;
486495

487496
if( bindHandler && event->evType == SE_KEY && event->evValue2 == 1 )

0 commit comments

Comments
 (0)