dhewm / dhewm3

dhewm 3 main repository
https://dhewm3.org/
GNU General Public License v3.0
1.81k stars 351 forks source link

base.dll -vs- game.dll #183

Closed PLG closed 6 years ago

PLG commented 6 years ago

Is there a particular reason you went with building one of the DLLs as being called "base.dll" instead of "game.dll"?

Having the DLL called base means it doesn't coincide with the code. The most obvious example being the folder for the game sources is called "game", not "base". Another example being that the original Doom3 resources include a game.dll and so it is possible to have game.dll and base.dll next to each other. The name change also makes it confusing when editing the CMake files, because you are grepping for the wrong keyword without knowing it.

hemebond commented 6 years ago

The default "mod" for Doom 3 is "base". Dhewm3 uses a different method of loading mods. Instead of loading gamex86.so from the mod directory, each mod is loaded via "modname.so" in the root directory.

Kalamatee commented 6 years ago

On Sun, 11 Feb 2018 at 02:31, hemebond notifications@github.com wrote:

The default "mod" for Doom 3 is "base". Dhewm3 uses a different method of loading mods. Instead of loading gamex86.so from the mod directory, each mod is loaded via "modname.so" in the root directory

I would imagine it’s so you can use the dhewm build or original files from the same directories .. but I may be wrong

DanielGibson commented 6 years ago

I would imagine it’s so you can use the dhewm build or original files from the same directories .. but I may be wrong

This is correct. The DLLs are incompatible with the old ones anyway, and the new naming scheme makes it easier to separate binaries (executables+DLLs) from the game data. This also allows using the same game data with multiple Doom3 source ports, like the original Doom3, dhewm3 and fhDOOM (though fhDOOM uses another approach, there apparently the game DLLs are still in the mod dirs, but are called fhGame-x86.dll instead of gamex86.dll).

But the primary reason is that developers can test without copying anything around: You can just build the game and in the build directory call ./dhewm3 +set fs_basedir /path/to/game/data and it starts the game, without copying the executable or DLLs to the gamedata dir, or copying the game data into the build dir.

I'm not sure why id Software called the source directory game/ instead of base/ - I guess they called it game because it was the game code, and later they needed a name for the source directory of the addon and they just called it d3xp/ because that's easy to remember.

You'll get used to it :-P