When a game requires “Microsoft Visual C++ (year)” or “DirectX (number)” to be installed along with the game itself, what are those things and how does the game use them to work?

625 views

Often when installing a game through a digital storefront, after the game has downloaded and installed, but before rubbing for the first time, it will download various files titled “Visual c++ library 2008” etc, even if previous games have installed them. I suppose the main things I’m wondering are; What are these things, why do the games need them to work, and why aren’t they included in the files Steam/Epic/Uplay downloads when you install the game?

In: Technology

5 Answers

Anonymous 0 Comments

Libraries are pieces of code that can be used by developers across different applications, so they don’t have to do things that have already been done (like directly control the mouse, interface with the operating system, read files, draw on the screen). Developers choose what libraries they want to use, but there has also been a lot of standardization by the game engines on using the ones use referenced.

So the engines and games are designed to specifically use those libraries, and thus need them installed to run.

Anonymous 0 Comments

Back in the day before Windows, PC’s could (mostly) only run one thing at a time. Each program took up the entire screen, you wanted to switch, you had to stop one program and start the next. This was a serious limitation, but it was great for games. They could take over your whole computer, use every last resource, and run really fast.

Then Windows came along and let you run multiple programs at once. Instead of sending commands directly to the computer, programs would send them to Windows and it would sort things out. That was fine for a word processor, but for graphically intensive programs sending every pixel update to Windows instead of directly to the graphics card could be painfully slow and make games unplayable. Instead, you would exit Windows (you could do that back then) in order to play your game, then return when you were done. Kind of a pain in the ass.

DirectX was Window’s solution to this. It is a library to allows programs like games to have direct access to the graphics card once again. However, graphics cards are constantly changing and games are constantly finding better ways to coax a little extra performance out of them, so DirectX libraries were constantly being updated. To avoid incompatibility issues, games found it easier to just include a late enough version of DirectX with their install.

C++ is a programming language many Windows programs are written in, and Visual C++ is Microsoft’s implementation of it. They added a library of functions many programs use, particularly when it comes to user interface elements. Those programs need that library installed on any machine where they will be executed.

Steam and similar services keep DirectX and other shared libraries up to date independently of the programs you download from them.

Anonymous 0 Comments

Basically, to steal other people’s code.

Visual C++ Library 2008 is a code bundle that Microsoft provides for free. It does a bunch of stuff, like controlling the mouse, reading the keyboard, etc. Developers will hijack this so they don’t have to do in the thousands of hours of work that Microsoft has already done for them. This timesave is very popular, hence why you have to install those libraries.

Anonymous 0 Comments

These are code libraries that standardise a lot of generic things for other programmers to use so they can save time and effort not having to do it themselves.

Specifically, C++ Redistributable is a collection of things for running windows applications and doing some more generic things in them. DirectX is graphics library, it has components used for drawing graphics to the screen. Doing so quickly and efficiently isn’t an easy task, it’s very complicated, so it’s not within an average game developer’s skill range, so there are programmers who specialise in graphics to write these libraries so they don’t have to.

The reason applications often come with specific versions is because when something is added or changed in a library that a programmer wants to use they have to use a version that has it. Newer versions will have things the older ones don’t, and older versions might have things that have been changed in the current version and are out of date. So to make sure the user has the right version, they just bundle it in with application. That’s the ‘Redistributable’ part, companies are allowed to distribute them as part of their own applications

Anonymous 0 Comments

The pace of software development is so fast, and programmers are generally so productive, because they can share and reuse solutions to problems they’ve seen in the past. Any given problem only really needs to be solved once, and everybody after that can just reuse the same solution over and over again. A package of pre-solved problems is called a “library”. (On windows, these are generally, but not always, “.dll” files, which stands for “dynamic link library”).

When you write a program, you don’t have to start at the bottom and build everything yourself. You don’t have to write code to put graphics on the screen, or do physics calculations or other stuff like that, those problems are already solved. Instead, what you do is bring together a bunch of libraries with those things already done. You’ll start with a library of basic fundamental ideas (“Microsoft Visual C++ Runtime”, for example), and you’ll bring in a graphics/gaming library (“DirectX” for example) and a bunch of other things.

When you download a game or install it off a CD, the game will generally come with a lot of the libraries the game requires. However, some libraries are either so common that every system uses them, or otherwise are part of the operating system itself. This is the case for Microsoft Visual C++ Runtime and DirectX: They are so common and so platform-specific, that it’s expected that they already be installed or that they can be installed separately.

Sometimes a game will want to use the most recent version of these libraries to get, for example, better graphics capabilities if possible. Other times you’ll want to stick with a specific version because upgrading will cause a breakage. In either case, it’s usually easier for every individual game to just go out and download the versions they want without having to search around to see if a suitable version already exists.