In the early 1990s, a small yet intriguing mistake was made during the programming of one of the most iconic video games of all time, Doom. John Carmack, the game’s lead developer, manually entered the value of pi (π) to nine decimal places from memory, writing it as 3.141592657. At first glance, this may seem perfectly precise, but in fact, the last digit is incorrect—the true value of pi to nine decimal places is 3.141592654. Although this tiny error had negligible effects on the gameplay or graphics of Doom, it sparked curiosity and exploration into what might happen if pi’s value was deliberately altered in the game’s code. This seemingly trivial mistake opened a doorway to a fascinating investigation into mathematics, geometry, and how fundamental constants like pi influence both virtual and real worlds.
Doom, released in 1993, was revolutionary as one of the earliest first-person shooters featuring three-dimensional graphics. Players assume the role of a space marine stranded on a Martian moon, combating demons and zombies in a pixelated, immersive environment. Despite the game’s groundbreaking nature, its graphics were primitive by modern standards, primarily due to the limited computational power of the time rather than any miscalculation with pi. Nevertheless, the error in pi’s value planted a seed for further inquiry.
In 2022, U.S. engineer Luke Gotszling took this curiosity further by experimenting with Doom’s open-source code. Since the game’s programming is publicly available, Gotszling modified the value of pi within the game to observe the effects. His experiments revealed how sensitive the game’s virtual world was to changes in this mathematical constant. When pi was set to a simple value like 3, the game’s environment became visibly distorted: walls and pillars shifted and warped unpredictably, yet the game remained operational. However, as the values diverged more dramatically from the true pi, the distortions grew more surreal and unsettling.
For example, when Gotszling set pi to Euler’s number (approximately 2.718), the game’s world became even stranger. As the player moved straight ahead, objects around them would shift sides unexpectedly, enemies appeared and disappeared at random, and the spatial coherence of the environment broke down. Gotszling humorously remarked that with enough intoxication, one might experience a similar disorienting sensation. The most extreme case was when pi was set to π/2, about 1.5708, which caused the game’s walls to flash in and out of existence, invisible obstacles to block movement, and generally rendered the game unplayable. These transformations highlighted how crucial an accurate value of pi is for the game’s trigonometric calculations and spatial rendering.
To understand why pi is so powerful, it helps to revisit its fundamental definition. Pi is classically defined as the ratio of a circle’s circumference to its diameter. In the familiar, flat, two-dimensional geometry of everyday life, a circle is perfectly round because every point on its edge is equidistant from the center, with distances measured in straight lines. This flat geometry assumes Euclid’s postulates, a system developed over 2,000 years ago that governs much of classical mathematics. Under these conditions, pi is constant—approximately 3.14159.
However, if we consider different geometrical frameworks or “metrics,” the value of pi can change significantly. For instance, imagine standing in downtown Manhattan, a city laid out in a grid pattern of streets and avenues. If you wanted to find all points exactly one kilometer from your location, you couldn’t simply draw a perfect circle because you can’t walk through buildings and must follow the street grid. Instead, the shape you trace resembles a square rotated 45 degrees—a diamond shape—reflecting the constraints of movement in this “Manhattan metric.” In this context, the ratio of circumference to diameter, and thus the value of pi, is exactly 4, a stark departure from the familiar 3.14159.
Additionally, the value of pi in the real world is not perfectly constant due to the curvature of the Earth and other surfaces. If you stand at the North Pole and measure points exactly 1,000 kilometers away, you trace a circle on a spherical surface whose circumference is smaller than a circle of the same radius on a flat plane. This means that on a curved surface, the effective value of pi depends on the size of the
