If you want to understand how Star Trek has changed over its long lifetime, just look at how they stage an attack on the Starship Enterprise. In Gene Roddenberry's original 1966 television series, a space battle would involve the cast staggering back and forth across the set, rarely in the same direction, while someone jostled the camera.
On the set of Star Trek Beyond - the 13th film in the series - things are a bit more advanced. I am standing in an Enterprise corridor that is about to be obliterated. The set, in Vancouver, is built inside a giant gimbal that will start rocking as soon as someone shouts "action"; bits of the walls are primed to actually explode. The cast will have their work cut out just to stay upright.
It's 50 years since Roddenberry had the idea for a drama about a multicultural, multi-species group of explorers travelling through space to discover new lifeforms and bring peace, not war. Though set far in the future, it would reflect current-day concerns such as racism, feminism and the futility of war. That original, cheaply made but smartly written television show (which ran for three series) has spawned five further shows and 13 films so far.
Star Trek Beyond is the third since J.J. Abrams rebooted the big-screen franchise in 2009.
The new film brings back the familiar crew - including Chris Pine as Captain Kirk, Zachary Quinto as Spock, Zoe Saldana as Uhura and Karl Urban as Leonard "Bones" McCoy - and introduces Idris Elba as a new villain, Krall. It also has a whizzy new director in Justin Lin, best known for the Fast and Furious films. But, after all these years, where does Star Trek fit in?
The last Star Trek film, Into Darkness, was well received by critics on its 2013 release, but failed to satisfy either fans - who voted it the worst Star Trek movie ever at a convention in Las Vegas that same year - or even its director, J.J. Abrams, who later admitted "it didn't work as well as it could have, had I made some better decisions before we started shooting."
The film was accused of being too backward-looking, pinching much of its plot from 1982's Wrath of Khan. So what do you do with Star Trek in 2016 to keep it relevant? Well, according to Lin, you tear the whole thing apart.
"I had an overall idea that what I wanted to do was to deconstruct Star Trek," he tells me. "I had talked to J.J. about literally deconstructing Star Trek by destroying the Enterprise."
And that's exactly what he's done. Along with the British actor Simon Pegg, who is not only appearing as engineer Scotty but has also written the screenplay (with Doug Jung), Lin has put together a story that sees the Starship Enterprise set upon by aliens and torn to pieces.
I had an overall idea that what I wanted to do was to deconstruct Star Trek.
As a statement of intent, it sounds like a pretty aggressive manoeuvre. Could it be the work of a man who wants to make Star Trek something it is not - Fast and Furious in space, perhaps? Actually, Lin argues, if anything this radical approach makes Beyond more faithful to Roddenberry's vision. After all, the original Star Trek was about not looking behind you, but always looking ahead, always imagining what else might be possible. It might surprise fans to learn that Lin has been an avid Trekker for years. "I grew up watching it," he says. "All my friends watched Star Wars but I couldn't afford to go to the movies, so I watched Star Trek."
Even now, it's fair to say that, while there are an enormous number of people who appreciate Star Trek as a rich fictional universe with a lot to say about the modern world, it still suffers from something of an image problem. Star Trek is not cool, which perhaps explains why it has always been a solid box-office performer, rather than a spectacular one.
Pegg is all too aware that if the new film is to succeed, it has to appeal not only to diehard fans but also to the casual viewer. "You can't make a story that the more casual viewer would feel alienated by," he says. "I know some Star Trek fans get very angry at this. I think they believe you could make a movie that's just like the original series and expect it to do well. It just wouldn't, sadly. So it's a fine balance that you try to strike.
"For us it was important to have a film that was spectacular and exciting but underpinned by the fundamental things that Star Trek was about, which was musing about our own significance in the galaxy, what it means to be human [or] not to be."
Tragically, the production of Star Trek Beyond was bookended by loss. Leonard Nimoy, the actor who played the original Spock and took a small role in both J.J. Abrams' Star Trek films, died shortly before filming began. His death had a particular effect on Zachary Quinto, who plays the younger Spock. "My connection to the character I think is more spiritual now than when Leonard was alive," he says. "It was such an iconic character that Leonard created. I think about him every day."
Then, on June 19, barely a month before the release of Beyond, Anton Yelchin - the actor who plays the Enterprise's navigator, Chekov - was killed in a freak car accident at his home in California. In a cast that has grown very close over the past seven years, he was the youngest.
Yelchin appeared to be enjoying his position as the junior member of the group. "I'm really the baby out of everyone," he said. "When we made the first one, Chris [Pine] was the age I am now and I was 18. But I still feel like the baby." He was only 27 when he died.
Despite all its struggles, the early signs suggest that Star Trek Beyond, arriving at the end of a summer for blockbuster movies, will succeed. Yet even if it fails, Star Trek, with its still extremely passionate fan base, will almost certainly carry on for years to come, in one form or another.
For starters, next year it will return to television screens in a new series overseen by Brian Fuller, who headed the acclaimed dramas Pushing Daisies and Hannibal. And the likelihood of more films down the line is very high. In the world of Star Trek there's always more future ahead, more unknowns to be explored. If there is a final frontier, we haven't reached it yet.