James Erwin, 37, works for a financial services firm in Des Moines, Iowa, writing software manuals. He’s been doing that for a couple of years, and he enjoys it. It’s a pretty low-stress job for a person with a methodical turn of mind—good pay, short commute. He’s home by 5:30 every night to spend time with his wife and 1-year-old son.

One Wednesday last August, Erwin rose from his desk around noon. He walked to the company lunchroom, microwaved a pretzel-bread Hot Pocket, and carried it back to his desk on a paper towel. He took a bite of the Hot Pocket and logged in to Reddit.com.

Reddit is a sprawling news site, where “news” is defined by its tens of millions of users—one of the largest communities on the Internet. Anyone can post a link or a comment, and everything on the site, down to the tiniest squib of text, wears a pair of clickable arrows—one up and one down. The site constructs itself on the fly by tabulating billions of “upvotes” and “downvotes.” Popular items rise, unpopular items fall. More reliably than Twitter, more scientifically than Facebook, Reddit answers this question: What do people on the Internet think is important, funny, cute, gross, uplifting—right now?

It’s common for random questions to appear on Reddit’s front page, like “Is there a magnet capable of pulling the iron out of your body?” or “What is the most awkward thing you could say to a cashier while purchasing condoms?” That day, as Erwin scanned Reddit, a question caught his eye. It was posed by someone calling themselves The_Quiet_Earth: “Could I destroy the entire Roman Empire during the reign of Augustus if I traveled back in time with a modern U.S. Marine infantry battalion or MEU [Marine Expeditionary Unit]?” Erwin clicked on the question and a lively comment thread unfurled. Hundreds of people were whipping hypotheticals back and forth, gaming out the implications of a marines-versus-Romans smackdown. What’s the range of a Roman spear? How would the Romans react to a helicopter? What would happen when the Americans ran out of bullets?

Erwin, who studied history at the University of Iowa, had been posting on Reddit for about five months. He used the alias Prufrock451, a dual reference to the schlubby protagonist of a T. S. Eliot poem and the Ray Bradbury novel Fahrenheit 451. Prufrock451’s contributions were all over the map. One day he wrote about the historical roots of the civil war in Liberia; another day he told a funny story about a shooting range in Iowa. He also uploaded a few pictures of European forts that he thought looked cool and a quote by Voltaire. In his atypicalness—Prufrock451 was pretty clearly a quirky character—he was entirely typical of a habitual Reddit user, and like many other redditors, as they are called, he found the site addictive. More than just a creative outlet or time-killer, Reddit was a game. The object was to amass points—”Reddit karma.” Every time Erwin saw his karma level increase, he felt a little squirt of adrenaline. “People are sweating to make you laugh or make you think or make you hate them,” Erwin says. “It’s the human condition, plus points.”

Now, in response to The_Quiet_Earth’s question about time-traveling marines, Erwin started typing. He posted his answer in a series of comments in the thread. Within an hour, he was an online celebrity. Within three hours, a film producer had reached out to him. Within two weeks, he was offered a deal to write a movie based on his Reddit comments. Within two months, he had taken a leave from his job to become a full-time Hollywood screenwriter.

Although Erwin’s success is unprecedented, it’s entirely consistent with Reddit’s ethos. The site was purposely built to make instant heroes of the funny and the artful. It was created in June 2005 by a pair of recent University of Virginia graduates, Alexis Ohanian and Steve Huffman. At first, Ohanian and Huffman didn’t have any users, so they made dozens of bogus accounts and posted content themselves. “We just wanted to create a place where you could find what was interesting online,” Ohanian says. “All Steve and I knew early on was that we were going to need a community to make it work.”

At that point, Ohanian’s only prior experience with community-building was a Quake clan that he ran in high school, “and maybe an EverQuest guild.” But he and Huffman knew what they liked—and hated—about other sites. They liked the content on geek-news site Slashdot. They liked the Popular page on the social-bookmarking site del.icio.us, even though the links themselves were often dull. They hated sites that assault you with animated ads or trick you into giving your email address. And they hated when site admins deleted stuff for no good reason.

The Post That Started It All Last August, James Erwin stumbled upon a question someone had posed on the social news site Reddit: “Could I destroy the entire Roman Empire during the reign of Augustus if I traveled back in time with a modern U.S. Marine infantry battalion or MEU?” Erwin’s answer, the first entry of which is reprinted below, delighted the Redditcommunity and almost instantly set Erwin on the path to becoming a Hollywood screenwriter. DAY 1 The 35th MEU is on the ground at Kabul, preparing to deploy to southern Afghanistan. Suddenly, it vanishes. The section of Bagram where the 35th was gathered suddenly reappears in a field outside Rome, on the west bank of the Tiber River. Without substantially prepared ground under it, the concrete begins sinking into the marshy ground and cracking. Colonel Miles Nelson orders his men to regroup near the vehicle depot—nearly all of the MEU’s vehicles are still stripped for air transport. He orders all helicopters airborne, believing the MEU is trapped in an earthquake. Nelson’s men soon report a complete loss of all communications, including GPS and satellite radio. Nelson now believes something more terrible has occurred—a nuclear war and EMP which has left his unit completely isolated. Only a few men have realized that the rest of Bagram has vanished, but that will soon become apparent as the transport helos begin circling the 35th’s location. Within an hour, the 2,200 Marines have regrouped, stunned. They are not the only moderns transported to Rome. With them are about 150 Air Force maintenance and repair specialists. There are about 60 Afghan Army soldiers, mostly the MEU’s interpreters and liaisons. There are also 15 U.S. civilian contractors and one man, Frank Delacroix, who has spoken to no one but Colonel Nelson. Miraculously, no one was killed during the earthquake but several dozen people were injured, some seriously. All fixed-wing aircraft and the attack helicopters were rendered inoperable by the shifting concrete, although the MEU did not lose a single vehicle or transport helicopter. As night falls, the MEU has established a perimeter. A few locals have been spotted, but in the chaos no one has yet established contact. Nelson and his men, who are crippled without mapping software and GPS to fix their position, begin attempting to fix their location by observing stars. The night is cloudy. Nelson orders four helicopters back into the air at first light, to travel along the river in hopes of locating a settlement.

Figuring, Ohanian says, that there was “a ceiling to how clever one admin can be, and it’s a pretty low ceiling,” he and his partner designed Reddit to put as much power as possible in the hands of its users. Huffman programmed a “hotness algorithm” to determine what should appear at the top of the page; users could sort links and comments by hotness, newness, and the number of upvotes minus downvotes. The scheme worked beautifully, sifting chaos into intelligible tiers. Ohanian and Huffman refused to delete any content that wasn’t spam or overt racism, even after they were purchased in 2006 by old-media publisher Condé Nast. (Yes, the corporation that owns Wired . Reddit’s office is sequestered in a corner of the same floor where the magazine and Wired.com are produced. The Reddit team did not have any influence over or access to this article.) Ohanian and Huffman also allowed users to create their own nooks within the site, called subreddits; there are now more than 100,000 subreddits devoted to everything from gaming to atheism to the city of Winnipeg. Extremely popular items bubble up from the subreddits. “You could be a brand-new user, and if you submitted something great, you could be on the front page,” Ohanian says. (The two founders have since cashed out, but Ohanian continues to serve on the board and acts as a spokesman.)

Yes, tons of stupid pictures appear on the front page, as well as in-jokes like “the narwhal bacons at midnight”—a sort of pass code used by redditors to identify other members of the faithful in real life—but the community’s ability to launch truly powerful memes is now a meme in itself. The best-known example is Comedy Central’s Rally to Restore Sanity and/or Fear, which drew 250,000 people to the National Mall in October 2010; the idea for the rally was first publicly proposed on Reddit. Last winter the Reddit community organized a boycott of web hosting company Go Daddy for its support of the Stop Online Piracy Act. After Go Daddy lost thousands of domains in a single day, the company quickly reversed its position.

Reddit users have also demonstrated an eagerness to experiment with ways of being nice. They have sent thousands of free pizzas to one another through a subreddit called Random_Acts_Of_Pizza. In 2009 a redditor proposed a Secret Santa gift exchange. Last holiday season, the exchange involved 40,000 people in 115 countries. There’s no other site where a shy idea can so easily snowball into a project of vast ambition.

Of course, like any site that thrives on pseudonymity, Reddit attracts its share of the sick and the deluded. There’s a subreddit, MensRights, “for people who believe that men are currently being disadvantaged by society,” and for years the site admins tolerated subreddits devoted to pictures of underage girls. (In February, Reddit banned sexual content involving minors.) Last year, redditors heaped abuse on a 21-year-old woman who was trying to raise money for kids with cancer. They mistakenly believed that she was a scammer, and one redditor claimed to have reported her to the FBI. “The mob mentality existed before Reddit,” Huffman says. “But now Reddit’s big enough to be a mob.”

James Erwin grew up in Cedar Rapids, Iowa, the son of a midwestern father and a Korean-born mother. (His father, who had been in the Air Force, met his mother during the Vietnam War.) “I had a cloudy idea of my future,” Erwin says of his childhood. “Part of me really wanted to be in front of people, and part of me wanted to hide in my room and read books all day.” In college in Iowa City, Erwin got involved with theater and open-mic nights. He lacked discipline and goals, but he had been clever enough to muddle through school without really studying. After graduating, he worked at an Arby’s, a burrito place, a couple of bookstores.

While bumming around, though, he was also running a website called Footnotes to History, an atlas of strange and tiny nations: Abaco, Abalonia, Abkhaz Republic (“The Abkhaz Republic suffered through a great deal more history than its short existence might seem to justify”). Several years and a couple of office jobs later, Erwin got it in his head that he should follow up Footnotes to History with an encyclopedia. In 2006 he published Declarations of Independence, a comprehensive account of American secessionist movements, from the Cherokee Nation to the Artists’ Republic of Fremont.

By that time he had moved to Des Moines to work a series of contract jobs. In 2009 he set to work on his second encyclopedia, which was just released this spring. Encyclopedia of U.S. Military Actions is exactly what it says it is—an exhaustive description of every single American war, quasi war, occupation, landing, and expedition. It comes in two volumes. If Erwin were to rest his chin on a table next to the manuscript, the 700,000-word stack would tower above his neatly shaved head. He completed it in just two and a half years, working evenings and weekends. It retails for $185. “Pound for pound,” he says, “it’s a pretty good buy.”

The encyclopedias proved that he had talent and erudition, but they didn’t bring him any attention—the buyers were mainly libraries—and barely earned him minimum wage. But writing the encyclopedias did teach him a crucial set of skills. He now knew how to mine history for tragedy and comedy. He could instantly recall huge swaths of fact. (Erwin competed on Jeopardy! in 2009, walking away a two-time champion and $23,598 richer.) Perhaps most important, he could compose large blocks of text with astonishing speed.

Last August, when he started to scroll through the Reddit thread about marines versus Romans, Erwin couldn’t help but think that the hypothetical deserved some kind of a larger story.

“DAY 1,” he typed:

The 35th MEU is on the ground at Kabul, preparing to deploy to southern Afghanistan. Suddenly, it vanishes.

The section of Bagram where the 35th was gathered suddenly reappears in a field outside Rome …

It took him just 10 minutes to write 350 words about the marines’ first day in ancient Rome. He clicked save. A few moments later, he refreshed his browser and saw that he had gotten a couple of upvotes. Then he thought about what to write next.

Erwin needed to invent a good reason for the two armies to fight. Unsurprisingly, he happened to have read a lot of Roman history, and he knew that around 23 BC, some senators had attempted a coup on emperor Augustus. What if, just as the senators were plotting, a small army appeared out of nowhere “with a vast array of what appears to be bizarre siege machinery”?

Erwin typed “DAY 2” and fleshed out another short scene, this one describing a marine recon mission over Rome in two Sea Knight helicopters: “Behind them, they leave a city in chaos, as terrified Romans flee the awful creatures in the sky.” He quickly moved on to Days 3 and 4, and as he wrote, his fingers and stomach began to tingle, a feeling he had gotten only a few times before, when he knew that what he was writing was very good. Something about the extreme economy of the prose made the narrative more vivid, not less; readers would be forced to fill in key details themselves, to imagine the sound of the helo rotors, the smell of smoke from the Roman pyres. Erwin rapidly sketched a cast of characters: a dour marine colonel, a Hispanic private who finds something “eerily familiar” about the language of the Romans, a frightened Praetorian commander. Each chapter ended on a little cliffhanger. Beyond merely answering the hypothetical, Erwin was creating a rich fictional world.

The Best & Worst of Reddit Discussions on the sprawling site run the gamut from the sublime to the slimy. Here’s a guide to the sections that can make your day, make you laugh … or make you want the past five minutes of your life back. IAMA Interesting people answer questions posed by the community. One day it’s astrophysicist Neal deGrasse Tyson, the next it’s a former hooker, the next it’s Louis C.K. PROJECT ENRICHMENT A new self-improvement challenge every week, from “Talk to 10 strangers” to “Read a book for 30-60 minutes every day” to “Floss every night” to “Go a week without visiting time-wasting sites.” SECRET SANTA Redditors love giving gifts to one another, especially handmade crafts, books, coffee mugs, and snacks. EARTHPORN A collection of gorgeous hi-res photos of “Mother Nature in all of her succulent beauty.” Who needs National Geographic? ADVICEANIMALS Users add captions to stock images of creatures that have come to be associated with specific mental states. There’s Socially Awkward Penguin, Insanity Wolf, Philosoraptor, Sexually Oblivious Rhino … ATHEISM Redditors aren’t much into religion, and OMG OMG OMG they won’t shut up about it. FFFFFFFUUUUUUUUUUUUUU Rants and riffs in the form of crude comics that are cobbled together from Reddit’s memes and visual signifiers. CIRCLEJERK A section devoted to satirizing Reddit’s greatest clichés: Ron Paul worship, videogame in-jokes, drug-law rants, pleas for upvotes. An exercise in meta that can make you feel like a jaded veteran redditor in seconds! SPACEDICKS A soul-scarring series of images, many with incongruous appendages Photoshopped onto them.

By the end of his lunch hour, he had gotten as far as Day 6, but he didn’t want to post all the entries at once; what if no one read them? So he posted Day 2, then returned to his work, taking screenshots of software buttons and labeling them.

The next time he checked Reddit, there were pages and pages of responses:

“MORE.”

“GO ON.”

“This is quite possibly the single greatest thing I have ever seen on reddit, write a book and I will buy it.”

“and then? C’mon man! Write faster!”

Erwin dribbled out his story over the course of the afternoon, switching back and forth between Reddit and work. Normally, a popular comment on a front-page thread might get 400 to 500 points, but by now each segment of Prufrock451’s story was racking up thousands of points. He was an instant Reddit celebrity. By the end of the day, his comment karma would nearly double, from 25,000 to over 40,000, and more than 250,000 people would view the thread. Whenever he reloaded the page he saw dozens of new replies.

“Good god,” one person wrote, “don’t stop, man.”

“HOLY F—-,” Erwin wrote in the thread. “WHAT THE HELL OKAY I’M WRITING AS FAST AS I CAN MORE COFFEE GOING GOING … OKAY BACK TO WRITING NOW.”

The world beyond Reddit began to take notice. Someone from the website Boing Boing contacted him, offering to repost the story. Wired writer Clive Thompson tweeted about the thread. It had been only a few hours since Erwin microwaved his Hot Pocket. He resisted the urge to stand up in his office in Des Moines and shout that he was famous on the Internet.

After proofing more of his lunch-hour prose, he posted the fifth and sixth installments. The marines and the Praetorian Guard were now at war. First contact had been disastrous; when 50 Praetorian riders approached the marines, looking to parley, the marines, itchy and strung-out, slaughtered 49 of them, leaving one survivor. Redditors begged Prufrock451 to continue. Erwin struggled to respond to the flood of comments without totally ignoring his work. A former marine gunner wrote in to point out alleged errors in “weapons, equipment, and tactics.” Several redditors asked where they could send their money, if that was what he needed to complete the tale. Had Prufrock451 considered a Kickstarter campaign? Could they send bitcoins?

Mid-afternoon, Erwin posted the seventh installment, then wrote a brief comment asking the Reddit community what he should do next. “Subreddit? Publish? Pass the torch?” He promised that he would do whatever the top-voted comment told him to do. An hour later, the top-voted comment by a wide margin read simply “QUIT JOB ENTERTAIN ME.” A user named tick_tock_clock suggested a name for a subreddit: RomeSweetRome. Erwin responded, “As much as I’d love to quit my job to finish this, that may be … impractical.” He was thinking of his family; he had a young child to help provide for and a mortgage to pay. What wasn’t impractical, he wrote, “is moving this over to r/RomeSweetRome, where I will continue writing this up … at a slightly less feverish pace. :)”

That same afternoon, August 31, while James Erwin was doing his best to keep the mob happy, a man in Beverly Hills named Adam Kolbrenner happened to be scanning Reddit. Kolbrenner, who at 37 is the same age as Erwin, runs a literary management and production company called Madhouse Entertainment. He represents writers and writer-directors, along with developing projects for film and TV. The Denzel Washington/Ryan Reynolds movie Safe House is a Madhouse project, and one of its clients scripted Contraband, starring Mark Wahlberg. What excited Kolbrenner about the Reddit thread wasn’t so much the idea as the writer. All it took to convince him of Erwin’s ability was the very first post—that first 350 words. “He can handle character and storytelling,” Kolbrenner says, “very, very difficult things to just be able to do.” Plus, he adds, “it got such an incredible response. I knew it was something special, because it wasn’t like he took three months to do this. This was quick quick quick, and it was all good.”

Kolbrenner had his assistant send Erwin a private message through Reddit. Erwin received it late in the afternoon his time, just before leaving the office. At 5 pm, Erwin’s wife, Jessica, a lawyer with Iowa Legal Aid, picked him up in her Subaru Outback. (She had driven him to work that morning.) By the time they collected their son at day care, one redditor had written that he would behead a kitten and mount its head on a pike if Prufrock451 didn’t finish the story “in some way shape or form.”

The next day, September 1, Erwin posted the eighth installment of the story, incorporating a line about water purifiers after receiving a suggestion from a reader. Erwin also spoke with Kolbrenner on the phone. Kolbrenner asked him if he felt comfortable writing a screenplay. Erwin said that he couldn’t guarantee that he could do it—he’d never written one before—but he was certainly willing to try. “Adam said, ‘I think you can,'” Erwin recalls. ” ‘We’ll teach you how to write a screenplay as we go along.'”

Erwin still couldn’t believe what was happening. “I had thought that, hey, I’ll post a story once or twice a week, and maybe I’ll put out a tip jar,” he says. “Obviously this is worth something. But I didn’t know what to do with it.” It hadn’t occurred to Erwin that he might be able to write movies full-time. Why would it? Before Reddit bullied and cajoled and cheered him to prove his talent, he had spent his life accumulating stores of obscure and unmarketable knowledge. But after talking with Kolbrenner, Erwin thought, “Maybe this wasn’t just lightning striking, but a door opening.” He signed on with Madhouse as a client.

Meanwhile, several thousand military buffs and sci-fi nerds had gathered at the RomeSweetRome subreddit, uploading story ideas, movie posters, logos, and fan fiction. When Erwin announced his decision to sign with Madhouse, the top-voted comment reflected Reddit’s skepticism of Hollywood, where nobody does anything for karma. It read, “Don’t get screwed,” and linked to a Wikipedia article on “Hollywood accounting.” Over the next week, momentum gathered toward a deal; Kolbrenner sent the Reddit thread link to an executive at Warner Bros., and a producer on 300 got in touch with Madhouse to say he wanted to be involved. Meanwhile, Madhouse urged Erwin to stop publishing on Reddit; the more of the story he gave away for free, the less valuable it would be to a studio.

On September 9, Erwin made a final announcement, thanking Reddit for its support. He said that he had made some tough decisions, and one of them was to stop posting on RomeSweetRome. In fact, although Erwin didn’t say this, he was planning to cease all posts, even about things not related to RomeSweetRome. His people in Hollywood had suggested he stay away from the site completely, just to be safe. So from now on, Erwin wouldn’t even be lurking on Reddit; he didn’t want to tempt himself. “We’re at the gate into the Real World, guys,” he wrote. “This story will continue. I will be back. In the meantime, I will be giving this my all. And I will remember when the narwhal bacons.”

Four days later, two weeks after that fateful lunch hour, Erwin learned that Warner Bros. had made an offer for him to write a treatment—a condensed version of a screenplay—and a first draft of a full screenplay. That evening, Erwin sat down with Jessica and outlined the dollar figures on a notepad. He handed her the pad. She looked down, then started to cry in joy and shock. Then Erwin started to cry. (Erwin won’t disclose what the deal is worth, but he is now a member of the Writers Guild of America, West, and the guild compensation for an original screenplay plus treatment for a movie with a budget above $5 million is $119,954. According to Kolbrenner, Rome Sweet Rome is “definitely a big-budget movie,” but whether that means $30 million or $150 million will depend on Erwin’s script.)

When Erwin announced on Reddit that the movie was really happening, most redditors chimed in with congratulations and encouragement. They took it as more proof of the power of Reddit: If the site could turn an Iowa dad into a Hollywood screenwriter almost overnight, what couldn’t it do? (As Erwin puts it, “Their upvotes had turned Pinocchio into a real boy.”) Still, a handful lashed out, angry that a story they loved—a story they felt they owned a part of—was being ripped away from them. Erwin had violated the cardinal rule of Reddit, which is that you sell yourself for points, for karma, not for money. Erwin understands that criticism, he explains one day in December. “I did sell out, as a matter of fact,” he says.

Erwin and Jessica live in a turn-of-the-century house with a salmon-painted dining room. The only visible sign of Erwin’s new life as a screenwriter is a small stack of “for your consideration” DVD screeners atop his TV, a perk of his Writers Guild membership. “I genuinely felt that this was the most awesome thing to do with the idea,” he says. “It could have been a story that maybe 10,000 people would have followed to its ending, and that would have been a lot of fun. But if this goes out, then 10,000 people are going to see it in one city in one day.”

After receiving the offer from Warner, Erwin took a leave from his job. In a spartan home office, surrounded by books like Greek and Roman Siege Machinery 399 B.C.-A.D. 363 and The Babyproofing Bible (he and Jessica are expecting their second child), he began writing a 30-page treatment, consulting with Madhouse and Warner on the direction the story should take. He submitted the final treatment in October. He can’t talk about how it differs from the scenario he posted on Reddit, but it’s clear that there are major changes. “There have already been a lot of compromises,” he says. “But a lot of the changes that have been suggested are for the better. Honestly, I haven’t been told, you know, throw in a sex scene.” (Kolbrenner says the movie is “going to be completely different—I don’t know if I should say that or not.”)

While awaiting feedback and further instructions from Warner, Erwin watched blockbuster movies to see if he could decode any common themes or techniques. “OK, I’m writing a movie for the masses,” he says. “OK, masses, what do you like?” He watched the Roland Emmerich end-of-the-world epic, 2012. “Christ, you like this?” he asks in mock horror. He’s also reading books about screenwriting—Robert McKee’s famous Story and a practical one by the screenwriting team of Thomas Lennon and Robert Ben Garant, who wrote the Night at the Museum movies. “The main lesson,” Erwin says, “is that if you basically see yourself as a contractor, you’ll be happy.” In January, Erwin moved on from the treatment to the Rome Sweet Rome screenplay proper.

Over drinks at a pub in downtown Des Moines, Erwin explains that he’s already thinking about movies beyond Rome Sweet Rome. He pitched about 30 ideas to Madhouse. Twenty-five were immediate noes. (One centered on an American soldier, an actual historical figure, who defected to the Mexican side during the Mexican-American War: “These are not, uh, profitable themes,” he says.) With four or five ideas, Madhouse said hmm. Erwin kept trying. He pitched another idea, a sci-fi plot, and “I finally hit one,” he says. “They’re like, OK, that is interesting … I’m not saying I’m a bona fide screenwriter now. But I have a second idea that somebody thinks could be sold to someone, somewhere. That’s more than most people ever get.”

Erwin is not a big drinker, and when he finishes his second microbrew, he says that he is more buzzed than he has been in a long time. The waitress comes by, and he grins and says, “Miller High Life.”

Miller High Life was his father’s beer. “You can’t beat a Miller High Life,” he says. His father was a construction estimator in Cedar Rapids. He was known to be the most accurate estimator in town; he never underbid only to inflate his numbers later. He died two years ago. Erwin says that he is thankful that his father got to meet Silas, his son. Erwin pauses a few times to collect himself. He says, “To have all these opportunities fall into my lap is just ridiculous.”

He takes a pull on his High Life. As much as he values his new community of agents and studio executives, he often finds himself wondering what’s happening in his old one. “I miss Reddit,” he says. “I miss Reddit so much.”

Jason Fagone (@jfagone) wrote about a videogame religion in issue 19.08.