Hasty Briefsbeta

Bilingual

The mathematical mystery inside the legendary '90s shooter Quake 3

8 days ago
  • #Programming
  • #Algorithm
  • #Quake3
  • Game developers in the 1990s faced limited computing power, requiring highly efficient coding.
  • Quake III Arena (1999) was a groundbreaking multiplayer first-person shooter with lasting industry impact.
  • The game's code included an ingenious algorithm for calculating the inverse square root efficiently.
  • The algorithm used a 'magic number' (0x5f3759df) to minimize computational steps via the Newton-Raphson method.
  • Open-source release of Quake 3's code revealed the algorithm, sparking curiosity and analysis by experts.
  • Chris Lomont's 2003 research identified a slightly better magic number but couldn't trace the original's derivation.
  • Greg Walsh is credited with introducing the magic number, though its exact origin remains unknown.
  • The story highlights the extraordinary effort in 1990s programming to optimize performance with limited resources.