Programming the Apocalypse: How a Doomsday Simulator Murdered Me Repeatedly and Sucked Me Into Its Code

Photo credit: Eric Limer
Photo credit: Eric Limer

From Popular Mechanics

Amelia Hoffman slams on the gas and screams obscenities out the window as her hatchback hurtles across the open field. Two dozen zombies, alerted by the noise, shuffle in pursuit-just as she planned.

She skids into the parking lot of an abandoned gun store and sprints inside, slamming the steel door as a distant moaning grows to a roar. The first zombie crashes its rotting arms through the shattered glass windows, but the shop's iron bars hold the undead beast at bay. Amelia retrieves the homemade crossbow from her back and loads a makeshift iron bolt from a stack she'd left hidden in the corner. She smiles, takes aim, and opens fire. Just another day in the cataclysm.

Photo credit: Eric Limer
Photo credit: Eric Limer

Cataclysm: Dark Days Ahead is an open-world zombie-survival game set in the the deadly apocalyptic wastes of near-future New England. In more direct terms, it's a dizzingly ambitious and viciously cruel storytelling machine, one that will kick you in the teeth and make you fling your laptop out the window, then make you think back wistfully on the experience once you've had a day or two to cool down.

But this is no $60 graphical-bruiser, no flagship game that requires the latest console or gaming PC. It's a free, open-source, low-res little program that will run on a ten-year old laptop without eliciting a creak or groan. C:DDA doesn't have "graphics" in the modern sense, just unanimated tiles that move around the screen like tokens in a board game. Nor is it the finished, polished product of a traditional game studio. Instead, it's a messy, perpetual-work-in-progress coded by anyone who will volunteer to help-a cadre that, as of a few weeks ago, includes me.

Ravishingly retro, cutting-edge complexity

In the absence of a traditional narrative, C:DDA drops you into Armageddon and throws up its hands.

Each session takes place in a randomly generated and literally endless world for your ill-fated characters to explore. Once you choose from a overwhelming list of professions (Security Guard, Roller Derby Player, Beekeeper, Bionic Sniper to name but a few), pick out a handful of traits both positive (Parkour Expert!) and negative (Lactose Intolerant!), and select a name from the game's spectacular generator, your character will appear in any one of a number of scenarios of your choosing, from a relatively safe evacuation shelter to a literal burning building surrounded by the dead. There is only one constant: everything is going to hell.

The dangers you will face include, obviously, zombies (of the fairly fast variety), but also deadly security robots, plagues and sickness from the flu to fungal infections, fires, blizzards, enormous mutated insects, wild animals (of the natural and zombified varieties), monsters and demons of unknown origin, and-perhaps most deadly of all-your own stupidity. Everything in C:DDA is out to kill you, and the deaths are permanent. Whether your character expires after 45 seconds of gameplay or a 50-hour marathon, the result is the same: there is no extra life. They are dead forever and you start again from scratch with someone new.

Here are some of the more memorable deaths my dozens of characters have met over more than 100 hours of play. Several of them I mourned:

• Enrique Alonso was absolutely steamrolled by an angry moose.
• Bret Galvin was as good as dead the second that zombie dog howled.
• Viktor Kuropiatnyk, with a fever of 105, fainted into a zombie's arms.
• Amelia Hoffman was torn apart by carnivorous worms after refusing to abandon her grocery cart of loot.
• Randolph Reed dropped his shotgun in order to draw his katana and paid for that choice with his life.
• Russ Reynolds III trapped himself in a broken-down RV along with a giant wasp.
• Sunni Cunningham never knew what hit her. (It was a 120mm round from an autonomous tank drone.)
• Ricardo Danielson was mauled to death by a pair of giant cockroaches he stubbornly refused to 'waste' any 9mm ammo on.
• Bud Romero lost his face to a zombie soldier who had one more grenade left.
• Celia Greenwood rear-ended the wreck of an 18-wheeler with her hot-wired sports car.
• Bennie Prince is somehow, miraculously, still alive.

All this suffering didn't just spawn from nowhere. If we're really going to talk about Cataclysm-and especially if we're going to discuss its two most prominent gameplay features, a randomly generated world and characters who suffer "permadeath"-then we need to talk about the classic 1980s computer game Rogue.

Designed to fit the constraints of early UNIX systems that had paltry computing power and no controls outside of keyboards and text commands, Rogue laid a novel foundation. Instead of animated computer graphics (which barely existed at the time), Rogue drew rudimentary randomized dungeons with letters and symbols in the same simple ASCII character set computers used for displaying text (or sometimes, mosaic-like ASCII art). In Rogue, you play as a simple '☺', traversing randomly generated dungeons made of period floors and confined by walls made of brackets and piping.

Photo credit: ⠀
Photo credit: ⠀

Rogue's modern descendants are generally called roguelikes and borrow their forebear's gameplay ideas but often leave behind its technical trappings. C:DDA hews much closer to tradition. Like Rogue, it plays from top-down perspective, with actions playing out turn-by-turn instead of real-time, giving players an eternity to ponder every step. And yes, it retains those ASCII graphics, so prepare to use your imagination.

Okay, that's not entirely the case. C:DDA supports tilesets, which replace the limited selection of ASCII characters with much larger libraries of unique, custom-drawn icons for each in-game item. Although they do not animate, the tilesets look more like the objects they are meant to represent. This makes it much easier to tell the difference between a zombie and a tumbleweed without having to look up every new thing you see on a reference table. I've primarily played with the exquisite 'RetroDays' tileset, which manages a retro flavor while still being pretty easy to decipher. But the game's naked ASCII has a stark beauty all its own, if you can learn to make sense of it:

Photo credit: Eric Limer
Photo credit: Eric Limer

If you're coming from Call of Duty or Red Dead Redemption, it might be tempting to write off these graphics as an unfortunate but tolerable downside. That would be a mistake. In fact, it is these simple graphics that allow Cataclysm to be the ludicrously complex game it is.

It's true that everything is out to kill you as part of the game's Armageddon. The fun part is that you get to kill it back. Underneath C:DDA's simple graphics lies a series of intricate systems designed to model cooking, crafting, combat, automotive engineering, survival, health, and weather in excruciating detail. These systems can only exist in such absurd detail because the game requires no art assets, no modeling, no animation to hog the computer power.

Photo credit: Eric Limer
Photo credit: Eric Limer

Let's say you're inspired by Evil Dead and would like to kill some zombies with a chainsaw. Great. Also loud, gasoline-reliant, and clumsy, so it's probably going to get you killed, but it sounds like fun! The easy way to get one would be to raid an in-game hardware store. Alternatively, though. you could build it yourself-provided you've found schematics in an in-game book like Internal Combustion Fundamentals, and have enough smarts, functional eyes, shelter, and the provisions to sustain yourself while you spend a few days reading it.

Among a half-dozen other ingredients, you'll need a small engine, which you can scavenge from a hedge trimmer or a jackhammer if you have tools for disassembly (hammer, screwdriver, wrench, which you'll have to find or make). You'll also need a chain, which you can scavenge from a bicycle or forge from scratch-provided you first build a forge, make a crucible, and forge an anvil, a pair of tongs, and a freakin' swage and die set, all of which you can absolutely do if you can survive long enough. And at the end of your journey, guaranteed to last much longer than you ever expected, you will find yourself in possession of a red forward slash representing your chainsaw and you will feel like you have an honest-to-god relationship with it.

Photo credit: Eric Limer
Photo credit: Eric Limer

This recurring flow-set a goal, uncover a dozen prerequisite steps, die before you finish, spin up a new character, try again-is the real joy of C:DDA. Making a daring late-night raid on a downtown grocery store for nothing more than a single gallon jug you can fashion into a funnel to collect rainwater before you die of dehydration. Slaying dozens of zombies to collect their shirts, ripping them to rags, and sewing them into a pair of cargo pants that has enough pockets that you can bring back all that precious duct tape from the dollar store in a single trip. Exploring every library and bookstore in a five-mile radius in search of a book that will explain how to transfer a diesel engine salvaged from a school bus into the over-heavy Mad Max abomination you've spent weeks building from scratch with a homemade welder. Weeping at the discovery of a hand press & die set you can use to hand-reload the mere four rounds of excruciatingly rare 7.62x39mm ammo you have for that tricked out Soviet SKS you found in a less fortunate survivor's bunker-basement.

Like I said, joy.

The game behind the game

It's not simply the old-school ASCII graphics and sprawling interconnected systems that make C:DDA the twisted masterpiece it is. It's also the people who code the game-which, technically, includes me.

If you play C:DDA for long enough, you'll start to run into them on the community subreddit, or maybe the fan-run wiki. Pose a question of how or why part of the game works, and they'll appear sometimes with literal code in hand, ready to show you exactly how the game is functioning underneath the hood. Inspired by their devotion, and indebted to their labor, I eventually resolved to join them.

As an open-source project, C:DDA has its inner workings posted freely online, where anyone with a working knowledge of C++ can dive in and add weapons, recipes, and more information into the simulation's already abyssal depths. Thanks to the volunteer coder army, the game morphs and changes at a pace that is simultaneously blistering and glacial.

The "experimental" track is updated with bug fixes, balance changes, and new features as often as several times a day. It can be disorienting for players who aren't prepared, especially since brand-new features can basically break the game. A recent addition, for instance, plagued players with food that was somehow hot and yet frozen at the same time. In other words, inedible. Meanwhile, the game's "stable" build, designed to spare you from this chaos, has not been updated since early 2015 (though an update is theoretically coming soon).

As with most open-source projects, the decisions regarding what gets added and changed are made through a mix of despotism and anarchy. Ultimately, any addition to the game is at the sole discretion of the project's maintainer Kevin Granade, a co-founder of the Dark Days Ahead project, the successor to the abandoned Catacylsm from which this game's code is derived. With complete control over the game's canonical code, his interests and priorities-realism by way of complexity-guide its development. Despite heated and endless debate in the game's broader community, one fact remains: It is Kevin's game. We just help make it.

Before a suggestion can even reach the Hand of Granade, it must filter up through an unstructured cohort of volunteers who judge any prospective change on its technical and thematic merits before a court of spectators who weigh in with emojis. It was here that my first attempt to contribute to the codebase petered out. (I failed to convince enough onlookers that large swords are two-handed as a function of length, not weight).

Between navigating the game's social dynamics, its gargantuan heap of C++ and JSON code, and the general know-how it takes to create and submit changes to an open-source project, the process of contributing as a novice can be as challenging as just playing the damn game. Eventually, after endless Q&A with a professional coder friend, a handful of false starts, and about a dozen hours of labor, I succeeded. The product, about two lines of code that took roughly 35 keystrokes, doesn't add any items or features but rather fixes a tiny cosmetic bug that rears its head only when you detonate a radio-controlled grenade. You'd never know my code was there if I didn't tell you. But it is, and I'm happy I spent the time write it and to learn how to put it there. And now that I've done it once, it seems like a shame to let all that experience languish.

Photo credit: Eric Limer
Photo credit: Eric Limer

And time, ultimately, is the thing. C:DDA feels too brilliant to be free, because it is: If it gets its hooks in you, you will pay dearly in time. Just as a poker game requires you to buy in with some cash, C:DDA requires you to buy in with a slice of your life.

First, there's the challenge of learning. With its myriad systems and bonkers controls, accomplishing even the most basic of tasks in game requires concerted self-training. In that way C:DDA is less like playing a game than it is like playing an instrument. If you're not well-versed in roguelike games, and even if you are, staying alive for several consecutive in-game days is an accomplishment that requires hours of real-life effort at the very least, hours that are disproportionately frustration over joy.

Photo credit: Eric Limer
Photo credit: Eric Limer

On the other side of this hump is where the game ultimately shines. Characters that survive for weeks or months in game will be with you for dozens of hours in front of the monitor, long enough to result in some startlingly deep bonds and a dreamlike sense of space. I can close my eyes and see Sunni Cunningham's woodland hideout because, in a manner of speaking, I lived there for weeks of my own life, making meals over her fire pit more often than over my stove, and thinking about her to-do list instead of mine as I drifted off to sleep.

Of course this will always already have ended in disaster. The game has no object other than to gamble too long and eventually lose. You'll get tired and sloppy and stupid and die to something that feels at once like contrived bullshit and also deeply your own fault. You'll curse at the screen and maybe even cheat to wind back time, but you'll regret it if you do.

Just like its ASCII graphics, C:DDA's inevitable gut-punches aren't a defect or by-product, they're an integral component: the crucible in which those hours of play are melted down and purified into a tiny golden nugget of story that will settle into the space behind your eyes. Yes, the process hurts, but as players of all the most punishingly worthwhile games will tell you: "Losing is fun." And if it somehow loses its luster? Time to jump behind the scenes and cook up some new ways to die.


If you're ready to give the game a shot yourself (and you should) download the automated launcher here to keep up with the latest experimental builds, explore the wonderful community subreddit here, bookmark the control guide on the C:DDA wiki, set aside a little time to take a few classes at Cataclysm University and, most of all, get ready to die.

('You Might Also Like',)