The “Guardians of the Galaxy” director talks about the Twitter controversy that got him temporarily fired from Marvel, and his crossover to the DC franchise.One day in July 2018, James Gunn discovered that he was trending on Twitter and not for a good reason. Gunn, the filmmaker behind Marvel’s “Guardians of the Galaxy” science-fiction series, had tweeted many deliberately crude jokes about the Holocaust, the 9/11 attacks, AIDS, pedophilia and rape. Now they had been resurfaced, steering waves of criticism his way. Gunn was fired from a planned third “Guardians” movie and he believed his career was over. “It seemed like everything was gone,” he said recently.Gunn publicly apologized and his “Guardians” stars, including Chris Pratt and Zoe Saldana, rallied to his defense in an open letter. In March 2019, Gunn was hired back to the film franchise.Gunn had spent the months after his firing reflecting on himself while also working on an unexpected opportunity: Warner Bros. had tapped him to make a movie in its own superhero universe based on DC Comics characters. His entry, “The Suicide Squad,” which he wrote and directed, chronicles a motley team of criminals, including the marksman Bloodsport (Idris Elba) and the saboteur Harley Quinn (Margot Robbie), selected by the ruthless Amanda Waller (Viola Davis) to complete a seemingly impossible mission.“The Suicide Squad,” which will be released in theaters and on HBO Max on Aug. 6, follows the 2016 film “Suicide Squad,” written and directed by David Ayer, which was a commercial success but not well received by critics. Gunn’s take preserves the violence while adding further layers of outrageousness and absurd characters like the Polka-Dot Man (David Dastmalchian), the fish-human hybrid King Shark (voiced by Sylvester Stallone) and a malevolent alien starfish called Starro.As Gunn explained, “There’s a sort of magical realism that we come into this film with. Yes, it’s weird to see a walking shark. But it’s not as weird as it would be in our universe.”Gunn, whose credits include the low-budget genre satires “Slither” and “Super,” spoke in late June in a video interview from Vancouver, British Columbia, where he is working on “Peacemaker,” a TV spinoff of “The Suicide Squad” starring that jingoistic adventurer played by John Cena.The 54-year-old Gunn has let his spiky hair go white and grown a tidy accompanying beard, giving him a look that’s more mad scientist than industry upstart. But he remains chastened by his brief exile from Marvel. Speaking of “The Suicide Squad,” he said, “There’s dark humor in it, but the emotional part is there, too. I feel as if I was communicating my whole being.”Gunn discussed his firing and rehiring by Marvel, the making of “The Suicide Squad” for DC and his perspective on the two superhero franchises. These are edited excerpts from that conversation.Gunn with Idris Elba among the cast and crew of “The Suicide Squad.”Jessica Miglio/Warner Bros.How did you first learn that you had been fired from Marvel?It was conveyed to me by Kevin Feige [the Marvel Studios president]. I called Kevin the morning it was going on, and I said, “Is this a big deal?” And he goes, “I don’t know.” That was a moment. I was like, “You don’t know?” I was surprised. Later he called me — he himself was in shock — and told me what the powers that be had decided. It was unbelievable. And for a day, it seemed like everything was gone. Everything was gone. I was going to have to sell my house. I was never going to be able to work again. That’s what it felt like.Did the experience make you more careful about what you say, whether on social media or in general?Yes and no. I’m more considerate of people’s feelings today. I had talked about this a lot before those tweets were [resurfaced]. They are awful things, that’s what my sense of humor was back then. But before this ever happened, I realized that I had closed myself off to things I thought were schmaltzy because I didn’t want to be vulnerable. This attitude — I can make a joke about anything, look how great I am — that’s just not the fullness of me as a human being. And I learned that long before I got called out for the tweets.The term wasn’t as prevalent at the time, but do you think you were a victim of what people now call “cancel culture”?I understand people’s preoccupation with that term. But it’s such a bigger issue than that. Because cancel culture also is people like Harvey Weinstein, who should be canceled. People who have gotten canceled and then remain canceled — most of those people deserved that. The paparazzi are not just the people on the streets — they’re the people combing Twitter for any past sins. All of that sucks. It’s painful. But some of it is accountability. And that part of it is good. It’s just about finding that balance.When you see someone else now being punished for things they’ve posted online, are you sympathetic?Even when the person has done something terrible, I still feel sympathy for that person. Because I’m a compassionate person and it’s part of my faith. Sometimes things get taken out of context. And sometimes somebody did something when they were in college — it’s 20 years later, they’ve lived a great life, it’s just too much. And then sometimes you read, oh, well, what he did was pretty awful.When did you start to realize that things weren’t quite as dire? Did the public support of your “Guardians” actors make the difference?You do not understand the immensity of it until you’re in the middle of it. For a guy who feels like he’s done most things by himself and hasn’t had a lot of backing from anyone, ever, and has had to claw my way from B movies to where I am today, you don’t expect people to have your back. As somebody who does have a difficult time taking in the affection or the love of others, to have everybody around me — my girlfriend, my parents, my family, my manager, my publicists, all of the actors I’ve worked with — to have them come to my side and be there for me, that was an eye-opener for me. I felt really fulfilled and loved in a way that I had never felt in my entire life. And when Warner Bros. comes to me on the Monday after it happens and says, we want you, James Gunn, you think, wow, that feels good to hear.Asked about the nihilistic feel of “The Suicide Squad,” Gunn pushed back: “For me it’s about our changing world and people who have a very difficult time making connections being able to make some small connections.”Alana Paterson for The New York TimesSo while you’re in the midst of this potential scandal, Warner Bros. comes to you and asks if you might be interested in Superman, their flagship DC character?They proposed that to me. Toby Emmerich [the Warner Bros. Pictures Group chairman], he works out with my manager, and every morning he would say, “James Gunn, Superman. James Gunn, Superman.”How did you land on “The Suicide Squad” instead?At that time I said I can’t commit myself to something right now. It was traumatic. I had to deal with myself. I just have to take a step back. So I took the different possibilities of projects I could work on, and for a month, every day I worked on a different project. I really wanted to make sure that whatever I was going to write was going to be a great story, and if it worked out and I felt like directing it, I could. “Suicide Squad” was just the one that came to life immediately.Were you a fan of the comics?I really loved [the writer] John Ostrander’s take, which was taking these Z-grade villains and throwing them into black-ops situations where they were totally disposable and they wouldn’t come out alive. I loved “The Dirty Dozen” as a kid. It’s that same concept, mixed with a DC comic.How much were your choices defined by what you’d seen in the previous “Suicide Squad” film?Not at all. I wanted to create what I thought of as the Suicide Squad. For me to react to David’s movie would make it the shadow of David’s movie. I wanted it to be its own thing completely. When Warner Bros. said they wanted me to do this, I watched the first movie for the first time, and I called them back and said, what do I have to keep from this movie? And they said, nothing. They said, listen, we would love it if Margot’s in the movie but she doesn’t have to be. You could come up with all new characters or you could keep all the same characters.The previous film had a few big stars who aren’t returning. Did you explore bringing back Jared Leto as Joker or Will Smith as Deadshot?Joker, no. I just don’t know why Joker would be in the Suicide Squad. He wouldn’t be helpful in that type of war situation. Will — I really wanted to work with Idris. It is a multi-protagonist film. We go off for a while with Margot, and Daniela [Melchior, who plays Ratcatcher 2] is the heart of the film in a lot of ways. But if there’s one protagonist, it’s Idris. And I wanted somebody who had that gruff, “Unforgiven”-type feeling about him. This guy who had been reduced from being a bigshot supervillain — he took Superman out of the sky — who is now scraping gum off the floor at the beginning of the movie. He absolutely doesn’t want any part of it — he just has accepted this is his life. And I just think that character is Idris Elba.“The Suicide Squad” features a motley team culled from the DC universe, including Harley Quinn (Margot Robbie, second from right), all led by Rick Flag (Joel Kinnaman, center). Jessica Miglio/Warner Bros. This will be the third film, after “Suicide Squad” and “Birds of Prey,” to try to find a place for Harley Quinn in DC’s movie universe. How do you see the character?For me, Harley Quinn belongs on the wall next to Batman, Superman, Wonder Woman, Captain America, Spider-Man, Hulk. Most of my career has been writing characters who existed in the comics but weren’t well-defined personalities, and having to create their cinematic personalities, whether it’s Star-Lord or Drax or Groot, who were all very different in the comics. Harley was pretty incredibly written by Paul Dini from the beginning, and so to be able to capture the essence of that character — her chaotic, sweet nature — and give her her due as the trickster and allow her to go wherever she wants, was surprising even to me as a writer.Did you take a certain pleasure in bringing back Viola Davis as Amanda Waller and letting her get her hands as dirty as some of the superhero characters?She has no qualms about doing that whatsoever. She’s just the sweetest person in the world and Waller is scary. When she’s on set and that turn happens, I am literally afraid to come in and give her a note because of the look in her eyes. It is incredibly intimidating. She comes up to here [holds hand at height of his neck] on me. But it is. She’s amazing.There’s a built-in dispensability to your concept of “The Suicide Squad” that cuts against a studio’s desire for repeatable franchise films. Was it your goal to make the most nihilistic superhero movie of the modern era?I don’t think it’s nihilistic. For me it’s about our changing world and people who have a very difficult time making connections being able to make some small connections. My mission statement was just to make the most fun film I could and not balk at anything. I knew I had a chance that very few filmmakers have ever had, which is to make a huge-budget film with no holds barred in terms of the plot, the effects, the sets. I felt a responsibility to take chances.What if, after a yearlong pandemic, mass audiences aren’t ready for a movie with so much wanton death and destruction?I actually think the emotion and the humor help to even off the harsher aspects of it. I think it’s a perfect movie for now. It’s just a matter of where are we going to be with Covid and being safe. [“F9”] did great, so I’m hopeful there’s a real appetite for it. I was talking to my 80-year-old mother this morning. She wants to come see it. I’m like, Mom, this movie has a lot of sharks ripping people in half in it. [Gentle voice] “I know, I don’t care, Jimmy.” She’ll love it.Does it seem strange that the DC films can encompass movies like “The Suicide Squad,” which unabashedly earns its R rating, and also movies like “Shazam!,” which are more family-oriented?I think it’s great. That is the one of the ways in which DC can distinguish itself from Marvel. What I do is very different from what [the “Ant-Man” director] Peyton Reed does, it’s very different from what [the “Iron Man” director Jon] Favreau did, it’s different from Taika [Waititi, the director of “Thor: Ragnarok”]. But not as different as “Shazam!” and “Suicide Squad,” however. I think the current batch of folks over at Warner Bros. are really interested in building out a world and creating something that’s unique to the filmmakers. We’re in a strange time, so anything can happen.Gunn with Michael Rooker (as the blue-skinned Yondu) on the set of “Guardians of the Galaxy Vol. 2.”Chuck Zlotnick/Marvel/DisneyYou’re the first director who’s made films for both Marvel and DC —[Fake cough] Joss Whedon. I’m the first one to receive a directing credit on the Marvel and DC movies. [Laughs.]Do you see major differences with how Marvel and DC approach their film franchises?Yes, but not as many as people probably think. There’s no doubt Kevin Feige is way more involved with editing than people are at Warner Bros. He gives more notes. You don’t have to take them and I don’t always take them. Then again, I had more problems. If you saw the first cut of “Guardians” 1, it had more problems, because that was my first time making something so gigantic and there’s some learning to what works and what doesn’t, carving away the excess stuff. The truth is, as Marvel goes on and Kevin Feige starts to amass ownership of half of all film in general, he’s more spread out.Are you free to make more films for DC going forward or are you exclusive to Marvel?I have no clue what I’m going to do. For me, “Guardians 3” is probably the last one. I don’t know about doing it again. I do find, because of the ability to do different stuff in the DC multiverse, it’s fun. They’re starting to really resemble their comic books. The Marvel Universe has always been a little more cohesive, and DC has always had more great single runs. They had The Dark Knight Returns. They had Watchmen. They had The Killing Joke. They had Alan Moore’s Swamp Thing. The fact that they did “Joker,” which is a totally different type of movie, that to me is cool. I’m very excited about Matt’s movie [“The Batman,” from Matt Reeves]. They’re getting some really good filmmakers involved. They’re always going to be hit or miss — I just don’t want them to get boring.You got your start in the world of low-budget cinema. Do you think you might return to something that’s smaller and faster to make?I love toys and the explosions and the cameras, frankly. I love to be able to work on a big playing field. If I had a smaller, more intimate thing that I wanted to do, I would definitely do that. Right now I really just want to nap, but I still have another major motion picture to make before that. I can’t wait to see the Marvel gang again — those people are my family. It’s so much different than people on Twitter. Everybody is significantly nicer. More