Last year when director Justin Lin’s Star Trek Beyond was filming in Vancouver, I got to visit the set with a few other reporters. While almost everyone we spoke to was careful not to reveal too much about the upcoming movie, the one person that actually gave us some solid information was Simon Pegg. Of course it probably helped that he co-wrote the script with Doug Jung.

During the interview Pegg revealed how he came to be one of the writers on the sequel, what they wanted to accomplish with the sequel and what they wanted to avoid, the difference between Star Wars and Star Trek, what it was like to collaborate with Justin Lin, moving away from the bromance of Kirk and Spock and focusing more on the crew and new relationships, Idris Elba’s character, the tone of the film and how they’re not making Galaxy Quest, and a lot more. Check out what he had to say below. Star Trek Beyond opens July 22.

Question: Talk about coming in to write this movie but also being an actor in it.

SIMON PEGG: Yeah, it was something that kind of came up at the end of the year when I was finishing on — actually, no, the middle of Rogue Nation. Bryan Burke, who was the producer on that movie and on the previous two Star Treks, and Star Wars as well, we were talking about — he was saying they were thinking of Blue Sky-ing the screenplay and going in a different direction. We just talked about it a lot on set, and then he pulled me aside one day and just said, “Do you want to write it?” Co-writer sort of thing.

And I just said, “Okay?” thinking it wouldn’t be difficult. No, I didn’t. I knew it would be difficult, but for some reason I just sort of said, “Yes,” and that was it. Then in January we all met. I never read Bob’s script, and neither did Doug. We met in a hotel in London with Justin, and we started to hash out ideas. I went to LA, and we started out in a room full of, at Bad Robot, it’s just got white boards around the room, just blank white boards — which was a terrifying thing to see. And then we just filmed them and went through so many iterations and story ideas. Eventually, we began to hone in on what we have now, and it was a very accelerated, intense process — and a difficult one, because it’s very difficult to write a film in preproduction, because every idea you have they want to build or design, and it might not be a good idea. Sometimes you don’t have the time to go, “Wait a minute, that’s not a good idea. Don’t build that.”

So every idea we had had to be kind of good. [Laughs] So it’s not easy. And then we finally got to begin shooting with a full script but knowing that every single scene was kind of up for grabs in terms of finessing the dialogue and certain character aspects. As long as we had all the sets, the shape of it, everything the production needed to go into shooting, then once we had the schedule prioritizing certain scenes and going back to them and seeing — also, we got all the casting on it, and we sent an email out to the cast whenever we got here saying, “Look. Look at your character. If you have any feelings or any kind of impulses, you know them better than we do. Let us know.” And that’s been really helpful. And it’s been great to be part of both sides of it in a way. I’m here most days anyway when I’m not shooting, because I’m with Doug.

You’ve always got to look out for things that change along the way anyway, and little things come up. Little character quirks come up, and we have the freedom to be able to deal with that. So yeah, it’s been extraordinary. It was amazing to get here and suddenly start seeing the various props and sets, and it really hit home what we’d done, that we’d actually written a Star Trek film, and there were things that we invented that they built. We actually went out to the Memory Alpha guys, the two founders of the Memory Alpha wiki and asked them to name something for us. There’s a specific thing in the screenplay that we wanted to get a name for, and so I just wrote out an email that said, “Hey guys, there’s this thing, and I can’t tell you what it’s for, but there’s this item,” and three hours later I got a full etymological breakdown of the word and the history of the thing. So they’re going to be in the credits, thanked, for that.

One is hard-pressed to think of another film franchise with the limitless potential of this one, just by the nature of being Star Trek. Where do you begin in terms of conceiving this story? Was there any kind of list of things you guys definitely wanted to have or avoid?

PEGG: Yeah. Well, we felt like the first two films, chronologically take place before the five-year mission. Obviously, as we’ve said with this one, we wanted it to be, certainly, about them on that five-year mission — in fact, two years into that five-year mission and have that impacted on them personally and what it meant to be out in space for that long. We liked the idea of, also, on the 50th anniversary, looking at Roddenberry’s vision and questioning it — you know, the whole notion of the Federation and whether it’s a good thing or a bad thing, or how productive is inclusivity. What is the true cost of expansion, that kind of stuff. So we went in with some big, philosophical questions to ask. You know, Star Trek’s had to evolve in order to exist in the current marketplace. A film that was totally in the mood of the original series would not be made today or make money today, because people want event cinema. They want things to be a little more brash and action-oriented, so we’ve had to fold that into the Star Trek brand. But at the same time, that doesn’t mean that can’t be fundamentalized by all the tenants of what Star Trek is and how all of those characters have evolved over the years and to really give its DNA an authenticity. So that’s been a really interesting thing, and that’s something we really wanted to do. So Doug and I would always, at the end of a day’s — when we were really happy at the end of day’s writing, we’d sit and watch a couple of episodes of the original series — just for fun, not to get ideas. A couple of things like, it’s always good to get names from the original series, like dead Red Shirts. I have a list of dead Red Shirts on my phone somewhere, just so that those same people exist in the universe. But this is our universe. It belongs to us now. J.J. very cleverly was able to establish the story again without damaging or affecting what went before, and it’s ours now. Anything can happen. Anyone can die. It’s not the same events.

Where the first two films did reference the original series of the films, will this do that at all, or is it now where you’re finally past when you had to reference them?

PEGG: I mean, there’ll be things in there for every Star Trek fan. It is the same world, so some of the points of reference will be the same. But they are off in a part of the galaxy that they’ve never been before. They’re far away from the usual suspects, I think. As such, it’s not them meeting up with an old adversary or someone they’ve met before. And we toyed with that. You look at the great episodes and think, “Oh, why don’t we do ‘Mirror, Mirror’? Or why don’t we do ‘Arena’?” But, you know, that was Galaxy Quest, so that’s off the table. [Laughs]

So unlike the previous film, which took a lot of its story beats from Wrath of Khan, this is a completely fresh narrative?

PEGG: Yes.

J.J., when he made the original Star Trek, he said he made it like Star Wars, because that’s what he knew and loved. Now that Star Wars is happening, how do you make Star Trek something different than that?

PEGG: Yeah, I think it’s interesting when you look at the original Star Trek, because it is about an idealistic young farm boy who goes off to fight in outer space. There are similar beats in it. It’s no secret that J.J. was always more of a Star Wars fan. I think you just try to create a hybrid. You know, Star Wars is science fantasy, and Star Trek is science fiction, and they’re two different things. People often confuse Star Wars and Star Trek — and they’re not the same thing at all. It’s a bizarre and wonderful thing that you can be in Bad Robot now and hear Chewbacca in one room and someone talking about Spock in the other, but they are still very, very different things. I think what you have to maintain with Star Trek is that it’s rooted somewhere in our reality and our universe and in humanity. Star Wars is a long time ago in a galaxy far, far away. The thing that makes that Star Trek kind of more science fantasy is that it does get — you know, there’s a lot of special effects and fighting. Star Trek could never really afford that in a way, which is why it had to concentrate on other aspects of production. We can do both now. So I think it’s kind of finding a way of having that really fun, spectacular event cinema but grounding it in kind of a — because explosions don’t mean a damn thing if you don’t care about who’s involved in the explosions. You can see the most incredible fireworks on a cinema screen, but if you don’t fundamentally care about the people who are in jeopardy, then they’re so unimpressive. You see it time and time again these days.

Talk about what was more challenging: coming up with those fireworks scenes, trying to one up the previous two films, or coming up with great character moments in an elevator or a hallway.

PEGG: Yeah. Justin Lin is a really, really smart filmmaker in terms of his awareness of motion and how to stage action. It just impresses me every day. And there’s nothing fancy or extraneous with what he does. Everything tells a story. As such, when it comes to choreographing the bigger action things, we’re able to say, “This happens,” and Justin will be able to turn it into something magical. And he’s had a huge say in terms of the way the story has moved as well. Sometimes he’s gone, “Look, I really want to do this bit here,” and Doug and I have gone, “Okay,” and we’ve fed that into the story. So I really love doing all the small stuff, all the character stuff, the lighthearted stuff obviously, but also the emotional stuff. And then Justin, when it comes to an action set piece or whatever, we kind of hand it over to Justin, and he’ll design most of it, and then we’ll feed the dialogue into that.

Is there a particular character dynamic you were really eager to explore?

PEGG: Yeah, I felt like the Kirk/Spock thing, we’d done that now and, arguably, maybe too soon, in a way. There’s still a lot of time for those guys to become super-friends, and maybe we’ll do that further down the line if we do more. I felt like maybe now it was time to move away from this kind of bromance thing and concentrate on the idea of the crew as a kind of family living in a small space together and what it means to all of them. I really love the dynamic between Bones and Spock, so that’s something we’ve concentrated on a little bit with this one. Kirk’s own sort of — you know, he’s older than his dad was now when he died, and all that kind of stuff that’s playing on him. Scotty’s still just Scotty.

[Laughs] Scotty as a character, he’s, outside of Spock, one of the few who gets to have really good one-to-ones with Kirk. Can you talk about how Scotty’s dynamic with Kirk is evolving in this film?

PEGG: Yeah, they have a friendship whereby, I think, Scotty can tell it how it is to Kirk. He totally respects him, but occasionally he will tell him — you know, as he does in Into Darkness, he stands up to him a bit. So yeah, their relationship has evolved from that, and I hope when you see us again, all on the Enterprise, that whatever dynamic evolved from the last two films has now — there’s been another two years of that, you know? So they’re all very comfortable with each other. They’re all very into the cycle of doing their job, and I think Scotty is happy to be in the engine room doing his thing.

This movie starts, like you said, two years into the mission, and they’re done, they’re emotionally drained, and that’s a great place to start a movie, because they’re already at a low point. Can you talk about where they go from that?

PEGG: Well, it’s less that they’re done with it, because they know that they’ve still got time to go. It’s more that they’re dealing with what would inevitably be the psychological impact of doing it. It’s not like, “Oh, I don’t want to do this anymore.” No one’s over it. Everyone’s just doing their job, going from adventure to adventure, and it’s kind of tiring, and they’re wondering what the ultimate goal is, what the endgame of it all is. And I think the idea of the movie is, the story in the film is that what they encounter helps to clarify what their job is.

Speaking of what they encounter, talk a little bit about Idris Elba’s character.

PEGG: Idris is doing some extraordinary work at the moment. Me and Doug and Justin sat down with him a few weeks ago in preparation for his scenes and really got to the bottom of who he is in this movie — and I can’t tell you that, because there’s a lot of complexity about him and stuff that’s mysterious about him, which I obviously want to maintain. But he’s just this very formidable, very powerful person, thing, that they encounter. It’s obvious to say he’s a match for Kirk, obviously, but there’s a dynamic between them that’s very interesting, and that will all become clear.

Well, talk a little bit about the fact that people enjoy seeing the sci-fi aspect of Star Trek, the futuristic gizmos or gadgets. How much fun was it to write some of those, and is there anything from the original series or things you’ve been thinking about that you wanted to incorporate?

PEGG: Yeah, well we’ve obviously got — there’s no spoiler to say there are phasers and communicators and beaming — the usual sort of what you’d hope from a Star Trek movie. I think a few characters who have never been beamed before have gotten to be beamed in this one, which was very nice for them. We’ve come up with part of the story, or it at least begins with them docking up in a new starbase, which is on the very edge of Federation space. It’s a kind of diplomatic hub. It’s called Yorktown, and it’s right on the edge of Federation space, and it’s where all the most recent Federation inductees can come and mingle with each other and learn about each other. It’s a kind of lovely…

Mos Eisley?

Pegg: No, no — that’s a wretched hive of scum and villainy! This is the opposite of that. You can imagine – we joked that there were various aliens with leaflets, handing them out to other aliens like, “Come and see our world!” But it’s basically a place where they can go, where they can better understand what being part of the Federation means. It’s an important kind of tactical establishment for the Federation. It’s been built locally, so it’s very interesting to look at, but it’s where the Enterprise docks up. For the first time in like 10 months, it’s had kind of proper contact with other people, and that’s where the story begins. And designing that — you know, you say that in a screenplay, you describe it, and then you get it to a production designer, and they come back with these amazing concept designs. That was the most amazing thing for Doug and I. You know, you write away and write away, and then suddenly you see all these boards with this beautifully designed, incredibly imaginative stuff, and you kind of feel like you can take credit for it. [Laughs] Even though you shouldn’t.

Were there any elements from the previous script that stuck around just because they’d already been designed in preproduction or anything?

PEGG: No, no, not at all. I mean, maybe there were props they were able to recycle, but because I haven’t read it… Also, there’s something I’d like to clear up. I sort of got misquoted recently about saying that I’ve been brought in to make it less Star Trek-y, which is not what I meant and not what I told that journalist. What I meant was that there has to be a degree of universality when you’re dealing with something like this, which means that you cannot alienate the people for whom it’s their very first Star Trek, do you know what I mean? If they come into it and it’s indecipherable because there’s a lot of stuff that you have to have prior knowledge to understand, then you’re left with something which is a little bit exclusive — and it’s always the trick with these promises, is making it at once something that the fans can enjoy and take a lot from but also new people can come in and just see it as a one-off and go, “Hey, shit, I’ve got 50 years of this stuff I can go and watch now!” Which is a great thing for kids, it is. It’s like, I love the idea of when you first discover a band and then discover that they’ve had six albums out before. So that is what I meant by that. The idea of it not being Star Trek is anathema to me. This has to be, in every way, in every fiber of its being, it has to be Star Trek.

One of your many strengths is comedy, so I’m curious as to how that has informed the rhythm of the humor in the film and how it may differ from the previous two in terms of the ensemble and the flavor of the humor. Can you talk a little about that?

PEGG: Yeah, well, we’re not —

I mean, obviously it’s not going to be a romp.

PEGG: Yeah, yeah. But you know, understandably, I think when my name was linked to it, people were like, “Oh, no, it’s going to be a comedy.” That’s not what we want to do, but both Doug and myself and the whole cast and Justin are very keen for the film to be fun. You know, the jeopardy to be real, the tension to be nail-biting, but not to have to feel like — and, you know, the second one is called Into Darkness, so I’m not necessarily leveling this criticism at that film, obviously; I’m in it. But there seems to be this weird thing these days about, if you gritty something up, suddenly, it’s okay for us to like it as grownups. It’s like justifying — like I said before, like what is essentially something that’s aimed at children, but if you suddenly fill it with darkness and blood, it’s okay for grownups. We don’t feel guilty about liking it. But fuck that, you know what I mean? We can like anything we like. I feel like Star Trek was always very bright and very optimistic. There are some fabulous comic touches in the original series, when you watch some of the interplay between Kirk, Bones and Spock particularly, there’s some lovely stuff. So we want this film to have a sense of fun and levity which never impacts on the tension and never takes anything away from the bad guy. I mean, Galaxy Quest is a great example of a really funny sci-fi film, where you have all the threat in that film — same with the zombies in Shaun of the Dead — they’re completely serious, and you have comedy happening. We’re not making Galaxy Quest here by any means, but it’s possible to have a lightness and a comic touch and characters who are very human and still maintain a kind of genuine threat and for it to feel real and not flippant. But I kind of balk slightly at this darkness thing, because it just feels… own it, you know?

For more on Star Trek Beyond: