Pause Screen: Gold Standard - How Half-Life's Tech Evolved Shooters
Chapter 18
Chapter Select

Pause Screen: Gold Standard - How Half-Life's Tech Evolved Shooters

Aspiring to make their first game, newcomer Valve Software mapped out a two-step formula for success: license id Software's technology, then dismantle it.

61

Indisputably an industry touchstone, Quake was one of many first-person shooters released during the genre's golden age of the 1990s. To further illustrate the era's creativity and innovation, I spoke with developers of other shooters to learn about their contributions—and in many cases, how id Software's work served as their foundation and influence.

BOB and Two Johns

In the summer of 1996, Mike Harrington and Gabe Newell left Microsoft to strike out on their own. Their dream was modest. They enjoyed computer games, especially first-person shooters, and were interested in writing one of their own.

Before they could do that, they needed technology.

Licensing game engines was becoming a popular route for developers who lacked the time or resources to build one from the ground up. That summer, no engine was hotter than id Tech 1, the beating heart of id Software's Quake.

Valve's co-founders had other reasons for licensing an engine rather than building one from scratch. Both were familiar with Quake and, as programmers, recognized that its underpinnings were more than adequate for essential operations such as rendering graphics and character movement. They saw no reason to reinvent the wheel. With a readymade engine, they could invest in a team of engineers able to augment or replace whole swathes of id Tech 1, as well as artists and designers who would sublimate Quake's run-and-gun conceit into a new breed of action game.

Newell and Harrington did not thumb their noses at shooting galleries like Doom and Quake. However, Doom's template had become pervasive. Countless developers went all-in on technology without bothering to push gameplay forward. Valve's co-founders saw ample room for something different—a shooter predicated on action, buttressed by a narrative-driven progression and deeper combat scenarios than the simple-minded monsters that populated Doom clones.

"When I arrived at Valve, we were trying to make a first-person game with much more storytelling than in existing games," said Jay Stelly, who joined the team as an engineer in May 1997. "Many things changed as Half-Life evolved including the name, the character designs, and gameplay features, but the fundamental choice to be story driven was there from the beginning."

There was another good reason for Valve's co-founders to license Quake's engine. Michael Abrash, co-developer of id Tech 1, knew Harrington and Newell from his time at Microsoft, before John Carmack had wooed him away to write a 3D game engine. Abrash remained on good terms with his old Microsoft buddies and vouched for them to id's cabal of co-founders: John Carmack, John Romero, Kevin Cloud, and Adrian Carmack.

In many ways, id Software was incidentally rather than intentionally a business. Making money was secondary to the whims of its co-founders. As independent developers, they relished the freedom to create games they wanted to play. John Carmack had been a big fan of Nine Inch Nails, so he had seized an opportunity to meet the band and signing them to create Quake's moody soundtrack. Anyone considered beneath their notice was snubbed.

Newell and Harrington were flush with cash from their tenures at Microsoft and eager to pay id's licensing fee, but that was secondary to id's impression of their resumes. These guys weren't gamers; they weren't cool like Nine Inch Nails. They had worked on consumer-grade products such as Microsoft BOB, a cartoonish, user-friendly UI that replaced the default Windows interface.

Microsoft BOB.

A GameSpot retrospective titled "The Final Hours of Half-Life" painted a chilly scene between id's co-founders and Harrington and Newell. Without Abrash to broker the meeting, they may well have chosen to turn away Newell and Harrington. How could a couple of guys with backgrounds writing applications hope to create a product that measured up to Doom or Quake? But Abrash's word carried weight with Carmack. The deal was sealed.

Traveling to id's office in Dallas, Newell and Harrington outlined their main areas of interest. "Quake was initially based on software rendering," explained Stelly. "GPUs were just starting to be developed during that time; very few people actually owned them. After Quake’s release, id added GLQuake and started to support GPUs. Valve expanded both the CPU [software] renderer and the GPU renderer from id’s initial work."

"I showed them the tools, what the development environment was that they used, which was the NeXTSTEP operating system, and using C with QuakeEd," Romero said of the July meeting with Valve, weeks before he was fired from id Software in early August. Other topics included how QuakeEd produced levels in BSP format, the contents of BSP files versus what data would need to be pulled in from other tributaries, and the lighting and math processes that informed level construction. "I showed them how the game engine has a console for loading things up manually and just jumping into stuff."

With id Tech 1 in hand, Newell and Harrington got down to the business of creating a business.

Going Gold

On August 24, 1996, Newell and Harrington co-founded Valve, LLC, in Kirkland, Washington. As engineers such as Mike Stelly came on board, they snapped on a pair of surgical gloves and gathered around the operating table to crack open Quake's engine, hollowing some parts and rewiring others with new parts.

Valve christened the resulting engine Gold Source, a hybrid of Quake and proprietary code. By the time Half-Life shipped in November 1998, approximately 70 percent of Quake's codebase had been overhauled or rewritten wholesale.

Valve's programmers left no polygonal stone unturned. Quake boasted an 8-bit color palette for a total of 256 possible colors. Valve wanted to realize Half-Life in 16-bit modes, increasing the total selection of colors to 65,536. "A lot of things like Quake’s lighting were based on its palette," Stelly said. "So, it could be challenging to achieve a different look for a game in the Quake engine without carefully designing the palette, and keeping your art direction constrained to a small range of colors."

Half-Life's 16-bit color palette freed up artists to create multi-colored environments with distinct personalities.

Rewiring id Tech 1 for 16-bit color entailed a lot more work. In return, all that effort afforded Valve's artists a lot more freedom to paint levels in an exponentially greater variety of colors. For lighting, Stelly and other engineers wrote a custom system that crunched numbers for indirect light sources, refracted light, and colored illumination in line with an area's visual direction. Colored lighting may seem trivial, but Quake's original 8-bit modes only allowed for white light; being able to match colors let artists tailor assets to an area's pacing, narrative, or mood.

Even effects such as the particles that spray in all directions when rockets explode were scrutinized. In Quake, particles were tiny, single-colored squares with rounded corners and painted a single color. Those parameters carried over to Carmack's OpenGL-enhanced port which, while impressive, was still a port—a shiny coat of paint over what was already there.

To some developers, particles might seem a trifling detail. To Valve, every little detail mattered. "Half-Life added transparent particles with textures, trail and beam effects," said Stelly, "and decals that could be applied to surfaces to leave trails of the player's actions in the level as the game was played. We also rewrote Quake’s water and sky effects since those were quite stylized to Quake’s art direction."

QuakeC, the game's crossbred scripting language, was gutted and replaced by a game object system written in C++. Valve's game object system comprised the brain of Half-Life. From artificial intelligence and the bedrock of level design to player movement, physics, down to animations and how weapons interact with actors and the environment—everything goes through the game object system.

"This system was also responsible for enabling Half-Life to be presented as a single, seamless world rather than a loosely connected set of discrete levels," Stelly continued. "This was probably the biggest area of development we took on."

Off a Rail

For all the intensive surgery on id Tech 1, Valve retained its level-building architecture—the BPS workings that processed world geometry—making only minor tweaks here and there. QuakeEd was set aside in favor of WorldCraft, later renamed Hammer, an authoring tool Valve's designers used to craft levels for the game, and that would eventually be released to the public to encourage and support modders. Hammer pounded out environments in a similar format to QuakeEd, minus augmentations made by Valve such as true-color lighting.

Along with the game object system, Hammer worked toward Valve's goal to create a game world whose pieces stitched together seamlessly. Valve aimed to set Half-Life's narrative apart from that of its peers, though at a glance its premise seemed as guileless as any of the single-paragraph setups found in id Software's game manuals.

The player-character, a physicist named Gordon Freeman, rides a tram to work at the Black Mesa laboratory one morning before heading into a test chamber to conduct experiments on anomalous materials. Players have no sooner pushed a cart holding said materials into a beam than the screen flashes and goes dark. They are briefly transported to an alien world set under an eerie sky and teeming with alien creatures. In the next instant they jump back to Black Mesa, where chaos reigns.

A vortigaunt stalks Gordon Freeman.

Lights flicker. Bodies litter the laboratory and, beyond, the facility's corridors are littered with debris and corpses. Scientists and guards implore players to make their way to the surface and get help. En route, players battle aliens and squads of Hazardous Environment Combat Unit (HECU) soldiers who swoop in to exterminate survivors so that no witnesses survive to speak of Black Mesa's goings-on.

 Half-Life's story takes players through warehouses, culverts, laboratories, caverns, military bases, expansive outdoor environments—settings not possible in Quake due to id Tech 1's polygon limits—and culminates at Xen, an alien planet consisting of huge platforms suspended in midair and caves leading to gigantic alien guardians. In most games, these areas would be delineated into levels. Upon completing one area, players would be taken to a mission briefing or score screen before jumping back into the fray. Half-Life knitted environments into one big, interconnected tapestry, a factor that fed the feeling of immersion Valve wanted to create.

"We still built discrete levels like most games of the era," Stelly explained, "but our game object system had a fairly complete system for saving state—for saving the game to continue later exactly where you left off—that we repurposed to move game objects between levels. It could also transfer the properties of an object to a copy of the object in a different level."

The save-state system's robustness enables a high degree of cohesion by carrying over elements that straddle the dividing line between levels. For example, a tower brimming with guards may sit overtop an invisible seam connecting level segments. Players may shoot some of the guards, then pass the tower and descend into an underground tunnel that loops back around to the tower from below. As they pass back and forth between levels, the game loads in pertinent data while remembering details affected by the player's passing.

"If the player sniped the guards back in level A, the guards should be dead when they enter the tower in level B," Stelly said. "If the player had a short firefight with the guards in level A, the guards need to have the correct number of bullets left in their clip in level B, and so on. So, the engine needs to support global persistence of the guards’ state."

All that versatility came at the cost of myriad problems Valve had to solve as Gold Source took shape. In one early area, players creep down darkened hallways and find the way forward blocked by a locked door. They head into a flooded room; electrical cords spark in the water along the floor, rendering it impassable. An atoll of desks rings the room. Players must hop from surface to surface, wriggle into a ventilation shaft, then drop out of the ceiling—and into the room on the other side of the locked door, which they can open if they feel like backtracking to check rooms they might have missed for supplies before moving on.

Headcrabs roam derelict halls.

Although Half-Life's world was ultimately linear—players would have to figure out how to go around the locked door eventually—the game had to anticipate that players could weave in and out of that path, a likelihood the designers had to keep in mind as they determined how to group levels and where to delineate them.

Another consideration was that some game objects such as NPCs might have to jump back and forth between transition spots between levels if players decided to travel back and forth, such as an enemy in pursuit of players who crossed over to the next section of the game. The solution in most cases was to overlap levels. More often than not, Valve bridged levels together using a bend at the end of a long, plain hallway. Astute players came to recognize these stretches as intersections.

"Turning a corner just after a transition was one way level designers avoided duplicating parts of the world geometry in the next or previous level," Stelly said. "In future versions of our game engine we solved this with better level design tools. But having a system that could solve these cases enabled designers to later split things up into more levels to fit into memory or solve other problems without worrying that it would break their designs."

Questionable Ethics

Half-Life's twists and turns were entertaining, but the presentation of the plot quickly emerged as the star of the show.

In most shooters, players are given a bare-bones motivation before being turned loose. At pivotal moments, usually after defeating a big boss, they'll watch a cutscene or read a wall of text explaining what happened, giving them a pat on the back, and setting the stage for the next leg of the adventure. In either scenario, the game wrests control from players, who are free to sit back and read or watch until the next level loads, or mash buttons to ignore the exposition.

Half-Life features no walls of text or pre-rendered videos. Each time players run into another character or trigger certain cues in the environment, such as walking through a certain door or rounding a specific corner, a character will appear, or an event will transpire, such as a cylindrical, rope-like tongue descending from a shadowy ceiling to ensnare a security guard and pull him into the gaping maw of an alien—after which the alien rudely belches out bones and blood—just as players walk within range.

Soldiers set up turrets and plant trip mines to catch unwary players.

With few exceptions, players do not lose control of Gordon during such sequences. Non-playable characters (NPCs) such as scientists chatter as they move from point A to B to C. All the while, players can poke around, run and jump or bash open crates and vending machines to loot their contents, or kill characters mid-sentence. Every NPC is as susceptible to players' growing arsenal as the hostile soldiers and aliens that cross their path.

Planting players firmly in Gordon's shoes works in tandem with seamless environments to weave a spell of immersion that was unprecedented in first-person shooters, and most other games such as RPGs, often heavy on talking and cutscenes.

Gordon, however, is no chatterbox. Similar to Link in Nintendo's Legend of Zelda series, the scientist-turned-survivor never utters a word. Characters talk to and react to him, but players form their Gordon's identity by the actions they take—and because Half-Life rarely steals control of their avatar, they are always taking action. When security guards open fire on enemies, players can support them by joining the shootout, or make a break for the nearest exit, leaving the guards to cover their getaway. They can shoot the scientists they find cowering behind desks, or escort them to safety, or leave them to their own devices.

Valve purposefully left Gordon's background vague so players felt no compunction to adhere to predefined set of morals or ideals. Players do not play as Gordon Freeman; they are Gordon Freeman.

"They used the Quake engine to make that game, and they did a great job with the programming," said John Romero, who became a fan of Valve and Half-Life immediately after the game's release. "Really smooth animations, great AI, and stuff that made the player wonder what it was and how it worked. The way they told a story cinematically, never taking control away from the player."

Vortigaunts are slow, but their lightning blasts shred health and armor.

We've Got Hostiles

Outside of exceptions such as bosses, which may impose special conditions for victory, monsters in id Software's shooters follow a simple pattern: Move toward the player and attack until the player is dead, or the player kills them.

Half-Life's game object system permitted Valve's designers and engineers to program NPCs with sophisticated artificial intelligence, and not just comparatively. "All of our NPCs had a behavior they are currently doing independent of movement, which is an orthogonal system. We called that a schedule," Stelly explained. "Schedules have a notion of conditions that would interrupt them and cause the NPC to choose a new behavior. The AI system updates the current conditions for an NPC by using the game object system to sense what is going on in the environment."

HECU soldiers implement sordid tactics that change based on a combination of their schedules and player behavior. A group of infantry may attempt to trap players by splintering, some units skirting around rooms and obstacles to flank them while others wade in, firing assault rifles and shotguns. If players attempt to hunker down behind a crate or around a corner to catch their breath and reload weapons, they may hear a clink-clink only to look down and see a grenade resting at their feet. Their natural instinct will be to run off, putting distance between themselves and the explosive—and will more often than not run into the open arms of the soldiers who anticipated just such a reaction and fished them out.

Vortigaunts, bipedal aliens with a single bulbous eye and curved spines, behave differently. They open with aggressive attacks but tend to run away when injured. Bullsquids, bulldog-like extraterrestrials with a face full of tentacles, waddle after players and hock corrosive loogies. Left to their own devices, they display territorial behavior, attacking other aliens who hone in on their turf.

Taking damage, finding or losing their line of sight on a target, hearing a sound, having their line of sight blocked by a friendly NPC are just some examples of actions that interrupt an actor's schedule. "So," as Stelly explained, "a basic building block of our AI is to behave according to a schedule until that behavior completes or gets interrupted by one of the things that should make you reconsider your current behavior. Each schedule has its own notions of which conditions to respond to and which ones to ignore based on what the NPC would expect to happen while the schedule is being followed."

The object system got as granular as imparting NPCs with a sense of smell and items with unique scents. Guards comment on the stench of meat and corpses. Not all enemies prioritize the player; bullsquids tolerate the presence of some aliens but immediately go after headcrabs, pint-sized critters that attack by lunging. They can even track scents to their point of origin and chow down if they find food.

"All of the behaviors started with game design, but they were perfected by hours and hours of watching players and fixing up things that didn’t work or adding new interactions for things players tried," Stelly recalled. "There was a lot of collaboration between the gameplay designers, artists, animators, and sound designers to pull off those AI characters."

Valve also imbued NPCs with abilities that certain areas such as dimly lit passageways highlighted perfectly. Players could be creeping along, on the lookout for threats or for a way out of an area, only for aliens to appear in directly in front of or behind them in a blaze of green lightning. "When you're designing an FPS and you want an FPS to scare somebody, what can you do to make a monster scare the hell out of the player?" asked John Romero. "Make the monster appear where they wouldn't expect. The story of Half-Life supported aliens teleporting right in front of your face. That's one of the scariest things ever—when something just appears in front of you."

Look and Feel

Although NPCs followed set behaviors and flexible schedules, many seemed so adept at adapting to circumstances—HECU soldiers in particular—as to appear sentient. Without top-notch audiovisual capabilities, even the smartest AI ever conceived would have felt phony. Rendering realistic movements called for more retooling. Quake handled tasks such as skinning and deforming characters in external packages that id Tech 1 imported as animated frames of vertices, similar to how sprite-based games such as Doom animated frames for pixel-based artwork.

Valve built a skeletal system for Half-Life to make movement nuanced. HECU soldiers ran, crouched, and recoiled in different ways thanks to the skeletal system, itself controlled by the game object system.

"All of its animations were stored as rotations and translations on a skeleton," Stelly explained. "Then the individual vertices were posed and deformed every frame by the CPU in the game engine. This let Half-Life have much more animation in the same amount of memory and also allowed for blending together animations, transitioning between animations, and some other special effects like procedural animation to be solved."

Environmental audio deepened players' immersion. Eager to take advantage of the relatively new technology, Valve wrote custom software to invoke features such as footsteps and shotgun blasts that echoed in larger environments such as tunnels. Carrying out environmental audio was easier than making sure the majority of sound cards supported it.

"Back in the '90s, various hardware vendors were trying to deliver these features to users as add-in cards for their PCs. We supported those systems, such as A3D and EAX, but also had a completely software solution for simulating the environment regardless of which sound hardware you had," Stelly said.

Valve aimed to release Half-Life in November 1997, positioning Gordon Freeman to go up against the nameless grunt of Quake 2. The decision to spend more time refining Gold Source and the game's design caused Freeman's grand debut to slip by a year.

The delay worked out for the better. By the spring of 1998, the game was shaping up, and Valve was recruiting the makers of popular mods such as Team Fortress. Newell's and Harrington's strategy was to give Half-Life's player base a boost right out of the gate by bringing popular mods to Gold Source. Team Fortress co-creators John Cook, Robin Walker, and Ian Caughley joined the team for a three-months stint before Cook and Walker accepted full-time positions. Their job was to develop a version of TF for Half-Life to keep players interested beyond standard deathmatch modes and levels. Before that, they helped tie up loose ends.

"As soon as Gabe hired us, we switched over to helping on Half-Life," said John Cook. "Maybe we kept working on Team Fortress for a few weeks, but they needed help really badly. I just went up to the dev manager and said, 'Do you want me to do some stuff?' Then I got this huge list of stuff. All the HUD icons that pop up in Half-Life? That was me, just little stuff like that."

Stelly and other engineers concentrated on dissecting id Tech 1 and replacing or upgrading its components where necessary for Gold Source. Although Half-Life's single-player mode was the star of the show, the game's multiplayer received attention as well.

"There wasn’t too much of this at release time, but we added a lot of networking features including lag compensation—moving the server back in time to match the client time when a shot was fired—to improve the state of the art in multiplayer at the time," according to Stelly. "These features are a big part of why Half-Life deathmatch, TFC, and Counter-Strike were successful, in my opinion."

Help the scientist, or save the scientist?

Valve incorporated changes to the client side—the game installed on players' computers—as well. Quake's menus were lines of text that described rather than illustrated options. Valve's engineers made it so players could drop in personalized user interfaces and effects. Team Fortress Classic, for instance, included custom menus for choosing teams and character classes.

Another client-side change was Half-Life's ability to predict actions connected to data sent over network connections, such as the path of the Soldier's rockets in Team Fortress Classic. "This logic was used to reduce the perceived latency and improve the feel of weapons in multiplayer games even when the connection to the server had significant lag," Stelly explained. "Doing it in 1998 was fairly novel, especially making it possible for mod authors to customize these behaviors for their designs."

Never Forget About Freeman

To say that Half-Life turned a few heads when it launched in November 1998 would be as gross an understatement as describing the advent of deathmatch in Doom as a small step forward for multiplayer games.

In less than two months, Valve moved 200,000 copies and raked in over $8 million in sales. Critics raved about its story and, more significantly, the technology that made possible then-novel concepts such as seamless levels. Gaming journalist Jeff Green, writing as editor-in-chief of venerable publication Computer Gaming World, proclaimed it the best shooter since Doom.

All at once, Valve wasn't just a contender in the crowded FPS market. It was a leader.

"What a great game," John Romero said. "Great variety, great use of color, great sound effects. They just did everything perfectly. It was a great game."

Valve followed Half-Life with a sequel in November 2004, months after id Software's Doom 3. Half-Life 2's launch also marked the rollout of Steam, Valve's digital games platform that has since become the premier platform for PC games. After releasing two episodic follow-ups for Half-Life 2, the series ended on a cliffhanger that has gone unresolved since 2007.

But continued acclaim and fans pining for a third sequel were to come later. While certainly not the last heavyweight shooter of the 1990s, the original Half-Life went down in history as the benchmark for how single-player-driven shooters should be designed in the post-Doom era.

"The last FPS games I truly loved were the Half-Life series," said Apogee founder Scott Miller. "Now that games limit the weapons I can carry, or have auto-recharging shields, or rely so much on cover shooting, I find myself less interested in the genre. There's something to be said for the raw and less complicated style of '90s-era FPS games. We're seeing some retro-style FPS games revisit this style for the very reason that it's still fun."

Enjoying Rocket Jump? Click here to share your thoughts with other Shackers in the Chatty.

Hello, Meet Lola