Why do all Valve games have the 'hl2.exe' process? [closed]
Solution 1:
Source Engine games (all those you've mentioned) are really closer to what you'd usually call a ("total conversion") mod. You're never running the game - you're running the engine, telling it to select a given mod (note how the games are run like hl2.exe -game cstrike
, for example).
The exe file is just a bootstrap that prepares the engine, and loads the actual mod (like Half-Life 2 or Counter Strike: Source), which in itself is a bunch of data and DLLs. It could have just as easily been called e.g. source.exe
. The main point, however, is that you never actually build your game by changing the hl2.exe
file; that's the same for all games on the same version of the Source engine. You're only changing other DLLs and the data files - and the dll itself usually is called something like cstrike.dll
, not hl2.dll
.
If you want a flawed analogy, ponder this: why is Chrome's executable called chrome.exe
, when you're actually browsing Facebook? You're running the Facebook application, aren't you? :)
And if you want a bit more history, this has been the convention carried over from the original Half-Life. The engine Half-Life 1 used was actually a heavily modified Quake engine, and the game was a mod on top of that modified engine; when the (very popular) mods like Team Fortress and Counter Strike came, they were likewise mods on the Half-Life 1 engine; but not the half-life game, really (pretty much entirely true for CS, while mods like Blue Shift reused a lot of the assets and code of HL1). And just like Half-Life 1 is a mod running on the Half-Life 1 engine (retroactively dubbed GoldSrc), Half-Life 2 is just a mod running on the Half-Life 2 engine (Source).
Solution 2:
Because all/most of their games are build on the Source Engine. The Source Engine was originally made for Half-Life 2. Which started the trend of hl2.exe.
So in short: Games made in the Source engine have their executable named hl2.exe
Solution 3:
Like all the other answers, this is just going to be a guess, but this one is backed up by actual history.
It's because of how Steam packages files.
Valve's games made prior to Left 4 Dead all include the Half-Life 2 Shared Files.
One of my old answers breaks down how the GCF files were laid out for TF2 specifically.
There are 2,722.83MB taken up by shared files, including the multiplayer ob binaries.gcf
file, which would include the version of hl2.exe
used by all of Valve's older multiplayer titles.
Note that there was likely also a single player binaries gcf file used by HL2, both of its episodes, and Portal 1.
These GCF files were shared between games.
In 2013, Valve switched over to the VPK system. This renders most of what is listed here as moot as the HL2 "Shared Files" are now distributed as part of the game itself. Valve likely keeps the executable with the old name out of laziness.
Incidentally, in games from 2008 or later, you will likely see the executable named some variation of the game name since they didn't use the shared files.
Solution 4:
All those games (Portal, TF, CounterStrike, They Hunger and so on) started long ago as mods for half-life and half-life 2. I guess the name of executable was simply kept from those days because developers got used to it.