Why Does Donkey Kong Break On Level 22?
by Ryan Lambie
If you’ve ever seen the 2007 documentary The King Of Kong, you probably know a fair bit about Nintendo’s 1981 arcade classic, Donkey Kong. You'll know that it marks the first appearance of Super Mario, then billed as "Jumpman," and that it involves leaping over barrels and making your way up a series of platforms to rescue a damsel in distress from the titular angry gorilla.
Above all, you’ll know that Donkey Kong is relentlessly difficult, with many casual players struggling to complete the first stage alone. But an elite group of dedicated gamers have not only managed to get extraordinarily high scores on this infamously tough game, but also succeeded in playing the game to the point where it breaks.
The King Of Kong introduces Steve Wiebe, an unassuming Donkey Kong expert whose goal is to prove to the world that he can beat the Donkey Kong high score set by champion gamer Billy Mitchell. In one of the documentary’s most memorable scenes, a crowd gathers at Funspot, an arcade in Laconia, New Hampshire, to watch Wiebe play as his score creeps toward the million mark.
The crowd assembles as a result of a now oft-quoted line uttered by gamer Brian Kuh: “There’s a potential Donkey Kong kill screen coming up if anyone wants to watch it.”
Sure enough, we get to see the kill screen just a few moments later. Having reached the 117th screen (recorded on-screen as level 22) after hours of running and jumping, Mario suddenly keels over and dies, with no obvious injury from a rolling barrel or any other nearby hazard. It’s a bug that, regardless of how good the player is, always ends the game in exactly the same place.
This begs the obvious question: Why does Donkey Kong always break on level 22?
The answer lies in the way the game sets a time limit for each level. You may have noticed that, from the start of each stage, a number in the top right-hand corner of the screen counts down in units of 100. This is the bonus counter, which tells you how many additional points you’ll get should you complete the screen before it runs out. Fail to complete the level before the bonus counter hits zero, and it's game over.
The aim of the bonus counter is simple: it's another incentive to keep the player forging up the screen, and deter more skilled players from simply jumping over barrels and racking up unfeasibly high scores on the opening screen. With the bonus dwindling by 100 every 1.75 seconds or so, the pressure's on to scale the platforms and rescue the damsel.
Each level in Donkey Kong consists of four screens, each with its own layout of platforms and unique dangers. Once the fourth screen is completed, it's onto the next level, at which point the cycle begins again at an increased difficulty (the barrels are more frequent, the fireballs are speedier).
The number of bonus points you start with depends on which level you’ve reached. Behind the scenes, Donkey Kong takes the level number you’re on, multiplies it by 10 and adds 40, thus yielding the first two digits of your starting bonus figure.
If you’ve completed the first four screens and reached level two, for example, the calculation goes like this:
2 x 10 + 40 = 60
Therefore, the bonus counter on any level two screen will start at 6000.
The game caps its bonus at 8000, meaning that once you’ve passed the fourth level, the counter will always remain the same, even when using the above calculation on, say, level 10 should result in a starting bonus of 14,000.
It’s when we reach level 22 that the bug occurs. Again, behind the scenes, Donkey Kong is still running the same calculation: it multiplies the level number by 10 and adds 40, yielding the number 260.
The number 260 is problematic for Donkey Kong’s 8-bit hardware, because the maximum value it can represent in a single byte is 256. As a result, we get something called an integer overflow, where the hardware effectively subtracts 256 from the overflowing value and leaves us with the number 4. Donkey Kong then adds a couple of zeroes to the end, and we’re left with the starting bonus of 400.
Because 400 is such a low number, the player is given only a handful of seconds to complete the 117th screen. This means they Mario barely has time to reach the second girder before the timer runs out and he’s automatically killed.
Even for Donkey Kong’s most gifted players, the game will always end in those first few moments on the 22nd level. As in Pac-Man, which effectively ends on level 256 due to its own integer-overflow bug, getting the highest possible score in Donkey Kong can only be achieved by exploiting every possible bonus opportunity on each of the 117 screens leading up to its abrupt conclusion. This is made even more difficult because of the random nature of Donkey Kong’s programming; the movements of its hazards are so erratic that even its most accomplished players can end the game with wildly varying scores depending on what it throws at them.
Donkey Kong’s programmers probably assumed that no player would ever be skilled (or obsessively dedicated) enough to reach such a stage in the game; nor could they have foreseen that people would still playing the game well over three decades later, and finding ways around Donkey Kong’s game-ending glitch.
On his website, gamer Don Hodges explains how he has managed to disassemble Donkey Kong and fix its code, thus removing its now famous kill screen. Without it, the game simply continues on, looping the final level over and over again, thus giving players with the requisite stamina the chance to rack up truly dizzying scores.
For the game’s most dedicated fans, however, the kill screen—like its unpredictable obstacles and exceptional difficulty—is just another part of what makes Donkey Kong such a timeless classic.