Game Engine Black Book: Doom [pdf]
I've always said: in terms of software complexity, video games are second only to OSs.<p>This book describes Doom (1993), and <i>already </i>goes from low-level hardware descriptions (caching, pipelining) to describing 2D and 3D computer graphics (even including a discussion on perspective-correct texture mapping), collision detection, audio and I/O architecture, to the enemy AI. Little wonder that people like John Carmack and Chris Sawyer are absolute <i>legends</i>.<p>Modern video games ramp this complexity up to a wholly new level: at 144 Hz, games have to accurately output frames in 7 milliseconds or less; a single stutter to 30+ ms is noticeable. Add in the complexity of managing CPU-GPU data transfers, audio and networking, and now hardware ray-tracing. Open-world games have to seamlessly stream data to keep the illusion going (<i>Skyrim</i> is already considered antiquated because of loading screens between even outdoors areas—famously, the gate to Whiterun—not to mention loading screens between indoors and outdoors). They also manage gigantic state machines of NPCs movements and reactions, enemy actions, player data and quest progression, and other miscellanea like day/night time cycles. Players also now expect non-linear, <i>branching</i> storylines, and straightforward moddability.<p>Multiplayer games have to seamlessly send and synchronise user input and responses between dozens of players networked across the <i>world</i>, within tens to hundreds of milliseconds—a 100 ms ping is unacceptable in competitive CS:GO. A website is allowed to take several seconds to load, but that I fired a headshot at that other player's character and that it registered on that player's computer within a <i>hundred</i> milliseconds is stupefying.<p>In graphics we now have ML-based upscaling techniques like DLSS and FSR that are barely distinguishable from full-resolution rendering. Just 5 years ago we had to make do with painfully intensive Sinc/Lanczos algorithms, or blurry bi/trilerp. We have temporal anti-aliasing techniques, and rasterisation hacks that are so impressive that they look photorealistic (see <i>Red Dead Redemption 2</i>. Find a bright light source at night when it's raining, and look at the droplets: they <i>refract</i> the light from the light). I've already mentioned hardware ray-tracing that now allows real-time effects we could only have dreamed of just half a decade ago.<p>I would unabashedly say video games are the zenith of what modern computers and modern software development are capable of.<p>Given this, it is a travesty that game developers are frequently the lowest-paid programmers.