Mapping in Source vs Half-Life

From Valve Developer Community
(Redirected from Source Mapping Conversion)
Jump to: navigation, search

So you want to get started with mapping for Source. Perhaps you've got a map you want to port, or an idea for a brand new map you want to create. If you are familiar with mapping for Half-Life 1 based games, you will find mapping in Source a pleasure. Awkward things have been removed, complex things simplified, and many new powerful features added.

This document will provide you with information to get you going. It assumes you have some familiarity with editing maps for the Half-Life 1 engine, and that you have used Valve Hammer Editor before.

Some General Advice

Don't worry too much about trying to add a lot of new features to your map at first - concentrate on just getting your map to work as it did in Half-Life 1. Later, start adding new features specific to Source. You'll probably feel like a a kid in a candy store at first, tempted by all kinds of new features in Source. You will be tempted to make your maps much more detailed. But in fact if you don't watch out, you will quickly create a map that even the Source engine can't run!

So start simple. Experiment, yes. Try new stuff, yes. But don't go overboard! If you are converting an existing map, your best approach is to just convert the map as-is as best you can. Only then start adding new features.

New/Changed Terms and Ideas

Besides the old terms and ideas you're used to from Half-Life 1 mapping, there are a few new terms and ideas you'll find in Source mapping. Below is a brief description of some changes that will help you transition to Source mapping.

Inputs and Outputs

The Source engine has a new system for connecting and communicating between entities, using Inputs and Outputs. The target field is now obsolete and the entity I/O system is a superset of that functionality.

See Inputs and Outputs for more information.

Textures and Materials

Textures are now referred to as materials. Basically, materials and textures are the same thing - however materials have a lot more information than textures did, including material type, bump map and specularity information, etc. This new name reflects this increase in information.

Props and Models

In Source maps, it is very common to use small (and large) models to represent props and other objects in your map. These props are used instead of creating brush based objects for the map. You can use the hlmv.exe program to explore all the prop models available in Source. Half-Life 2 and Counter-Strike: Source both contain a huge number of useful prop models which you may use in your new Source map.

For more information on props and how to use them, see Controlling Geometry Visibility and Compile Times.


If your Half-Life 1 map contains NPCs, you will also have to convert these too. Unfortunately, not all the Half-Life NPCs were featured in Half-Life 2. For example, the bullsquid, houndeye, alien grunt (and others) do not exist in Source. However, there are new NPCs in Source which may serve as alternatives. Source's AI is advanced and full of features, so make good use of it!

The 'alien slave' or Vortigaunt remains from Half-Life 1, but in Half-Life 2 they are allies with the Resistance and are therefore on the player's side. To make them fight the player and to let the player damage them, you must use Source's ai_relationship entity.

The classic headcrab and zombie are available, and in Half-Life 2 two new headcrab species were added; the fast headcrab and the poison headcrab. Therefore, two new types of zombie exist; the fast zombie and the poison zombie.

The scientists and security guards of Black Mesa were not needed in Half-Life 2 so they are not available to the Source engine. However, the fighting humanoid ally to the player is now the citizen (also known as a rebel or a member of the Resistance). Source's AI is much-improved, and these allies will fight with you surprisingly intelligently if placed and used well in maps.

Marines, assassins, and other Half-Life 1 enemies have been replaced by Combine soldiers, for the most part. There is a list of all Half-Life 2 NPCs here.

Map Units and Sizes

Units in Source maps are the same as those in the Half-Life 1 engine. You will not need to rescale your maps.

Also, maps can be much much larger in Source than in Half-Life 1. If you aren't going to change the size of your map, you are free to put your map anywhere in the Hammer grid.


As mentioned above, using Source you will refer to Materials instead of Textures. In Half-Life 1, a texture was just an image file; whereas a Source material is an image, but also information on bump mapping, specularity and reflection, rendering specifics for different DirectX levels, plus a number of other material properties.

In Source, you no longer will have to use WAD files - which were used to store textures for Half-Life 1 maps. Instead, all materials are stored in separate files - one for each material. This makes it much easier to find and use materials without having to hunt around for the right WAD to include, etc.

For information on converting .WAD files to Source materials, see Converting Textures.

For more information on materials, see the Source SDK documents on Materials and Material Creation.

Brushwork and Brush Entities

In the first pass of conversion, you should concentrate on converting your brushwork - both world and entity brushes. Working with brushes in Source is virtually identical to working with the Half-Life 1 engine, so you should have no problems creating and manipulating brushwork in Hammer if you are familiar with editing for Half-Life 1.

For information on brush conversion, see Converting Brushwork.

Point Entities

Once you have converted your brushwork, you will need to begin transforming entities in the map. Some, such as light and ambient_generic you may not need to change at all. But others, especially when one entity is triggering one or more other entities, will need to be replaced with new Source specific entity targeting methods.

For more detailed information on entities, targets and triggering in Source, see Converting Entities.

For a list of some of the more interesting new entities in Source, see New Features of Source.

Building and Running Your Map

For information on building maps, see Run Map in the Hammer Documentation.

In Half-Life 1 based maps, the traditional way of checking your map was to use the r_speeds and developer console commands. These commands would show you the world and entity polygon count of your map where you were looking plus entity activity as it occurred. In Source, you are given a brand new set of tools which are far more useful and informative to debug your map.

See Optimizing and Checking Your Map for a description of some useful developer commands.