Source SDK Game Development Essentials

4 (1 reviews total)
By Brett Bernier
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Getting Started with the Source SDK

About this book

The Source Authoring Tools are the pieces of software used to create custom content for games made with Valve’s Source engine. Creating mods and maps for your games without any programming knowledge can be time consuming. These tools allow you to create your own maps and levels without the need for any coding knowledge. All the tools that you need to start creating your own levels are built-in and ready to go!

This book will teach you how to use the Authoring Tools provided with Source games and will guide you in creating your first maps and mods (modifications) using Source. You will learn how to stay organized, map efficiently, and avoid the most common mapping mistakes.

This practical guide begins by setting you up with Source SDK and a 3D development environment. Through a series of guided tutorials, you will learn what it takes to create a professional, polished map or mod.

You will learn how to create varying types of worlds, from underground labs to flowing outdoor terrains. You will also learn how to bring life into your world with advanced texturing, lighting, and decorating techniques. Towards the end of the book, we will learn how to create goal-driven A.I. sequences and scripts to choreograph epic battles and take control of your enemies and allies.

The content has been developed using the illustrations from Half Life Episode 2

Publication date:
February 2014


Chapter 1. Getting Started with the Source SDK

The Source SDK is a collection of software used to create custom content for games made with Valve's Source engine. Also known as authoring tools, the Source SDK contains all the tools you need to start creating your own levels. In order to get started with the Source SDK, you first need to get a hold of Steam. Steam is Valve's entertainment platform that allows its users to download and play a multitude of different games.

In this chapter, we will cover the following topics:

  • Downloading and installing Steam

  • Gaining access to the SDK

  • Glancing at the tools

  • Creating your own modification (mod) with the Source SDK

So, let's get started!


Installing Steam

You might ask yourself what is Steam, and why do I need it? First and foremost, the only way to gain access to the Source SDK is by downloading the SDK or a Valve game that uses the Source engine. All of Valve's Source engine games are downloaded and managed with a program called Steam. Steam lets you purchase, organize, and update thousands of games, and it's completely free.

In order to download and install Steam, you need to visit, and click on the Install Steam button in the top-right corner of the web page, as shown in the following screenshot:

This will redirect you to another page where you can download the actual installation file. After you have downloaded and installed Steam, you need to log in or create a new user account if you do not already have one. All you need is a valid e-mail address in order to create a new Steam account.


Getting your tools

Great! You have installed Steam. Now what? There are a multitude of games that run on the Source engine. There are also many different versions of the Source engine: 2006, 2007, 2013, and multiplayer and single player variants for each. This book will focus on Half-Life 2: Episode Two (HL2: EP2) since it's the most recent single player build of the Source engine at the time of writing this book. In order to create content for HL2: EP2, you just need to own a copy of the game. Steam makes it easy to install games. So, if you haven't already, purchase and install HL2: EP2.


You don't need HL2: EP2 to follow this book. The principles taught cover the Source SDK tools, which are applicable to multiple games.

Instructions for installing Half-Life 2: Episode Two

Downloading and installing games with Steam is easy! Steam lets you securely purchase any game and will automatically install them once downloaded. The steps for installing Half-Life 2: Episode Two are as follows:

  1. Open Steam and log in.

  2. In Steam, just below the main toolbar, you will see STORE, LIBRARY, COMMUNITY, and your username in a large white font. Click on STORE.

  3. Search for Half-Life 2: Episode Two, purchase it, and install it.

  4. You can monitor the download progress within the Downloads tab in the LIBRARY drop-down menu. HL2: EP2 will begin to install automatically once the download is complete.

The STORE is located in the top-left corner of Steam as shown in the following screenshot:

Browse for Half-Life 2: Episode Two as shown in the following screenshot. You can also get any other Source game.

Once the download and install is complete, launch the game and play around with the engine you will be developing for, as shown in the following screenshot:


The Source SDK tools overview

All the SDK tools come with the game, so you don't need to install anything extra. (This also means you don't need to wait for something else to download!) The tools are located in the Steam\steamapps\common\Half-Life 2\bin folder. The folder is packed with applications, batch files, and DLLs, but there are a few key programs that we're interested in right now. In the bin folder, you will see Hammer, HLMV, and HLFacePoser. Hammer Editor is the tool you will most likely use; it is the application that you use to actually create the levels (maps). HLMV or Half-Life Model Viewer is a tool you can use to inspect game models in detail. HLFacePoser is used to sync lips to speech, and create custom scenes and NPC interactions.


At the time of writing this book, FacePoser is broken—this will not be covered.


The Source SDK

Half-Life 2: Episode Two ships with its own set of authoring tools, but if you want to make your own mod, you need the Source SDK. The Source SDK is a program that organizes all the authoring tools for specific mods and engine builds and has the ability to automatically create a mod based on the code from Half-Life 2: Episode Two. If you want to create your own mod, you will need to grab the Source SDK.

Installing the Source SDK

Installing the Source SDK is just as easy as any regular game. The best part is its price: free! The steps for installing the Source SDK are as follows:

  1. In the top-left corner of the games library, select the dropdown that says All Games and select Tools.

  2. Find the Source SDK in the list of Tools.

  3. Right-click on Source SDK and select Install game, or just double-click to begin the download process.

  4. You can monitor the download progress within the Downloads tab in the LIBRARY. The Source SDK will begin to install automatically once the download is complete.

The Source SDK overview

When you first launch the Source SDK, it will need a minute or so to copy files and complete the install, but once that is complete, you're ready to go! You will notice that the Source SDK contains a variety of tools, documents, and links. At the very bottom are two fields labeled Engine Version and Current Game. Engine Version is used to select which version of the Source engine you would like to develop for.

The later engine versions have more features and graphics upgrades compared to the earlier versions. There is also the Source Engine MP option, which lets you create maps for Valve's multiplayer games such as Counter-Strike: Source and Team Fortress 2.


In the APPLICATIONS list, you will see Hammer Editor, Model Viewer, Face Poser, and itemtest. Hey, doesn't this look like the set of authoring tools we had for HL2: EP2? It is, with the exception of itemtest that allows you to look into details about specific games items such as the items available in Team Fortress 2.


In the DOCUMENTATION list, you will see Release Notes and SDK Reference Docs. The Release Notes option will link you to the Valve Developer Community website that describes the changes made to the current version of the Source SDK. SDK Reference Docs will link you to the Valve Developer Community website's collection of notes about every aspect of the Source SDK.


In the UTILITIES list, you will see Create a Mod, Refresh SDK Content, Reset Game Configurations, and Edit Game Configurations. Create a Mod will open a wizard that allows you to create your own modification, or mod, for a certain Source game. Refresh SDK Content will refresh all the game content in the event that the Source SDK is not functioning properly. Reset Game Configurations will return all games to their default configurations. Edit Game Configurations will allow you to modify the path of any game you want.


In the LINKS list, you will see Valve Developer Community and Softimage|XSI Mod Tool. Valve Developer Community will link you to the main page of Valve Developer Community. Softimage|XSI Mod Tool will link you to an Autodesk website where you can download a free version of character modeling and animation software that is compatible with the Source engine.


Creating your own modification (mod)

So you have this amazing idea for a video game and want to create your own mod. You want to include lasers and Samurai, and you want to make a fast-paced, WWII-era, team-based shoot-em-up game called Samurai Laser Paratroopers. Well, guess what—the Source engine can do this, and the Source SDK makes the mod setup easy! In this example, we will be creating a multiplayer Mod for the 2007 Source engine from a template:

  1. To create your very own Half-Life 2 mod, double-click on the Create a Mod utility.

  2. Select the Start a Multiplayer mod from a Template radio button on the first prompt of the Create a Mod wizard and then click on Next.

  3. In the first entry, specify the drive directory location where you want your game to be stored. I chose C:\SLP\ for easy access. In the second entry, specify the name of the mod you want to create, and click on Next to continue.

  4. Choose the options you want available in your mod.

  5. The wizard will then copy all the necessary files into the directory you have specified.

The instructions are pretty straightforward. Choose carefully when you select the options shown in the following screenshot; they're harder to change later on:

Have patience, we're almost done!

Now, let's take a look at the folders the wizard has created. There are four folders in your new mod's folder (shown here as C:\SLP). Three of those folders have suffixes of "src" as shown in the following screenshot:

The mapsrc folder is where all your maps should be saved (although you can always save your maps elsewhere). All texture and material files go into the materialsrc folder, while all models should be saved in the modelsrc folder. The code generated specifically for your mod is saved in the src folder. Utilizing these folders to store all your source materials will make your life easier later on.

Restart Steam and check out your library of games. Your new mod is in there!

Also take a look at the Source SDK; your mod will be listed as one of the games in the engine build you selected, as shown in the following screenshot:

When you create a mod with the Source SDK wizard, it creates a barebones game. You will need to dive into the game code to make your mod what you want it to be. This book does not cover custom code, but it's still relevant for mapping techniques for your custom mod.



Getting your hands on Steam is quick and easy. It is required to use the Source SDK tools, and it is also useful for keeping your games and tools organized. Once Steam is installed, downloading and installing Half-Life 2: Episode Two is a snap. Creating a mod is a great way to begin developing your own game with the source engine base code, but you still need to code to get what you want out of the game. Let's pick up the Hammer and see what we can do!

About the Author

  • Brett Bernier

    Brett Bernier has been a creator since he could hold a LEGO brick and a gamer since he was old enough to hold a controller. After his father introduced him to First-Person Shooters, it didn't take long for him to want to create his own world. A lunch time discussion with Chris, his childhood friend and band mate, inspired him to take action and download Valve's Hammer 3.4 to create a Counter-Strike map. While looking for mapping tips online, he stumbled across a small, close-knit community of Half-Life mappers at The Whole Half-Life (TWHL). Brett, also known as Tetsu0, quickly honed his skills with the help of the community's tutorials and forums. When the Source SDK launched with Half-Life 2, he was hesitant to make the jump from GoldSource (Half-Life) to Source (Half-Life 2), but once made, he did not look back. He is currently employed as a Control System Technician at ETTER Engineering in Bristol, Connecticut, and is pursuing his Bachelor's Degree in Electronics Engineering Technology at the University of Hartford. He has been creating maps for the Half-Life game series since 2002.

    Browse publications by this author

Latest Reviews

(1 reviews total)
A good book if you want to learn the basics of the Source SDK. From Hammer to NPC scripting, you will learn all you have to know about the Source SDK and learning new ressources from the internet will definitely be easier.
Source SDK Game Development Essentials
Unlock this book and the full library for $5 a month*
Start now