The backbone of Half Life 2 and the episodes lie within the custom-made engine, built by Valve.
This engine, debuted June 2004, was written in C++ and incorporates everything from Platform Microsoft Windows, Mac OS X, Xbox and Xbox 360 to PlayStation 3.
SDK:
On June 28, 2005, Valve opened the Valve Developer Community Wiki.
The Source SDK is a software development kit compiled by Valve Software that is used to create maps or mods for the Source engine, with the exception of Left 4 Dead, Left 4 Dead 2, and Alien Swarm. These games are packaged with their own SDK.
The Source SDK currently has three engine versions. Choice between the 2006 version of the Source Engine, which is only used by Half-Life: Source, Half-Life DM: Source, and various mods built on old Source 2004 code.
Valve Hammer Editor:
The VHE is a program included in the Source SDK, all versions, that allows users to create maps for the games of the Source Engine, Team Fortress 2, Counter-Strike: Source, and Portal are some examples.
Don't forget to check out my Portal Blog