Rick and Morty airs on Cartoon Network’s Adult Swim.

Here's a great joke. An unhappy married couple get the chance to view, through the goggles of a dimension-hopping mad scientist, how their lives have played out in an alternate reality. The husband, an insecure drip, goes first. Turns out in a world only slightly different from this one he's a movie star, doing coke with Johnny Depp. His wife, perpetually disappointed, snatches the goggles away to see what she might have been. The news is heartening: In another life, she’s a respected surgeon!

Next up is their daughter, a teen beanpole who has inherited her parents’ neuroses but has not yet soured into cynicism. She straps on the goggles, adjusts them, looks disappointed. “I don’t see anything,” she says.

“Well, you should select a different timeline. I mean, if your father and I achieved our dreams, there’s a chance you weren’t even born.” She interrupts that last word halfway through. “That came out wrong. That came out very wrong.”

That joke, while bleak, stands as a model of old-fashioned craft, an existential sci-fi update of another era’s character-driven TV comedy. It’s from the eighth episode of the first season of Rick and Morty, Adult Swim’s beloved but not lovable cartoon about a meh suburban family caught up in bizarre, complex, parodic and traumatic weird-fiction adventures, many featuring the squickiest space abominations since John Carpenter’s The Thing. Rarely has a comedy drawn from and honored so many pulp and horror and sci-fi sources, with such serious love for the rules of those genres: Timelines split and pretzel, teeny-verses nest in mini-verses within micro-verses, alien parasites poof into the living room to infect the family’s brains with false memories of warmth and love to soften up the humans for devouring. And gape at the Galapagoan inventiveness of the forms those parasites take, gathered together in scenes as densely populated as the Sgt. Pepper cover: a baby chick with Popeye arms; a mariachi and a Shakespeare; Amish Cyborg and Reverse Giraffe; Mrs. Refrigerator, a talking you-know-what, and Pencilvestyr, a chatty sharpened pencil.

In one of the best episodes, the catalyst for all the interdimensional mishigas — grandpa/mad scientist Rick, voiced by Justin Roiland, who created the series with Dan Harmon — hooks back up with an alien ex, a hive mind that inhabits every body on an entire planet. That means everyone alive there shares the mind of his lover, which for him opens up endless sexual possibilities. He requests a football stadium’s worth of redheads. Rick and Morty often strikes me as the most satisfyingly hilarious cartoon TV series since the greatest years of The Simpsons. (That’s Seasons 3 through 7, of course.) Watching it can be like strapping your face to the discharge spout of a woodchipper that’s been loaded up with the complete history of geek culture: The Twilight Zone, Alien, Lovecraft and Asimov, D&D and MMORPGs, Star Trek and A Brief History of Time, splatter horror and junk TV and — blessedly, thrillingly — the full history of screen comedy.

But it’s more than an explosion of references. The creators of Rick and Morty take everything vital from their series’ antecedents — Simpsons, Futurama, Archer, the low-rent Seth MacFarlane shows, Harmon’s own Community, a host of Adult Swim excursions into dada — and Frankenstein it all together into a series whose animating spark is a surprising emotional acuity. That brings us back to that joke about parenting and discarded dreams: Rather than a one-off swipe at the daughter character, as it would be on Family Guy, the punch line inspires some aching moments of uncertainty for Summer, the daughter (voiced by Spencer Grammer). She confides at last in her younger brother, pipsqueak masturbator Morty (also voiced by Roiland), with whom she competes to be the tagalong on grandpa Rick’s sojourns into the beyond. Morty’s response is no joke. Instead, he points out two piles of dirt in the yard and tells her how, at the conclusion of an adventure a couple of episodes back, alternative-universe versions of Rick and himself died — and that’s them, buried out back. A dazzlingly dark surprise from earlier in the series haunts those circle-and-dot eyes of his. But he tells her what he’s learned: “Nobody exists on purpose. Nobody belongs anywhere. Everybody’s gonna die. Come watch TV.”

She does. We all do. And we’re lucky to have TV like this. The shows that she then joins Morty and Rick watching exemplify one singular element of the series: improvised nonsense rattled off by the cast and creators, complete with ums and uncertain pauses, and animated for our — and the characters’ — delectation. Few comic sketches beat the appliance-store commercials of Ants-in-my-Eyes Johnson. (Each of Rick and Morty’s first two seasons devotes an episode to the ridiculous improvised programming the family finds on “interdimensional television”; the first go-round brushes against sublimity, while the second is amusing but raucously violent.)

In the first episodes of its long-awaited third season, Rick and Morty has maintained its prickly balance: wild invention, cosmic cock-ups, extreme gore, grounded characters, an interest in therapy and its insights, and an unflinching — even compassionate — fascination with human cruelty. It’s a tradition of TV comedy for screw-ups continually to relearn the same lessons. Here, the parents again and again discover that their marriage is worth fighting for, just as vain and bilious Rick is moved to admit that maybe his grandkids aren’t just stupid “pieces of shit.” (In the finale of the second season, he seems to perform an act of sacrifice to save them.) But here that familiar TV repetitiveness seems a philosophy rather than a concession to the episodic medium. Much like the study group in Harmon’s Community, Rick and Morty and family never stop being the people that they are at their cores, despite their semi-regular climactic epiphanies. Most of the people I know in real life don’t change that much, either — but I love them for who they’re capable of being as much as for who they are.

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.