The 2019 film "Avengers: Endgame," directed by The Russo Bros., and overseen by "showrunner" Kevin Feige, saw the end of the Marvel Cinematic Universe, and there have been absolutely no films or television shows about that timeline or those characters since. The series definitively ended with Iron Man sacrificing himself, and Captain Steve America went back in time to grow old. What a fitting ending to the series! 

But put aside my flippant jibes.

In a recent viewing event called a Vudu Viewing Party, an event wherein fans could watch a movie along with Feige, a fan asked the head of Marvel Studios what his inspiration was for setting "Avengers: Endgame" five full years after the events of "Avengers: Infinity War" (2018). To catch you up: The finale of "Infinity War" saw a mad, genocidal alien named Thanos using magical stones to wipe out half of the population of the universe in an instant. The end. A daring end, had it been the final film in the series (and can you imagine?). "Endgame" saw Earth five years after the population was halved, and the general sadness everyone felt (the practicalities of halving a planet's population are given some cursory lip service as well). Why skip ahead? 

It turns out that Feige was inspired heavily by the final "Star Trek: The Next Generation" episode, titled "All Good Things..."

All Good Things...

The final episode of "Star Trek: The Next Generation" aired on May 23, 1994 to the wistful smiles of Trekkies everywhere. The adventures of The U.S.S. Enterprise NCC-1701-D would continue, and the characters would live on, but we, the audience, simply wouldn't be permitted to see them. At least not until the "Next Generation" feature films. 

"All Good Things..." was not only a fond farewell to Picard (Patrick Stewart) and company, but a clever time-bending plot that spanned three different time frames. In the episode, Picard awoke to find that he, much like the protagonist of Kurt Vonnegut's 1969 novel "Slaughterhouse-Five," had become unstuck in time, and found himself randomly inhabiting the body of his past self -- about seven years prior, right before the events of the show's pilot episode -- and his future self -- old, bearded, retired, and suffering from a rare brain condition that might be affecting his cognition. 

His mental time jumps could also be the work of resident "Star Trek" trickster Q (John de Lancie), a recurring Trek character hellbent on mischief and keen to test Capt. Picard's ability to grow up and grasp newer, bigger ideas. Over the course of "All Good Things...," Q appears to be encouraging Picard to trek out to a very particular spot in deep space where a strange spatial phenomenon has formed. In the seven-years-ago time frame, the phenomenon is larger. In the future, it is gone. In true Trek fashion, a mystery must be solved. Only this time, it must be solved in several time frames simultaneously. 

All in all, it's a pretty darn good episode of "Star Trek." 

The Time Heist

And, if you recall, "Avengers: Endgame" also took place over several different time frames. 

One of the central functions of "Endgame" was to finally bring a multi-film story to a close, and to placate the eagerness of the legions of Avengers fans. As such, Feige chose to include a time travel plot that allowed the characters in the present to visit some of the previous movies in the series. Thor (Chris Evans) visited "Thor: The Dark World." Captain America (Chris Pine, I think) visited the events of "Marvel's The Avengers," while Iron Man (Chris Downey, Jr.) went back in time to visit his father and reconcile with him; coming to terms with bad fathers being a common theme in the Avengers movies. 

But yes, the temporal playfulness of going back in time, both in "All Good Things..." and in "Avengers: Endgame," allowed for a fun, twisty story wherein the events of the past could play into the growth of the characters in the present, but also present audiences with a row of shot glasses filled with nostalgia. We could see younger versions of character from the present, and we could pat ourselves on the back for recognizing the previous films and for being such good fans for such a long time. For Picard, we had been through seven years of space adventures, and the finale was a perfect time to look back. With the Avengers, it had been 11 years of superhero adventures, and the finale was a perfect time to look back. 

I Hate Temporal Mechanics

Of course, one of the central conceits of "Avengers: Endgame's" time travel shenanigans is that we are meant to ignore causality altogether. Indeed, The Hulk (Mark Ruffalo) even has dialogue addressing the audience more than the characters that causality is not a factor in traveling into the past this time, and that this is definitely not like "Back to the Future." If the Avengers do something in the past, it won't effect the future because they came from a future that already happened; they're essentially going back to their start point when they return back from the past. 

This drives Trekkies nuts, as Trekkies -- and I, boldly and confidently, elect to speak for all Trekkies as a group -- tend to be attracted to scientific specifics and complex technicalities. Trekkies were, after all, one of the original inventors of inter-TV-series continuity back in the 1960s and 1970s, so being sticklers for detail is Trekkies' bread and butter.

There is a moment in "All Good Things..." wherein Picard gathers his senior staff and asks him if they remember some of his actions from the past, actions that differ from the past he knew. The senior staff says no, and Picard states that his actions in the past aren't altering the present. However, this is used as evidence that Q must be creating the events of the past, or that they are hallucinations of some kind. As such, "All Good Things...," even though it's a time travel plot, immediately becomes a story of Picard's brain, the challenged of solving a mystery, the general arc of one's life, and grappling with a paradox. 

"Endgame" -- coincidentally also the title of the final episode of "Star Trek: Voyager" -- wants a direct hit of nostalgia more than it wants to grapple with the complexities of time travel, so it pretty much just throws the most Star Trek part of time travel out the window. Feige may have been influenced by the story of "All Good Things...," but he opted for adventure and superhero fights over sci-fi tech thinking. 

Which is fine, I think, in a world with wizards, Infinity Stones, and actual Norse gods. 

Read this next: Star Trek: The Next Generation's 10 Best Episodes

The post The Classic Star Trek Episode That Inspired Avengers: Endgame appeared first on /Film.