I t’s been a rough year at the movies for DC Comics. Batman v Superman: Dawn of Justice and Suicide Squad opened to abysmal reviews, leaving DC parent company Warner Bros. scrambling to figure out a new strategy for the cineplex. But that kind of panic is absent on the small screen, where DC superheroes are actually having a particularly vital moment, thanks largely to producer Greg Berlanti.

How did it happen? While DC’s films tend to be sludge-heavy epics filled with murder and overcooked pathos, the superhero shows in the so-called Berlantiverse quartet (Arrow, The Flash, Supergirl, and Legends of Tomorrow) airing on the CW are built on peppy banter, buoyant action, and will-they-or-won’t-they sex appeal. Simply put, Berlanti’s shows are fun in a way that DC’s movies aren’t. Here, the 44-year-old explains his approach.

Critics of DC’s recent movies have said they’re too dark, which isn’t something anyone is likely to say about your shows.

Hope and optimism have always been a part of who these characters are. They’re beacons of hope in scary times, and that’s perhaps why they’re resonating again. It’s an uncertain era, and there’s a certitude about these characters. A big part of that is that they see a better outcome.

Is that part of what makes superhero stories unique?

They’re aspirational stories that are a fusion of different elements. But in a particular moment they can be anything. Some days on The Flash, we’re making a family show, and there are other days where we’re making a crime show. Then, in the next hour, the whole cast might have to turn around and do a huge visual-effects sequence, and then in the next hour, they’ll have to turn around and do something comedic. At the same time, they’re really grounded in basic truths of, Can you overcome? What does it take?

Photo: Nathaniel Wood

Is TV just a better medium than movies for what you believe superhero stories do best?

TV lends itself a bit more to comic books. Comics are ongoing. You get these twists and turns in the narrative and go deeper in smaller moments into these characters’ lives. You don’t have to keep a high-octane train moving at all times. I think one of the joys of television in general, versus film, is that things get to settle. TV’s job is to make you lean in, and a film’s job is to make you lean back.

What comic books did you read growing up?

I read some Marvel, but I was more of a DC guy. Particularly the Flash, Barry Allen.1 I latched on to him because I felt like him. You thought to yourself, Well, you can’t really be Superman. You couldn’t really be Batman — Batman was a really dark figure. I identified with Barry Allen’s hopefulness.

Were there things about superhero comics that spoke to you as a gay teen?

They were people who were hiding in plain sight. I was so closed off to that part of myself then. I didn’t happen to be one of those gay kids who knew definitively by the time I was 13. I was having a weird amalgamation of emotions, and I identified with a lot of outsider characters. In retrospect, it’s very easy for me to look at it now and go, Oh, it’s because they had this burden of feeling alone. I don’t think people realize the extent to which there was no gay representation then. If you were a kid, there was nothing. People don’t understand, culturally, how it felt. And so here you had these characters who are told they’re special because they’re different, and it’s empowering.

Your shows are far more hopeful and romantic than anything in superhero film or even in most superhero comics. Does that come from those feelings you had as a kid?

I liked a lot of the unspoken stuff. I would imagine, There’s gotta be some heat that’s passing between Wonder Woman and Superman. He’s in love with Lois Lane, but he and Wonder Woman are out there working together! You start to think about those complications.

You were seeing things that weren’t necessarily explicit.

Every now and then, someone would make them explicit, and you’d be like, That’s what I was thinking!

You got into Barry Allen right around when DC killed him off in a big crossover event.

It was his death2 that drew me to him. I think it was a pivotal moment, realizing how much I connected with the characters. I didn’t expect him to die; I didn’t think you did that in comic books. Supergirl actually died3 at the same time. But I had a less emotional response to that.

A lot of filmmakers talk about how the mid-’80s period of DC Comics4influenced them, but they usually cite the two famously dark works of that era, The Dark Knight Returns5 and Watchmen.6 Did that stuff have an impact on you?

It didn’t. All my friends were collecting Dark Knight at the time and talking about it and starting to talk about Watchmen, and I was into the Marv Wolfman7 stuff. I was also starting to discover storytelling and writing, and I loved the labyrinthine connective tissue between everything. You really felt like you were in a world. And I didn’t know if we’d be able to do that in the shows. When we started to go there with Arrow8 and Flash9 crossing over, it was rewarding. Just as a viewer, I felt like, That’s what it felt like when I read the comic book. I wasn’t sure if I would have that same feeling. If you would feel like the worlds could cross and it wouldn’t damage either of them, it would just make both of them feel larger.

Were there worlds like that on television that you enjoyed? Places where crossovers and complex universes existed?

The Six Million Dollar Man and The Bionic Woman. Someone pointed out in the room the other day that, in terms of epic crossovers that don’t get enough conversation, there’s the Magnum, P.I.–Murder, She Wrote crossover.10 That exists! I remember getting very excited.

What did you want to do differently with Arrow compared to what had been done in past superhero TV shows?

Homeland had just come out at the time, and thank God it did, because we referenced it a lot in our conversations with the studio and the network. There was this guy who disappeared and comes back and was clearly tortured both physically and mentally. There was that sense of, Is he good? Is he bad? He’s still trying to figure it out. What happened to him there? What’s happening to him now? All of that mystery that surrounded him was something that was really intriguing to us.

Plus, Stephen Amell,11 your lead, was incredibly hot. Your shows’ sexual perspective is pretty interesting in general: The men are the eye candy much more than the women. Amell spends like half of any given episode topless.

I know. I will say there are so many other, straight people involved in this that you could credit for that over me. We actually never saw what [Amell] looked like underneath his shirt when we cast him. It wasn’t until he started working out for the part and sending us videos while he was training that we said, “Oh, he can do the salmon ladder.12 Put that in.” When I see stuff like that in the dailies, I’m not afraid of it. There was the boy in me that loved comic books who loved some of those scenes in that for the superhero-ness, and then there was the person in me who didn’t mind having a hot guy doing the salmon ladder.

What was your first superhero project? Was there something early on that never came to fruition?

I kept telling people in the industry that I loved comic books as a kid when Iron Man13hadn’t been made yet. I pitched on that.

You pitched an Iron Man movie?

I did, yeah. Somewhere around 2005.

What was your pitch?

There was that movie with Nic Cage where he’s a gunrunner. Lord of War.14 Marvel wanted that feeling. Tony [Stark] was an alcoholic in it by then. My pitch certainly wasn’t as good as the eventual film. So everyone made the right choice. My agents at the time were like, “You like comic books?” And so then I pitched Warner Bros. on Green Lantern.15

I read your original script for Green Lantern and was struck by how wildly different it is from the very grim direction the DC film universe has since gone in. What were you and your co-writers going for?

We talked a lot about Top Gun meets a space opera.

But things didn’t go well for that script. The eventual movie warped it pretty insanely out of shape and the movie flopped. What did you learn from the Green Lantern experience?

That I would rather make my own mistakes and learn from them than have other people take the material. If you’re not executing it, if you’re not there, not everybody can know what’s in your head. The devil is in the details, whether it’s in a piece of casting or whether it’s an action scene being representative of the character. So when I eventually got back to Warner Bros. after Green Lantern, they said, “Well, you’ve worked on DC material before. Do you want to make a DC show?” I was hesitant.

Photographs by Photo: Nathaniel Wood

Your first superhero property is one most people have forgotten, No Ordinary Family16 on ABC. You’ve called it a learning experience.

The lesson was not to change the DNA of what you promise to the audience, even if the network goes, “We don’t want that.” [ABC] didn’t want superpowered villains. They wanted Bewitched with powers, if you can imagine. And I wanted to make a superhero show! Another lesson was: Visual effects in a superhero show on a TV budget executed on TV production time was not a threshold we were ready to cross. We just didn’t have the science. It wasn’t until Flash that enough advancements in technology for TV had happened. Not that we are at a cinematic level, necessarily, but with Flash, his powers are a big part of why you enjoy him. Twenty-five percent of the show is animated. Sometimes it takes from that moment we start writing the story to two days before it airs to complete a given visual-effects sequence. I didn’t know how to do that when we were doing No Ordinary Family.

We live in this era of the television hyperproducer who oversees an empire of shows. Shonda Rhimes’s is the main name thrown around in discussions about that phenomenon, but you’re another one of those folks. How do you, specifically with the DC shows, make sure that all these similar and sometimes-interlocking17stories sync up?

I’m in each of the story rooms every day. I go through each of the shows. There are things I miss, but there’s me, the showrunners are talking to each other, then the studio executives, and then the network executives. Four different groups are giving notes, so if I miss something, someone will catch it. That being said, we still make those mistakes. When you start incorporating time travel or parallel universes …

To what extent are the comics R&D for the TV and movie properties? Does DC Comics president Geoff Johns come to you and say, “Hey, here’s something we tried out in a comic. Let’s try it here”?

Sometimes, or he has other executives mention that to us. They said to us a year and a half before they started developing Suicide Squad, “Will you guys put [a version of] the Suicide Squad in your show? Because we want to have it as a film at some point.” It also happened with Geoff when Geoff and Andrew [Kreisberg] and I were creating Flash.They were both really huge fans of Cisco Ramon, [also known as] Vibe,18 and had written a Vibe comic [in 2013] to try and bring him back. They said, “Could we please have Vibe on the show?”

Do you pay much attention to what Marvel’s doing?

We talk about how they show a superpower. For instance, we were in the middle of postproduction on Flash when Bryan Singer did that sequence with Quicksilver.19 We were talking about that in terms of our version of Flash.

When you were developing Supergirl20 and you were saying, “We want Jimmy Olsen to be black,” was there anyone in the room going “Hmm”?

People go, “Do you want to do it just to do it?” You think the answer to that should be “Yeah,” but truthfully, we saw Mehcad Brooks21 in the part. It was colorblind casting. We were auditioning white dudes, too, but he won it in the room. I remember picking up the phone and calling [Warner Bros. Television president] Peter Roth and saying, “You’re going to see this guy Mehcad, he’s Jimmy Olsen. He happens to not be white.” He was like, “Wow, that’s new.”

When did you realize that racial representation was important to you?

On Everwood,22 we had an interracial relationship. But it’s been since we started doing superhero shows. We created Diggle23 with that reason in mind. Now we’re trying to add more LGBT characters. Diversity is a vital part of the show — and it’s important behind the camera, too. This is the first season where 50 percent of Arrow’s episodes will be directed by people who are not white men.

In your years in the business, have you seen a change in the degree to which executives push back on casting nonwhites as leads?

Absolutely. Thank God. It’s one of the most striking changes of the last ten years. I wouldn’t put a show up of all white people, but people were doing that six or seven years ago. You see that now and you’re like, “That’s the Republican convention. That’s not America.”

*This article appears in the September 5, 2016 issue of New York Magazine.