Difference between revisions of "Source SDK 2013"
(Added a note about Git clients)
|Line 1:||Line 1:|
To get started, sync the source code from [https://github.com/ValveSoftware/source-sdk-2013 GitHub]. Then follow the instructions for your platform of choice.
To get started, sync the source code from [https://github.com/ValveSoftware/source-sdk-2013 GitHub].
Then follow the instructions for your platform of choice.
Revision as of 19:08, 26 June 2013
Then follow the instructions below for your platform of choice.
The Source SDK is split into two directories at the root: sp (singleplayer) and mp (multiplayer). Single player has the source for Half-Life 2 and the Half-Life 2 Episodes, which are called "episodic" in the source code. Multi-player has the source for Half-Life 2: Deathmatch, which is called "hl2mp" in the source code. Under each of these directories is a very similar directory structure:
- game - Runtime files for the mods themselves. Your mod content will go in here.
- src - All the source code for that kind of mod. The root of the src directory contains .sln or root level .mak files for building the source.
- common - A few files used by the server and client DLLs
- devtools - Scripts and utilities that are used to build the source. These are called by the makefiles and projects and you probably won't need to interact with them directly.
- game - All of the source code for the DLLs.
- client - Code used by client.dll (or client.dylib or client.so). There are also game-specific directories under here.
- server - Code used by server.dll. There are also game-specific directories under here.
- shared - Code used by both client.dll and server.dll.
- gcsdk - A couple of tools used to build the DLLs.
- lib - Binary versions of the libraries that the source code depends on. This is also the build target for vgui_controls, tier1, and mathlib.
- mathlib - Math utilities used by the game.
- public - Header files for all of the DLLs and libraries that are used by the game. Also includes a few source files.
- thirdparty - Third party libraries needed to build the source. At the moment this contains only the Google Protobuf library.
- tier1 - Useful utility classes. Builds into tier1.lib
- utils - Various development utilities
- vgui2 - Source code for vgui_controls, which is used by client.dll.
We recommend that you follow the conventions here as you add files for your own mod.
If you are building a multi-player mod you should base yourself on the code in the 'mp' directory. If you are building a single player mod, use the 'sp' directory. Each directory has a matching Source SDK 2013 Base appID to use to get the base mod files:
- Source SDK Base 2013 Singleplayer – 243730
- Source SDK Base 2013 Multiplayer – 243750
These two base apps are very similar, differing mostly in update schedule. The Singleplayer base will only update with HL2 and the Episodes do, which isn't very often. The Multiplayer base will update a few times a year to incorporate engine changes from TF2 and Counter-Strike: Source. None of these updates should break mod compatibility.
To build the Source SDK 2013 on Windows you will need Microsoft Visual Studio 2010.
Open EverythingSP_SDK-2010.sln (or EverythingMP_SDK-2010.sln) and build it. Then open the Game_<game name>-2010.sln file for the game for which you are building a mod and build that. At this point you should have client.dll and server.dll to load with the Source Engine game you based the mod on.
To build Source SDK 2013 on OSX you will need XCode 4.2.
Run "make -f game_<gamename>_osx32.mak". At this point you should have client.dylib and server.dylib files to load with the Source SDK Base 2013 of your choice.
To build the Source SDK 2013 on Linux you will need the Steam runtime. Install it using these instructions:
- Download it here
- tar xvf steam-runtime-sdk_latest.tar.xz
- cd steam-runtime-sdk_<version> (replacing <version> with the version you just unpacked.)
- ./setup.sh (Pick your architecture and debug/release preferences and then answer Y to everything else.)
- ./shell.sh --arch=i386
Then run "make -f game_<gamename>_linux32.mak". At this point you should have client.so and server.so files to load with the Source SDK Base 2013 of your choice. More instructions on using the Steam runtime can be found in README.txt in the installed runtime directory.