A Dark Room starts with a few lines of text on a black screen: “the fire is dead. the room is cold. awake. head throbbing. vision blurry.” A bright-blue line cuts across the center of the screen, just below the words “stoke fire.” You press the words and suddenly the screen turns white. More text arrives: a ragged stranger has stumbled through the door. You keep stoking the fire, the thin blue bar disappearing and then slowly filling itself out again each time to signal when you’ll be able to press the “stoke fire” button again.

What follows is a strange hybrid, part mystery story and part smartphone productivity software, an app that inexplicably rocketed to the most-downloaded spot in the App Store’s games section in April and stayed there throughout the month. A product of a collaboration between two men who worked together without ever having met in person, the game evokes the simplest text-based computer games of the nineteen-seventies while stimulating a very modern impulse to constantly check and recheck one’s phone. It’s like a puzzle composed of deconstructed to-do lists.

After stoking the fire a few more times, you have a new option: collect wood, which can be used to build a cart. Once a cart is built, you can make traps and set them in the surrounding forest, and soon you’re collecting cloth and furs, which can be used to build more huts to attract others to join your small enclave, allowing for the collection of even more fur and meat. You can begin to see a structure emerge from the fragments, but where that structure will lead you remains impossible to predict, and so the compulsion to keep pressing little word buttons grows stronger.

Originally created by Michael Townsend in May of 2013, A Dark Room was designed to run in Web browsers and meant to be left running in an open window throughout the day. “When I saw Michael’s creation, it was just really good timing,” Amir Rajan, Townsend’s eventual development partner, told me. Rajan had recently left his job as a software engineer in Dallas, Texas, hoping to build a more personally gratifying career with his own work. “I was building a budgeting app in my spare time and had made quite a few iOS apps that will never see the light of day,” Rajan said. “But when I saw A Dark Room, I thought this could really be meaningful to bring to the App Store.”

Rajan e-mailed Townsend, who lived one thousand six hundred miles away, in Ottawa, Canada, and asked for permission to adapt the game for iPhones and iPads. A working programmer by day and a game-design hobbyist by night, Townsend was happy to share his work with Rajan. “I want to kindle the creative spirit in others,” Townsend told me over e-mail. “My games are open-source because I want people to learn from them, or use them to build their own things.”

When A Dark Room was first released on iPhone, at the end of 2013, the game was listed in a number of Best of the Year lists, including those published by Forbes, Paste, and the influential gaming site Giant Bomb, but it remained a relatively modest seller. “I thought if I could just get one per cent of the people who had played the Web version of the game, that would be great,” Rajan told me, recounting the enthusiastic reception that the Web version had received from major gaming sites like IGN and Kotaku. “I think we got eight downloads the first day. I checked again the day after we’d been mentioned on Giant Bomb and we’d only gotten eighty downloads.”

A Dark Room continued on with these modest figures for five months, eventually reaching a thousand downloads a month at ninety-nine cents each—“nice mailbox money,” as Rajan described it, but nothing more than that. Then, one day in early spring, Rajan decided to check the U.K. App Store charts on a whim and noticed that the game had been downloaded three hundred times in a single day. He thought it was an anomaly, maybe because of a school holiday, but the next day that figure shot to eight hundred, and a few days later the game had become the most downloaded game in the U.K. App Store. Soon after, the game began climbing the ranks of the U.S. App Store, reaching the top spot for all downloads on April 12th and staying there for the rest of the month. “I have no idea why it happened,” Rajan admitted. “All this was an accident.”

* * * The improbable best-seller is a variation on primordial text adventures like Colossal Cave Adventure and Zork, which helped widen the scope of video games in the nineteen-seventies. Like its forerunners, the game uses words to describe everything that’s happening, transforming language into a landscape that’s only ever visible in isolated pieces that the player must decipher. Townsend says, “I originally wrote A Dark Room to tell its story entirely through environmental cues—no exposition, no dialogue, nothing.”

The game’s ever-expanding scope and regular demands for micro-managing resources create an enthralling parallax effect that can keep devoted players dosed, for hours, on the pleasurable sense of immersion that the psychologist Mihály Csíkszentmihályi calls “flow.” The longer you play, the more complicated the game’s gathering and building tools become, with each incremental addition widening the game’s scope, while introducing unsettling hints about what it all could mean. Why do you sometimes find cloth caught in your traps? And why does the game suddenly start calling the few workers who’ve come to help you slaves?

“Environmental storytelling works well for games because it gives the player the feeling that they are constructing the narrative, even if they’re only discovering it,” Townsend says. “It works particularly well for ‘idle games’ due to their expanding nature. Instead of handing out a bit of exposition as a reward for progress, simply expanding the scope of the world gives players access to new pieces to fit into their narrative puzzle.”

There has been a resurgent interest in text games in recent years. A Dark Room was itself inspired by another Web-browser-based game, Candy Box, which was developed by an eighteen-year-old French student and is based on a similar structure of managing resources that accrue over time. Likewise, many of the most intimate and ambitious games of the past several years have taken the form of text games, including Anna Anthropy’s “dating sim” Encyclopedia Fuckme and the Case of the Vanishing Entree, Zoe Quinn’s Depression Quest, Christine Love’s Digital: A Love Story, and Porpentine’s Howling Dogs. Simultaneously, a new group of simple tools for making text games, like Twine, Quest, and ADRIFT, have helped encourage fans to try and build their own games.

Like A Dark Room, these language games draw on a tradition of using language patterns as a form of play that precedes computers by thousands of years, something to which more recent video games remain indebted. In her book “Critical Play,” the artist and game designer Mary Flanagan points to the Roman Empire’s Sator-Rotas rebus as one of the oldest known examples of a language game. The piece is a palindromic square that spells the same word—“sator”—across and downward, with a number of different letter combinations emerging throughout the square. Some people think that it was a cryptic political code; others suggest that it has some connection to early Christianity. But its enduring fascination, for everyone, comes from the tension between its obvious patterns and the interpretative possibilities that one can see.