File Management

From Valve Developer Community
Revision as of 07:01, 21 August 2025 by SomeoneTookSeven (talk | contribs) (first draft of information)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Files in Visual Studio Visual Studio are managed in solutions. These solutions contain the path to each file the project uses meaning often times they will not align with their locations on the actual disk. Modifying the files included in a solution change which files are compiled.

Solutions have different filters commonly being: External Dependencies, Header Files, Link Libraries, Source Files, and VPC Scripts. Each one of these filters contributes to telling the compiler what to include in the solutions project.

There are two main filters you will work with, Header Files, and Source Files, as these will contain the logic needed to modify the game logic. Header Files are simple, they are like a blueprint for the actual logic. Header files will contain definitions and other includes that exist for the cpp files where its included to work properly. To help understand why its done there are two big examples, firstly is about ordering of compilation, if given a header that includes other header, the compiler knows that those headers and files that include those headers need to be compiled first so our original file has everything it needs to compile.

Secondly is the ability to interact and use code that we may not have the source code for. As you know the SDK does not contain the entire engine, by some of our code in the sdk still needs to work with that code in order to function. So instead of releasing the logic for their protected code, valve releases the header files, this means we can include those headers, giving us access to use that code without us having access to the logic behind them.