The magic behind Half-Life 2 is laid bare in Valve's code comments

Did you know that fast zombies won't jump at you if you're not looking at them?

Joe Wintergreen is an Australian indie game developer who is currently working on “mostly a stealth FPS” under the Impromptu Games banner. He also recently delivered unto the internet a series of code snippets from the great FPS Half-Life 2 by way of his Twitter account. There's not much to see of the code, but that's not why we're here. What's really relevant are the code comments, and the light they shine on how the magic is made. 

The first tweet in Wintergreen's thread sets the tone for what's to come:

Striders will intentionally shoot things up even if you're not in their line of sight, just because it looks cool:

Charlie don't surf, and the Combine don't dance:

Zombies had to be toughened up after the shotgun's power was increased, to keep things in balance:

This is a stupid fix but it works, so whatever:

There's only one “fuck” in the entire codebase, according to Wintergreen, and this is it:

Alyx Vance: Nice girl, handy in a fight, terrible eyesight: 

Some of comments really give a sense of what goes into making a game and keeping it intact. One in particular is actually a multi-paragraph telling of how the Strider minigun was accidentally nerfed in the Orange Box because of a bug in the original Half-Life 2 that nobody noticed. There's also a bit about the “low violence” mode, and references to the Combine Advisors, “large sluglike aliens with creepy psychic powers” who ended up not being used in the game. [Correction, sort of: I've been reminded that they did appear in Half-Life 2: Episode 2, but you didn't actually fight them.]

It's a fun bit of videogame history, and there are quite a few more than just what's embedded here. If you've got a few minutes, you can catch the entire thread on Twitter.


As lead news writer during ‘merican hours, Andy covers the day-to-day events that keep PC gaming so interesting, exciting, and occasionally maddening. He’s fond of RPGs, FPSs, dungeons, Myst, and the glorious irony of his parents buying him a TRS-80 instead of an Atari so he wouldn't end up wasting his life on videogames.
We recommend