Comment by pjc50

8 hours ago

> Consider that he produced the likes of the quake engines in only a couple of years. Reflect long and hard on the raw simplicity of a lot of that code

Things like the famous fast inverse square root are short, but I would hesitate to describe it as simple.

Ironically one of the things that the Quake engine relies on is clever culling. Like Doom, the level is stored in a pre-computed binary space partition tree so that the engine can uniquely determine from what volume you're in what the set of possibly visible quads is (if my memory is correct, oddly the engine uses quads rather than triangles) AND how to draw them in reverse order using painter's algorithm, because the software renderer doesn't have a z-buffer.

https://www.fabiensanglard.net/quakeSource/quakeSourceRendit...

The BSP partitioning used to take several minutes to run back in the day.

Anyway, the point I was trying to make was that Carmack used a few, clever, high-impact techniques to achieve effects, which were also "imperfect but good enough".

If you're not Carmack, don't over-optimize until you've run a profiler.

> Things like the famous fast inverse square root are short, but I would hesitate to describe it as simple.

Not the best example. That snippet was in use at SGI for years and actually written by Gary Tarolli. Quake's optimization was mostly done by Michael Abrash.

The original id engines were also famously inflexible. They fit the mold of "developing an engine, not a game" to a T. What you saw them do was all they could do. Look at how much Half-Life needed to add to be viable. idtech3 also only broke out of its niche because Ritual and Infinity Ward heavily modified it and passed it around. There's a good reason the engine-based ecosystem is so prominent now.

> (if my memory is correct, oddly the engine uses quads rather than triangles)

I'm also working off a near 30-year-old memory but I recall quads not being unusual around this time. I remember a preview of Tomb Raider 3 in Official Playstation Magazine making a big deal out of the updated engine using triangles instead of quads to draw things. This was around 1998, so a couple of years after Quake came out.