This post contains spoilers for Riverdale Season 3, Episode 4, “The Midnight Club.”

You can’t give a good gift if you don’t understand its recipient—and on Wednesday night, Riverdale proved that it understands its audience backwards and forwards. This week’s episode was more than mere fan service: it was the platonic ideal of Riverdale, this show at its soapy, playful, zany, somehow still cogent best.

Perhaps most impressively of all, “The Midnight Club” showed off creator Roberto Aguirre-Sacasa’s knack for world-building, as seen both here and on Netflix’s Chilling Adventures of Sabrina. Though Riverdale and its surrounding hamlets might mirror American towns, they’re also undeniably, intentionally placed in a delightfully bizarre alternate reality. Only in the world of Riverdale could a young Hiram Lodge—played, in an amusing twist, by Mark Consuelos’s eldest son, Michael—surprise his pals with a cool new drug called “fizzle rocks”: “They just hit the streets,” he says with a straight face, and viewers know enough not to bat an eye. Wednesday’s episode, like most of Riverdale’s best, embraced the show’s gimmick-fueled absurdity—and as with last season’s musical episode, the result was pure popcorn delight.

As we learn this week, the parents of Riverdale High have been trying to keep their kids away from the mysterious role-playing game Gryphons and Gargoyles because they became obsessed with it themselves in their younger years. Each of the show’s main cast members spends the episode playing his or her character’s own father or mother in an extended flashback sequence, which kicks off after the older generation finds the game in a locked drawer during a group detention session. (You knew we wouldn’t get through this without a Breakfast Club riff, right?)

The joke is that each actor was asked to play against type: Lili Reinhart, usually the essence of preppy poise as Betty Cooper, got to play her mother, Alice’s, rebellious past self. As a young Hermione, Camila Mendes shed her cool, distinctly “Veronica” polish and replaced it with thick glasses and an equally thick layer of meekness. As young F.P., Cole Sprouse—whose usually plays a guy prone to saying things like "In case you haven't noticed, I'm weird. I'm a weirdo. I don't fit in. And I don’t want to fit in. Have you ever seen me without this stupid hat on?”—was a womanizing, gum-chewing cad. K.J. Apa as Fred Andrews was basically Archie Andrews in a different shirt, but even that somehow tracked; the Andrews family is, after all, pretty explicitly recognized as the most boring family in Riverdale. And of course, Madelaine Petsch played Cheryl’s mother, Penelope, with noxious aplomb, as a slightly less rebellious version of Riverdale’s M.V.P. And she did it all while wearing big glasses and a retainer.

As the flashback shows, over time, the teens became more and more obsessed with the game—and eventually kicked things up a notch by breaking into the school at night to live-action role-play their adventures, while wearing kicky costumes and everything. In an apparent blend of Breakfast Club and the 1990s kiddie horror show Are You Afraid of the Dark, the group knighted themselves “The Midnight Club.” But one day, they received a quest from an unknown source—and that same night, while they were all playing and buzzed on fizzle rocks, the school’s principal was murdered. (His death, naturally, was ruled a suicide under “suspicious circumstances.”) In the end, the trauma renders the adults of Riverdale into the mostly empty shells of humans we see in the show’s present-day sequences.