In brief: Not only can the original Doom run on pretty much anything with a screen, it can also run uninterrupted for a very long time. One person wanted to confirm just how long the granddaddy FPS would last in this state, and the answer was a very impressive 2 and a half years.
The experiment was carried out by user minki at Lenowo, whose interest was sparked by a curiosity about how the game's engine handles demo playback.
After reading that the variable responsible for tracking demos keeps incrementing indefinitely – even after a new demo starts – the coder realized it was theoretically inching toward an overflow condition that could crash the game.
While this would never occur under normal play, calculations suggested it might happen after roughly 2.5 years of continuous runtime.
To put the theory to the test, minki used Doom's ability to run on virtually any device by installing it on a small PDA. It drew power from a UPS that was connected to the USB port of a router for a constant 5V supply.
Sure enough, just hours after the demo had been running for two and a half years, a Fatal Error popup appeared due to an overflow.
This isn't a unique feature in retro games. As noted by PC Gamer, the Hacker News comments section has some other examples. One person writes that Crash Bandicoot 3 has a timer that counts upward 30 times a second and only resets to zero when you die. They left it running for almost two and a half years before it overflowed. When it did, the game had "minus" time, causing enemies to move backward, traps to stop working, and other odd behavior.
There's also a story about a sword in Final Fantasy 9 that can only be obtained by reaching an area late in the game in less than 12 hours of play time, or 10 hours on the PAL version. But leaving the game running for two years will overflow the internal clock counter, resetting the timer and letting you grab the sword.
Another well-known example comes from Paper Mario and its cake-baking minigame. Normally, players have to keep the dessert in the oven for about 30 seconds to get the recipe right. But if you were to leave the game running for roughly 4.5 years, the cake would still come out perfectly baked.
The reason these quirks crop up is down to how older games tracked time and events using fixed-size integers. For performance reasons, most relied on 16-bit or 32-bit counters that incremented every game tick. A 16-bit signed integer, for example, can only store values up to 32,767, while an unsigned version tops out at 65,535.
Once the counter exceeds that limit, it overflows, rolling back to its minimum value or throwing an error depending on how the code handles it. With a game engine running at 30 or 35 ticks per second, that translates into years of continuous runtime before hitting the ceiling – longer than developers ever imagined anyone would keep a game running.
