Photo: HBO

Even though the pilot episode of The Leftovers was co-written by Tom Perrotta, the author of the 2011 novel the HBO series is based on, it departed from the source material in a few ways — most prominently, the transformation of our hero, Kevin Garvey (Justin Theroux), from small-town mayor to grizzled police chief. Perrotta didn’t write the second episode, but he had plenty of say in the writer’s room as showrunner Damon Lindelof and his team set about taking the show farther and farther away from his book. Vulture spoke with Perrotta about several serious divergences we noticed in last night’s episode, and he generously broke it all down for us — what’s changed, how, and why, and what The Karate Kid has to do with it.

As the episode opens, Holy Wayne’s compound is stormed by the Bureau of Alcohol, Tobacco, Firearms, Explosives, and Cults, and innocent young Tom winds up killing one of them. None of that’s in the book.

One of the huge changes overall is just the prevalence of violence in the show. We were looking for opportunities to make it less melancholy and more explosive. We were in the writer’s room for the first time (since the pilot), and when Damon said, “Tom shoots this guy,” I just said, “Nooo!” but I realized that’s not the right way to talk him out of something, because he loves getting a violent reaction from an audience. Tom becomes a very different character in the course of the show. I see it as this parallel-track thing. Once you deflect the character a little bit, by the time you get to the end, it’s way off from where we started.

Kevin’s department-ordered therapist refers to his dog-shooting partner as the Mystery Man, implying he might be a hallucination. There is a dog-shooting weirdo in the book, but he exists for only a couple of paragraphs. How did this character — and the feral-dog subplot — emerge?

I was telling Damon that there was a whole chapter I wrote [and later cut], in which Nora is on one of her bike rides on a path that I kind of thought of as [Nathaniel] Hawthorne’s woods — all kinds of weird stuff is going on there. At one point she thinks she sees the family dog, and wanders into the woods to find it. And I could just see Damon come alive. And suddenly these dogs became a crucial part of the story. That’s the kind of thing I was hoping for, actually. What would it mean to reimagine this book with a lot more time and just a whole other idea of how to tell a story?

The Guilty Remnant’s initiation rituals are wildly different than they were in the novel. Laurie asks her recruit, Megan, to chop fruitlessly at a tree with an small axe. I guess showing a PowerPoint presentation wouldn’t have made such great television?

You have to be sympathetic to the difficulty of representing a group that has taken a vow of silence. The axe idea emerged in the writers’ room. These writers are just steeped in popular culture and also apprenticeship and mentoring. This quickly led to a long discussion of The Karate Kid and “wax on, wax off.” And so what would a mentor do to teach patience? Waxing a car was almost too good — that was a constructive act. But this was just an absurd challenge.

In the book, we see Nora obsessing over SpongeBob SquarePants, which reminds her of her disappeared family. Here, we first learn about her troubles through subtler gestures — dropping a coffee cup for attention, keeping stale candy in her car. And she’s got a job, surveying grieving families receiving government compensation.

Again, it’s really hard to represent that character who’s just out riding her bike or writing in her notebook. This idea of Nora interviewing people in her situation turned out to be really inspired, I think. My initial feeling was, I don’t know, that’s so different from my Nora. But then it turned out to be a great way to get her out into the world and to also introduce the riddle of that character, which I think really becomes so important over the course of the season. It takes you a while to understand how traumatized she is.

Holy Wayne is much more front-and-center here. He’s also a very cut black British man, as opposed to the Wayne of the book — middle-aged, working-class, and, at least at the beginning, kind of a schlub.

One of the criticisms of my own work is it’s very white, and to HBO’s credit, they said, “We don’t want this to be a white-bread suburban world.” We saw a bunch of Waynes, and Paterson Joseph was just riveting. He sort of went against Wayne’s background, but we were like, “This guy is so good — he has the kind of charisma that we think someone like Wayne should have.” We asked him to try it with an American accent, which he dutifully did. But for some reason it wasn’t as compelling.

By the second half of this episode, we really start to wonder if Kevin is seriously unhinged. He’s certainly far angrier than your Kevin was.

Kevin in the book has a comic quality — there’s something comic about the nice guy in the apocalypse. But I think HBO’s feeling was the main character in an apocalyptic, dark cable drama was not going to be a nice guy with comic tendencies. So the concrete shift was: He becomes the chief of police. But the psychological component was: He becomes a much more tormented figure. He was essentially a peacemaker in the book rather than an adversary, and there’s much more drama in adversarial mode. These changes were really important in getting the script made as a pilot.

At the end of the episode, Kevin visits his father in a mental institution. The old man tells him, “They’re sending someone to help you,” and we’re left to think: the Mystery Man? A ghost? An alien? Suddenly we’re in the territory of Lindelof’s last show, Lost — metaphysical red herrings and such.

Let me just say that the defining creative tension with Damon has been exactly this issue. We both agree that there’s this big unexplainable event that, as far as we know, is supernatural. To me, this is the fundamental fact of religion — they all refer to this foundational supernatural act, but it was always a long time ago. And history is humans grinding out in the non-miraculous world. But Damon’s impulse is to say, well, I don’t know, the rules seem different now. And I can’t argue with that. The way we’ve resolved it up to now has been: These are all phenomena that could exist in our world — this guy has cracked under stress, he’s hearing voices, people have dreams that seem prophetic. All these things are phenomena that I can live with. But he seems to be pushing in that direction and I’m pulling in this direction. We tugged at it to the very last day.