The kill screen in Pac-Man is not an ending. It is one byte overflowing
On level 256 the right half of the screen dissolves into garbage. The cause is a one-byte level counter and the routine that draws the fruit. Donkey Kong breaks differently at level 22: there it is the timer that overflows.
Pac-Man, released by Namco in 1980, has no ending. The levels repeat forever; only ghost speeds and behaviour change. But on level 256 the game breaks in a very particular way: the left half of the screen is normal, the right half is solid garbage made of symbols, impassable, and the remaining dots on it cannot be eaten. The level cannot be cleared and the game is over.
What is actually happening
The level counter in Pac-Man occupies one byte, so it counts from zero to 255. At the start of each level a routine runs that draws the fruit icons in the bottom right corner, the ones that show how far you have come. It takes the level number, adds one, and draws that many fruit, displaying no more than seven at a time.
On level 256 the counter holds 255. Add one and you get zero. A loop told to draw zero items, which tests its exit condition after drawing rather than before, dutifully counts down from zero through all 256 values. It writes 256 tiles into video memory, runs off the end of the intended region and floods the right half of the screen with whatever happens to lie beyond it.
That is the definition of a kill screen: not a crash, not a hang, not a designed ending, but a state the machine can enter and cannot leave. The maximum possible score in Pac-Man is 3,333,360: all 255 levels plus the reachable part of 256. The first publicly recorded perfect game is dated to 1999, though the reliability of records from that era has been disputed more than once since.
Donkey Kong breaks differently
In Donkey Kong of 1981 the level counter is protected, and there is no garbage on screen. Something else overflows.
The bonus timer is computed as one hundred times ten times the level number plus four. On level twenty-two that is one hundred times two hundred and sixty. But the intermediate result is held in a byte, and two hundred and sixty does not fit in one: four remains. The timer is set to four hundred units instead of eight thousand — about seven seconds of play. Mario cannot climb in time and dies of the clock, however many times you start.
The same class of fault in both cases: an integer the designer never expected to see at that size, because he never expected a player to get there.
Why this matters more than it looks
Neither case is about weak hardware. The eight-bit ceiling was not a limit the game ran into: it was a horizon the design never looked past. Nobody in 1980 designed level two hundred and fifty-six, because nobody believed a human would reach it alive.
The class of fault has not gone anywhere; the horizon simply moved. Thirty-two and sixty-four bit counters push the limit beyond a human lifetime, but overflows and reads past the end of an array live on. The same mechanism — reading someone else's data as your own — produces Missingno. in Pokémon Red and Blue in 1996: the game interprets a piece of map as a creature description and assembles a monster out of garbage.
And here a correction for the folklore. The famous story about Gandhi in Civilization, whose aggression supposedly overflowed and turned him into a nuclear maniac, is not a bug but a myth: Sid Meier denied it directly in his 2020 memoir. A neat explanation involving overflow proved so persuasive that it took on a life of its own, which is itself a decent lesson about how we talk about engineering.
A kill screen is valuable because it is the point where a game stops being a fiction and becomes a machine again. Everything up to level 255 is Pac-Man. Level 256 is a Z80 writing bytes into video memory. The better question is not why it broke, but why it held together two hundred and fifty-five times before that.
Source: tcrf.net