logoalt Hacker News

pjc50today at 10:27 AM0 repliesview on HN

> 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.