How Quake (1996) Reinvented 3D Game Engines

How Quake (1996) Reinvented 3D Game Engines

Starting Quake today means choosing among releases that the 1996 box never had to offer. The id Software shooter that Steam and GOG date to 22 June 1996 now exists as the original DOS program, the Windows ports id made after shipping, and a 2021 re-release sold as Quake (Enhanced). All of them run the same campaign, yet they differ in how they draw it, how they handle multiplayer and what else comes in the package.

The choice is easier once you know what the engine was doing, because its design explains why the ports and the re-release exist at all. Quake compiled its levels in advance, drew its moving parts in four different ways and was written from scratch instead of growing out of the earlier Doom engine. Michael Abrash, who worked on it with John Carmack, described all of this in the last chapter of his Graphics Programming Black Book, and most of what follows rests on that chapter.

A World Compiled Before You Walk In

Quake’s world is a single object. Abrash writes that it is stored as one BSP model that never changes shape or position, assembled from brushes: convex solids that a designer places in a map editor with a texture on each face. When a level is finished, a preprocessing program merges the brushes into a continuous skin around the solid areas, so no polygons interpenetrate, and then builds a binary space partitioning tree from the result. The tree uses the polygon that splits the fewest others as each divider, which is not optimal, but it adds only 10% to 15% more polygons.

The costly step comes next. For every leaf of the tree the tools calculate a potentially visible set, the list of other leaves that can be seen from anywhere inside it. At run time the renderer unpacks the set for the leaf the player stands in and skips the rest. The work moved from the player’s machine to the designer’s: Abrash gives 10 to 30 minutes per level on a four-processor Alpha, and adds that even Carmack thought Quake might have pushed preprocessing far enough to interfere with workflow.

Light is baked as well. Each light is traced into the level and its combined effect on every surface is stored as a light map, sampled on a 16-texel grid. When a surface is drawn, its texture is tiled into a memory buffer with the light map applied, and the lit result is cached. Abrash sets this against Gouraud shading, which struggles to give detailed lighting without extra polygons and is not perspective correct. By his account surface lighting runs at roughly the speed of tiled, Gouraud-shaded texture mapping and looks much better. Its price is that a dynamic light forces the surfaces it touches to be rebuilt, which he accepts as long as most surfaces are not dynamically lit at once.

The visible spans are then drawn so that they cover each screen pixel exactly once, which means the world is rendered with zero overdraw.

Dynamic light arrived late. Before the 1996 Computer Game Developers Conference Quake had none, because the team doubted it would add enough to be worth the trouble; then a demo at the conference of another programmer’s unfinished engine changed their minds. Abrash rushed the surface-building code in preparation, and one Saturday Carmack bet he could add the lighting itself in under an hour. It took an hour and nine minutes. The effect is a linear projection that ignores both surface angle and falloff with distance, and Abrash notes that you almost cannot tell unless you look for it, since motion covers a multitude of graphics sins.

Three cards comparing the level, doors and boxes, and monsters on whether they move, how they are stored and how they are drawn
The static level, the moving doors and the monsters each take a different path through the renderer.

Doors, Monsters, Sprites and Particles

Everything that moves falls into one of four classes, Abrash says: BSP models, polygon models, sprites and particles. BSP models are doors, moving bridges and the health and ammo boxes. They are pieces of world geometry that can move, so their polygons are clipped into the world tree and drawn through the same edge list as the level itself. Polygon models are the monsters, weapons and projectiles: triangle meshes with front and back skins stretched over them.

Sprites and particles fill the gaps. The team had hoped to remove sprites entirely and make Quake 100% 3-D, but kept a few, most visibly for the cores of explosions, where a spray of particles alone lacked punch; Abrash admits in hindsight that polygon models would have looked about as good for less code. Each particle is a solid-colored rectangle scaled by distance and drawn with the z-buffer, up to 2,000 in a scene, used for rocket trails and the clouds around an explosion.

Why monsters needed a z-buffer

A polygon model has hundreds of polygons, too many for the edge list. The team first sorted those polygons into the world tree, which left some occlusion errors and could not put two models in the same leaf in order. The answer was a z-buffer. After the world’s spans are drawn the buffer is filled for them, a write-only step with no comparisons and no overdraw, so it costs little.

Where the affine shortcut showed

For speed the triangles are drawn with affine texture mapping, and they are Gouraud shaded from a light direction that is the same for every model, varying only in brightness to match the spot the player stands above. The shortcut is invisible on small, distant monsters but shows on the weapon the player holds, which cost the artists extra work. Abrash expected a perspective-correct polygon rasterizer for that case in Quake 2.

Why Deathmatch Stopped Stuttering

Quake was client-server from the ground up, even in single-player, where messages pass through buffers between the client code and the server code. Abrash says the aim was persistent servers on the Internet that run whether or not anyone is playing, and that the design, which carried up to 16 players, did much for the game’s visibility and lasting popularity. The cost was latency: every action except turning had to make the round trip to the server.

The last prerelease, QTest1, used the operating system’s reliable TCP delivery, so one lost packet meant a long pause while it was resent. Carmack then switched to unreliable UDP and sent the relevant part of the full state each time, which the visibility sets made affordable. He did not rebuild the net code around that new assumption, though, and the result was 8,000 messy lines that took until shipping to debug. For QuakeWorld he rebuilt it from scratch and it came to 1,500 clean lines. Abrash coined the lesson on the spot as Carmack’s Law: fight code entropy.

Modem players still saw 250 to 400 ms of latency when Quake shipped. QuakeWorld, a multiplayer-only version distributed free on the Internet as what Abrash calls a learning experience, attacked it in two ways. Its server acts the moment a client sends input instead of batching it for a tick that runs 10 or 20 times a second, which took 50 to 100 ms off the response. And the client stops interpolating and predicts the player well ahead of the latest server packet, trading smooth scenery for quick control. The price is an occasional paradox, such as a sudden jump in position when the server disagrees, for instance after an explosion pushes the player sideways.

Starting Over Until It Worked

Quake’s code was written from scratch rather than from Doom’s, according to Abrash, and the team implemented and discarded at least half a dozen 3-D engines along the way. They nearly changed again in the last month. A visibility scheme built on stored passages between portals looked better than the potentially visible set on paper, since it would cut the polygon set more tightly, and within a weekend Carmack had it working. It improved the best cases and worsened the worst ones, so Quake kept the original scheme. Abrash says Carmack was as relieved as disappointed, given how close they were to shipping.

The same restlessness shows in the ports he lists after release. Verite Quake, the first hardware-accelerated version, kept the edge list and span building on the CPU and let the chip’s programmable core draw the spans, an arrangement most accelerators could not support. Then came GLQuake for OpenGL, WinQuake for Win32, whose built-in TCP/IP he thought reason enough to port, and QuakeWorld. GLQuake dropped the surface cache for two-pass alpha lighting, and he reports that it ran very well on fast chips such as the 3dfx but rather slowly on most other accelerators of the time. Games of the generation Quake replaced, such as Raven’s Heretic, show what the older approach produced.

Buying a Copy That Still Runs

Steam and GOG both list Quake. Steam lists Quake (Enhanced), credited to id Software, Nightdive Studios and MachineGames and published by Bethesda, with the 22 June 1996 release date of the original. It includes both original expansions, Scourge of Armagon and Dissolution of Eternity, three expansions from MachineGames and the original soundtrack and theme by Trent Reznor. GOG lists Quake with the same 1996 date and the same expansion list. Neither page says whether the 1996 DOS program ships beside the updated version, so anyone who wants that program specifically should read the current store description before buying.

The source code is a separate matter. id’s readme says the code is licensed under the GPL, that the game’s data files remain under their original copyright and that a source port needs the game’s data, either from a purchased copy or from an original demo whose data may not be redistributed. It also says a change to the shareware episode’s license, to allow freer copying, was only being considered, and nothing there shows that it changed. That is why this article points to the stores and not to any file. The QuakeC game code behind the 2021 re-release is published as well, under GPLv2.

Four-step timeline from the June 1996 release through the post-release ports and the 2021 re-release to today's store listings
Every step on this line comes from Abrash’s chapter, id’s QuakeC repository or the store pages.

From the 1996 Release to the Enhanced Edition

  1. 22 June 1996: Quake is released, the date both stores give.
  2. By spring 1997: the Verite, GLQuake, WinQuake and QuakeWorld ports exist, as Abrash lists them.
  3. 2021: Nightdive and MachineGames re-release Quake with the original expansions and MachineGames add-ons, and the QuakeC for the re-release’s six codebases is now public.
  4. Now: Steam sells Quake (Enhanced) and GOG sells Quake.

Every figure above comes from Michael Abrash’s chapter in the Graphics Programming Black Book, id’s Quake source readme and QuakeC repository, and the current Steam and GOG pages, as of October 2026.

About the author — Sung Hwan Cho, a Seoul-born industrial designer, runs and edits DOS Attic, a site about how DOS-era games and PC hardware were made and how to play them legally today. Dates, credits and figures here are checked against developer and publisher statements, period magazines and credits databases. Corrections are welcome at 4ddesigner@naver.com.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top