It's after midnight when the carnage begins. Inside a castle, soldiers chase Nazis through the halls. A flame-thrower unfurls a hideous tongue of fire. This is Return to Castle Wolfenstein, a computer game that's as much a scientific marvel as it is a visceral adventure. It's also the latest product of Id Software (Mesquite, Texas). Through its technologically innovative games, Id has had a huge influence on everyday computing, from the high-speed, high-color, and high-resolution graphics cards common in today's PCs to the marshalling of an army of on-line game programmers and players who have helped shape popular culture.

Id shot to prominence 10 years ago with the release of its original kill-the-Nazis-and-escape game, Wolfenstein 3D. It and its successors, Doom and Quake, cast players as endangered foot soldiers, racing through mazes while fighting monsters or, if they so chose, each other. To bring these games to the consumer PC and establish Id as the market leader required skill at simplifying difficult graphics problems and cunning in exploiting on-going improvements in computer graphics cards, processing power, and memory size [see illustration, Driven]. To date, their games have earned over US $150 million in sales, according to The NPD Group, a New York City market research firm.

All Images: ID Software

Over the last 12 years, the evolving realism of Id Software's graphics has set the bar for the industry. Among the games [bottom to top, left]: Commander Keen (1990); Hovertank (1991); Wolfenstein 3D (1992); Doom (1993); Quake (1996); and Return to Castle Wolfenstein (2001)

It all began with a guy named Mario

The company owes much of its success to advances made by John Carmack, its 31-year-old lead programmer and cofounder who has been programming games since he was a teenager.

Back in the late 1980s, the electronic gaming industry was dominated by dedicated video game consoles. Most game software was distributed in cartridges, which slotted into the consoles, and as a consequence, writing games required expensive development systems and corporate backing.

The only alternative was home computer game programming, an underworld in which amateurs could develop and distribute software. Writing games for the low-powered machines required only programming skill and a love of gaming.

Four guys with that passion were artist Adrian Carmack; programmer John Carmack (no relation); game designer Tom Hall; and programmer John Romero. While working together at Softdisk (Shreveport, La.), a small software publisher, these inveterate gamers began moonlighting on their own titles.

At the time, the PC was still largely viewed as being for business only. It had, after all, only a handful of screen colors and squeaked out sounds through a tiny tinny speaker. Nonetheless, the Softdisk gamers figured this was enough to start using the PC as a games platform.

First, hey decided to see if they could recreate on a PC the gaming industry's biggest hit at the time, Super Mario Brothers 3. This two-dimensional game ran on the Super Nintendo Entertainment System, which drove a regular television screen. The object was to make a mustached plumber, named Mario, leap over platforms and dodge hazards while running across a landscape below a blue sky strewn with puffy clouds. As Mario ran, the terrain scrolled from side to side to keep him more or less in the middle of the screen. To get the graphics performance required, the Nintendo console resorted to dedicated hardware. "We had clear examples of console games [like Mario] that did smooth scrolling," John Carmack says, "but [in 1990] no one had done it on an IBM PC."

After a few nights of experimentation, Carmack figured out how to emulate the side-scrolling action on a PC. In the game, the screen image was drawn, or rendered, by assembling an array of 16-by-16-pixel tiles. Usually the on-screen background took over 200 of these square tiles, a blue sky tile here, a cloud tile there, and so on. Graphics for active elements, such as Mario, were then drawn on top of the background.

Any attempt to redraw the entire background every frame resulted in a game that ran too slowly, so Carmack figured out how to have to redraw only a handful of tiles every frame, speeding the game up immensely. His technique relied on a new type of graphics card that had become available, and the observation that the player's movement occurred incrementally, so most of the next frame's scenery had already been drawn.