Some musings on the Half-Life 2 source code theft

Well I think that I can get away with postulating the leak of the Half-Life 2 code to be the second biggest blow to the gaming community this year. The largest being the initial announcement that Half-Life 2 was going to rock our worlds this Q4 2003. And due to the extreme blockbuster-nature of Half-Life 2 and the high expectations that are rampant throughout the gaming community this is a truely unique and to some extend devastating blow.

And as can be expected speculation is as abundant the number of people posting on forums around the world. A quick look at the Shacknews, Slashdot, Steam or halflife2​.net (pick a thread, any thread!) threads will give you pretty much all the conceivable conspiracy theories. Much of it is yammer, whitenoise, but some of it is rather intelligent and some of it even downright thoughtful. And really, how often does a situation like this crop up?

Here are what we think we know so far ordered chronologicaly:

  • E3 in May: Valve steps up to the plate and unveils what can only be vaguely compared to the unveiling of DOOM some 8 years earlier. The world is blown away and I almost drown in my own drool (not pleasant at all I might add).
  • Around September 11th: Someone started accessing Gabe Newell’s mail account.
  • Right after September 11th: Gabe’s machine started acting weird, suspecious activity appeared on his webmail account and a keystroke logger – a custom RemoteAnywhere it would seem – was installed on several Valve machines. Apparently via a ‘buffer overflow’ problem in Outlook’s preview pane.
  • On September 19th: supposedly this same someone makes a copy of the HL2 source code.
  • September 30th: The original release date for HL2.
  • October 1st or 2nd: The sourcecode hits the net big time. As with similar earlier leaks, like the Quake 3 or Doom 3 leaks, the spread is pretty much instantanious and pretty much anyone should be capable of getting their hands on a copy.
  • October 3rd: Gabe Newell lets the world know that the leak is real and asks the community for help.
  • Probably mid-December: The new release date for Half-Life 2.

First of all I think most of us were somewhat surprised that HL2 ended up being delayed past its original September 30th release date, but sort of wrote it off as one of those things that just sort of happens (Duke Nukem Forever anyone?). But looking at the events it suddenly seems much more likely that the leak was discovered just before the 23rd. Thinking that the leak could do irepairal damage to Steam and Half-Life 2’s multiplayer components Valve, possibly in unison with Sierra their publisher, decides to push the release date to “a holiday release”. This gives them 2 – 2½ months to somehow try and make the damage minimal by changing the Steam code and possibly make some changes to the network code.

What exactly was leaked then?

  • No content: There are no levels, models, textures or sounds in the leak. It’s just source code.
  • Vital files missing: I haven’t myself looked through the files as I have no interest in them (hey, I wouldn’t understand them if I tried!), but from what I understand vital files are missing and actually compiling the bastard is not possible.
  • Various odd code snippets: People have reported that they have found code from the first Half-Life as well as Team Fortress 2 – which is a surprise as I think most of us had written it off as dead.

So what trouble is likely to come of this leak?

  • Cheating: Pretty much all multiplayer games are marred by rampant cheating. Aimbots, transparent walls, model replacements and so on and so forth. I don’t personally believe that it’s possible to build a system that will be bulletproof, but nonetheless the knowledge that cheats can be devised before the game
  • Plagarism: While no companies can or are likely to try to release a game with the Source engine without paying Valve for the rights, Source is still the most important engine out there. Especially if it holds up to the high standards set by Half-Life’s Quake 1 ‘conversion’. A lot of their technology and knowledge is already available through various whitepapers, but nonetheless I’m sure a lot of things can be derived from how the Source engine, which is 5 years under way, has been put together.
  • Trojan’ing up Steam: Let’s hope it’s not possible for malicious hackers to piggyback ride into client machines through Steam.

Though not all the things that are to come from this are likely to be bad:

  • Steam: The Steam delivery system is an odd thing really. On one hand it will make updates and games easily available, and on the other hand it’s the core of the HL2 anti-pirating scheme. From what I know (not having the final copy of HL2 in my lap this can just as false as any other speculation, though evidence might exist) HL2 will discard the old CD-check in favor of a Steam-check instead, requiring you to be online for you to play the game. Honestly this sounds as stupid as Microsofts activation for Windows XP or Intel’s brilliant unique processor ID, but if it is true then the leak might spawn anti-measures against what I think is yet another layer between the user and his product.
  • Cheat-protection & engine improvements: Communities have before bred amazing things, like for instance the Falcon 4 leak. Or have a look at what the community is doing with the Quake and Quake II codebases (I merely have to mention Tenebrae really). And perhaps this leak can make the community an active asset in minimizing the damage caused by cheaters.
  • Hammer: From what I understand the complete source code for Hammer (level editor) is present. And if that’s the case, and it compiles and everything, this is absolutely fantastic news! GtkRadiant and Ydnar’s Q3Map (google it) are examples of what the community can accomplish with the sourcecode in their hands. Their combined effort has lead to what is probably the coolest editor and level compiler ever.

All in all however I doubt the positive effects will outweight the negative. If indeed the delay of HL2 was caused by this then the financial damages are already causing Valve (and Sierra, but I could care less about that) and their shareholders harm. This in turn might lead to all kinds of problems in the future for Valve.

And when you’re planning on becoming the new superpower in terms of gaming engines it must be like a crowbar to the back of the head to see your child out there for all the scr1p7-k1dd13s to devour as they see fit. The code however is ‘old’ and with Valve in hardcore crunch mode it’s likely to already have changed considerably.

I doubt this’ll hurt HL2 sales much in the long run, but their 2003 Q4 might not look as economically great as they had originally envisioned (and deserved I gather) if they could’ve sticked to their original release date.

I would love to be a fly on the wall in Gabe’s office these days!

14 Responses to “Some musings on the Half-Life 2 source code theft”


  • Cheers for your insight and comments, Michael. Saved me from digging around. Having spent many hours coding stuff myself I can tell you getting the hands on code is not the same as understanding the principles and having worked with it yourself. Without some design-document/technical whitepapers outlining the inner workings of the engine … and especially without access to the people who helped program it … it is almost as laborious understanding the Source engine as it would be programming it yourself.

    Second, if Valve suspects any big publisher of housing a developer that has made illegal use of the intellectual property of Valve, I think you’d see legal battles almost instantly.

    Not saying this code will not be copied, not saying it’s not bad for Valve, not saying that valuable trade secrets weren’t made public … merely saying that the actual use people can put this to is not as big as non-programmers (i.e. news analysts) might think. Unfortunately, non-programmers are often the ones determining the value of a company … so in a strict market sense it might very well hurt Valve.

  • Good the get the point of view of a programmer, and as you mention I think that there might be a chance of it hurting Valve somewhat financially. But we’ll see about that.

    Here’s a fantastic page for keeping up with current events

  • I can’t say anything about vital files, since there’s no way to determine what is vital. But it does compile, and worldcraft/hammer runs (version 3.40 build 2534).

    While downloading the source I was contemplating if it was ethical, but the curiousity got to me, and I just couldn’t help myself from getting a look at it.

    It’s fun to poke around in, and trying to get some working binaries out of it, but as Bjørn put it, it’ll be a huge task to understand a game engine without any documentation or contact with the developers.

  • I can’t see how this will affect sales. As a mr. Spies used to say “Bad press is better than no press”, and this is also the case with games (look at GTA VC).

    Is Valve even a publicly traded company? If it is, then yes, I can see this having financial ramifications for them.

  • Tsk tsk, shame on you! :) — So ehhh… I might have to take a look at Hammer :)

    In terms of the ethical arguments in a situation like this I don’t blame anyone for messing around with it, if I had any programming interest I would do so myself. The cats out of the bag, no reason not to come it for lice… or something like that.

    In terms of the huge task, I think you can be damn sure that some people out there are more than interested in spending all their time slowly picking it apart. And I guess (correct me if I’m wrong) that merely understanding parts of the code is enough to start manipulating it.

    And while Valve, probably backed by Sierra, will be heavy handed in smiting any projects based off of this you can’t stop the Internet. If there’s a chance in hell that anyone can get this up and running then it’ll happen.

    I’m not actually sure if it’s publicly traded or not…

  • As far as I can see Valve is not public (finance​.yahoo​.com has all stocks from all major markets). I think a public company would have put a whole nother spin on this thing. Mr. Newells post is targeted directly at the community. And though they most likely dont like the situation a whole lot, I think they are putting on a spin that is sure to boost both hype and sales. The whole thing is somewhat like a Gibson / Sterling novel …

  • Heh, funny you should mention it, I was thinking just the same. Sort of like watching a story from Sterling’s Cyberpunk unfold realtime! :)

  • Already the large news sites are twisting reality:

    Valve, the makers of Half-Life 2, said the leak followed a concerted hacking effort on the company’s computers over a number of months.

    From BBC

    Not quite the case from what we know at this point.

  • Hmm. I would look at this if I had any interest in code for a Windows game </snob> :) j/k

    It really does suck for Valve, though. While, in my oppinion, their engine doesn’t look as pretty as Doom 3’s, the whole facial animation thing seemed really cool.

  • Not as pretty as Doom 3? What’re you smoking? :)

  • While I agree that the engine in itself ins’t as pretty as the Doom3 engine, I think the artists have made better use of the capabilities of Source in HL2. The thing that puts Source and Doom3 apart is per-pixel lighting operations, and while impressive from a strictly technical point of view, I personally felt the Doom3 leak gained little from real-time hard-edged shadows.

    Personally I’m more impressed with the physics properties of Source than the per-pixel properties of Doom3 as it seems to further gameplay more than aestetics. YMMV.

    What I do is extremely impressive about the Source engine is how well it seems to integrate into the game-production flow. An artist assigns a metal texture, the object receives metal physics. One example of many where the Source engine seems focused on making it easy to create a believable world. I’ve always felt that the Unreal engine would be a better choice for making a game than the current Id iteration, simply because it seems better documented and it has a compiled, C/C++ like scripting environment designed to do games. Also, the art-pipeline in Unreal (and now Source) seems better integrated with how games are made today. Take a piece of 3DMAX geometry, import it into the Unreal engine as a static mesh and voila! Instant gratification.

  • I quite honestly don’t know how well Unreal is documented when it comes right down to it. I don’t have any experience with the coding aspect of it, but I know that finding proper (and especially official) documentation on the level design part of UnrealEd is next to impossible.

    There are of course a lot of online forums where you can find help, but it’s my experience that id’s manuals for Radiant as well as their shader and model manuals are far more comprehensive than anything I’ve seen from Epic. Though I might’ve just missed it? And while subjective to the point where it’s coming out my wazoo, I’ve always found UnrealEd to be absolutely unintuitive to work with and unapproachable for even an ‘expert’ level designer. But of course there are people out there doing it, so it must be possible. But I think it’s a clear sign that something is wrong when you look at the proportionate differences in the respective community sizes.

    As for modding, the original Half-Life was an amazingly cool game for modders and level designers. Not only is Worldcraft (now Hammer) a great level editor being both intuitive and capable of (back in the day anyway) fairly complex architecture (if you know how to handle it that is). You also had access to some great single player features which pretty much allowed you, as a non-coder, to do anything that the retail game could do. And though that would seem like an obvious ‘feature’ there are many other games where that isn’t the case.

    And while that’s in a way good for the development team itself since they have all the people needed it’s just not good business if you want to create a mod-based community. (It can be argued that placing as many of the features in the hands of the level designers as possible is the best way to go in any case).

    Of all the games I’ve ever done level design for Half-Life has been the very best, and if I were to pick just one single player game for which I would like to do level design, it would still to this day be Half-Life.

    The other Quake engine games have also been quite good and for them the coolest thing has been the community support that they have garnered. Quake and Quake 2 were both supported by the original Worldcraft (before it was bought by Valve) and so it wasn’t until fairly late in Quake 2 that I really had to use Radiant, ID Software’s in-house editor. And while it can get things done (and is quite versatile) you can definitely feel that it isn’t a professional 3D application as such. Vertex manipulation in particular is a problem, as it has been in all other level editors I’ve ever tried (though WC got away with it a lot better than all the others). The current community version (gtkRadiant) is getting improved by the day and still supports new games such as Jedi Academy and the Medal of Honor titles.

    Of all the editors UnrealEd was by far the worst. I can’t even begin to describe the lack intuitive interface that it has. I have always liked the Unreal engine, probably because it was the underdog in the early days. These days however I’m beginning to wonder if it’s really worth still routing for it.

    First of all I don’t think that the engine is particularly impressive any more. Even if you don’t consider the total lack of gameplay appeal that Unreal 2 ‘boasted’ the game itself didn’t show any technical prowess that you can’t find it so many other engines, with the possible exception of a pretty good polygon count. Everything else had already been done and been done well by Half-Life. (Well with the exception of landscape, but hey…)

    It’s not quite fair of course to compare Unreal with two engines that haven’t even been released yet, but even so.

    Half-Life 2 has integral support for SoftImage XSI, effectively allowing you to move the entire level back and forth between Hammer and XSI as you see fit… I can’t even describe the absolute coolness of this. I have only a little experience with XSI, but one of the things that has always made me prefer doing architectural design with Radiant or WC is due to the way that those editors are specifically tailored to do very specific tasks; allowing you to work much faster! Of course you’ll often hit an obstacle when you try to do things like rounding off the corner of a cube. And that’s when you just port it over to XSI to perform whatever surgical operations you need done using that instead.

    Doom 3 will, as far as I know, feature an in-game version of radiant which allows you to see your changes real-time. I’ve heard rumors that people have seen it running on the leak, but I haven’t tried it myself.

    Either way I think that somewhere in here my point is this:

    While it’s true that with Unreal you can export meshes made in 3ds (as well as Maya IIRC) that in itself is hardly a selling point for an engine which in my experience runs like shit. And it does. Both Unreal and Unreal 2 proved this. And this might be up to the incompetence of the teams that worked on those titles, but I find that when I look at the facts today Unreal no longer features on the list of engines that I would choose to work with. Especially considering the insane pricing scheme which leaves their clients with about as much freedom as Tim Burton on Planet of the Apes.

    And the second part of my point is this:

    For a game like Doom 3 I think that per-pixel lighting is dramatically important. It’s about mood and atmosphere all the way, and the dynamic properties of the light are absolutely perfect for this. Also I’m not sure that it’s entirely fair to compare any id engine to Source or Unreal for the simple fact that what id does is they create the engine that fits their game perfectly. If others can use it, great! But they don’t make general-purpose engines, and I think that’s vital to keep in mind when doing comparisons.

    Everything weighed I would put my money on Source any day of the week. If the delay in HL2’s release is indeed due to this source theft, then I hate the hacker(s) with all my heart.

  • While I don’t know the specifics, from what I’ve heard Doom 3’s ragdoll physics engine sounds pretty cool. It allows for things such as shooting an enemy in the leg, knocking that leg out from under them, thus causing them to fall to the floor in an entirely realistic and generated-on-the-fly way.

    And I agree with Mike about the per-pixel lighting. Knowing an enemy is approaching because you can see their shadow coming down the hall sounds incredibly awesome.

  • Well, I think that Doom3 does indeed look better than Half-Life 2 from a graphics perspective. I have done a good deal of programming in OpenGL and I must say that the level of graphical detail and lighting effects achieved by the Doom3 engine is amazing, showing just how powerful the 2.0 standard of OpenGL is. Anyway, I think that it’s great that both Id and Valve have released their products (finally) and I can hardly wait for christmas so I can play Half-Life 2. And so far as the Half-Life 2 source, I’m still trying to pick apart the Quake 2 source ; ].

Comments are currently closed.