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

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:

View image on Twitter

Follow

Joe Wintergreen @joewintergreen

Good to know Valve and I pretty much have the same comments in our AI

  • 193193 Retweets

  • 497497 likes

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

Joe Wintergreen @joewintergreen

Can anyone confirm whether striders can skewer with their right leg, because I bet this never got fixedpic.twitter.com/qJYnCI6hzA

Follow

Joe Wintergreen @joewintergreen

Strider might still shoot if it knows it won’t hit ya if there’s something there it’d be cool to hit pic.twitter.com/fHwWO7Cw6C

View image on Twitter
  • 1212 Retweets

  • 3737 likes

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

Joe Wintergreen @joewintergreen

Just rollermines jolting the car pic.twitter.com/5bfPM4aIsA

Follow

Joe Wintergreen @joewintergreen

A fix to make combine soldiers not dance.pic.twitter.com/aXDrhAUk5g

View image on Twitter
  • 66 Retweets

  • 2424 likes

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

Joe Wintergreen @joewintergreen

This is cool, a shame there aren’t really mobs of zombies in HL2.pic.twitter.com/MXoz4NUMHM

Follow

Joe Wintergreen @joewintergreen

Cool little comment about rebalancing zombies after some changes to the shotgun happened. pic.twitter.com/XxM3ntFm4v

View image on Twitter
  • 11 Retweet

  • 1919 likes

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

Joe Wintergreen @joewintergreen

Anyhow, done with this for the night! Soz for tk, anybody who ain’t interested in HL2 code.

Follow

Joe Wintergreen @joewintergreen

Might as well continue this thread since I found another good HL2 comment. Feel validated, everyone!pic.twitter.com/gYBCZJJvaR

View image on Twitter
  • 66 Retweets

  • 2121 likes

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

Joe Wintergreen @joewintergreen

Didn’t realise barnacles die on-eat-something-poisonous, cool. Not sure on distinction between black/poison headcrabpic.twitter.com/fivGpQGiQk

Follow

Joe Wintergreen @joewintergreen

Respect to Valve for having only one “fuck” in the entire HL2 codebase. pic.twitter.com/zKNF4ygjIv

View image on Twitter
  • 3535 Retweets

  • 6868 likes

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

Joe Wintergreen @joewintergreen

HL2 suit power exploit saveguards. pic.twitter.com/fGgFAsh8dc

Follow

Joe Wintergreen @joewintergreen

Ah, good bit of HL2 Ep1 commenting (kind of thing they’d put in the dev commentary). On Alyx/barnacles in the darkpic.twitter.com/DhYyooJOyG

View image on Twitter
  • 1212 Retweets

  • 3838 likes

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.

[Source:- pcgamer]