Marvel’s Agents of S.H.I.E.L.D.’s final season has demonstrated a notably different tone than previous story arcs. Where the Framework and future Kree-occupied Earth narratives were serious and bleak, Season 7’s introduction of time travel has created a semi-lighthearted atmosphere. This can be seen in the show's regular homages to popular genres from the eras Team S.H.I.E.L.D. visits, namely during the '30s, '50s and '70s. One needs only look at the title sequence, which is redesigned per episode to resemble a B-movie sci-fi film, a film noir or a '70s cop show.

That’s not to say that Agents of S.H.I.E.L.D.’s plot, which sees the team travel through the 20th century to stop the Chronicom aliens from erasing S.H.I.E.L.D.’s existence, doesn’t have stakes. But those high-profile risks are framed through circumstances and tropes that are kind of goofy. In other words, Agents of S.H.I.E.L.D has become the Marvel equivalent of DC’s Legends of Tomorrow, which also features a diverse group of characters aboard a time ship to regularly defeat threats to the space-time continuum.

But while Legends tonally resembles a sitcom ensemble and S.H.I.E.L.D. an espionage drama, both shows use time travel for humor and laughs.

RELATED: Agents of SHIELD Is Going Out on Top in Its Final Season

So, what makes the use of time travel in these shows funny? Part of it is the tonal juxtaposition: how the sci-fi weirdness play into, then disrupts, the “realism” of historic locations. Legends is gloriously weird and continually ups the ante with each season, providing more outlandish disruptions from Japanese samurais who steal shrinking suits, to killer unicorns at Woodstock.

Things got even more bizarre in Season 5 when the team must defeat various “Encores” -- revived historical villains from Hell -- from wreaking havoc on the timeline. This leads to time travel scenarios like Genghis Khan launching an offensive against British royalty in 1990s Hong Kong through the modern evolution of war horses: scooters. Such concepts are so “out there” that they feel inherently funny, but Legends still remembers to semi-ground the threats so its plots never delve into self-parody.

Agents of S.H.I.E.L.D., while not as overtly bizarre, still retains goofier story elements that the narrative plays straight. For all the threats the Chronicoms pose to humanity, Season 7 is still a story about fighting alien robots with alien robots, including an LMD version of Agent Coulson (who’s programmed to make dad jokes) and Enoch, a friendly Chronicom with key deadpan delivery. Sometimes that humor plays into iconography, like in the episode “Out of the Past,” which uses the damage from an EMP blast in the previous episode to explain why LMD Coulson is perceiving his situation like a noir setting, seeing things in black and white and internally monologuing events because his programming was disrupted. The humor derives from how S.H.I.E.L.D’s story matches genre tropes, then subverts them with a sci-fi spin.

RELATED: Legends of Tomorrow Is the Constantine Season 2 Fans Wished For

Time travel stories also benefit from the natural absurdity of “fish out of water” scenarios, tossing characters into unfamiliar environments and forcing them to deal with the outcomes. S.H.I.E.L.D.’s comedy in this season often involves the team confronting America’s dated technological advancements and status quos that openly promote racism and sexism.

On one side, we have moments like Mac, Yo-Yo and May convincing Deke Shaw to interrogate a racist U.S. general, as he possesses the most important feature of that decade: his whiteness. On the other hand, this future high-tech spy team must stifle their giggles at scientists eagerly flaunting wrist-mounted communication devices like they’re the most advanced invention ever. Sometimes the funniest moments come from watching Daniel Sousa gawk at a phone that’s small, cordless and capable of taking pictures.

Deke, Daisy, and Coulson in Agents of SHIELD Season 7

Legends, by comparison, regularly makes its characters the straight men (and women, though not in Sara Lance’s case) to absurd problems. More often than not, the Legends screw things up and make their time anachronism problems worse before they get better. Yet they still persevere in spite of these problems and the show uses those failures to reveal pathos and insecurities about its characters. This allows something as conventional as an E.T. homage in Season 2’s “Phone Home” to become a more emotional dive into how Ray Palmer’s youth -- while hardly idealized -- influenced the character’s enduringly cheerful personality. Time travel becomes a tool for not only getting laughs but also developing its heroes through meta-humor.

Given how often time travel has been used as a gimmick, DC's Legends of Tomorrow’s five-year run and Marvel's Agents of S.H.I.E.L.D.’s seventh season stand out, so far, for how they play the trope for laughs. Both shows strike a good balance between taking their plots seriously while embracing the goofy outcomes that stem from messing with history. But above all else, they make watching a time travel story fun, using episodic silliness to evolve their characters successfully.

Agents of S.H.I.E.L.D.'s final season airs Wednesdays at 10 pm ET/PT on ABC. The series stars Ming-Na Wen, Chloe Bennet, Henry Simmons, Iain De Caestecker, Natalia Cordova-Buckley, Elizabeth Henstridge and Clark Gregg.

KEEP READING: Agents of SHIELD Changes Avengers: Endgame's Time Travel Rules