It seems like just yesterday — or at least just last year — that we were bidding goodbye to a teen protagonist on his deathbed (“The Fault in Our Stars”) or hers (“If I Stay”). But don’t put away those handkerchiefs quite yet: “Me and Earl and the Dying Girl” may keep tears at bay for as long as it can, but they arrive nonetheless, and right on cue.

Adapted by the author Jesse Andrews from his novel of the same name, “Me and Earl and the Dying Girl” was the big hit at Sundance this year, and it’s easy to see why: The story of three teenaged misfits navigating adolescence, love and death in middle-class Pittsburgh bristles with sardonic humor and bravura bursts of visual energy. Directed by Alfonso Gomez-Rejon with a surfeit of zooms, swooping close-ups and dramatically canted camera angles, “Me and Earl” is as much a playful, heartfelt love letter to movies as to the bittersweet lessons of mortality and friendship.

The endless film references and studied, self-conscious style can prove distracting until the audience settles in and comes to understand why they’re justified. The “Me” of the title, a high school senior named Greg (Thomas Mann), is a movie fanatic, as is his best friend Earl (RJ Cyler); eschewing the cliques and claques of their peers, they spend most of their time constructing silly, sardonic remakes of the films they worship, giving them titles like “Pooping Tom” and “The Seven Seals,” the latter of which repurposes the Bergman classic as a romp featuring, well, seals.

It’s all calculatedly adorable, as are on-screen chapter headings that all start with “The Part Where . . .” and the budding relationship between Greg and Rachel (Olivia Cooke), a girl he knows only slightly but gets to know better at the insistence of his mom, played with furrowed concern by Connie Britton. (His dad, a perpetually bathrobe-clad academic, is played with curmudgeonly humor by Nick Offerman.)

If you’re still reading, this is The Part Where You Figure Out that Rachel is the third title character of “Me and Earl and the Dying Girl” — Andrews does his best to misdirect the viewer away from that spoiler, but few surprises lurk in the broad strokes of the plot. Instead, the revelations come by way of small, funny moments, like the slightly off-center observations of Rachel’s glassy-eyed mom (Molly Shannon), Greg’s real and imagined encounters with his school cohorts (especially a pretty girl he’s crushing on), a suspected case of an LSD-laced bowl of Vietnamese pho and, of course, the affecting life lessons he learns, not just from the wise and funny Rachel but from Earl.

Another giveaway: “Me and Earl and the Dying Girl” is structured in accordance with its title, with Greg given pride of narrative place and Rachel and Earl relegated to supporting players in his drama. They aren’t given much by way of their own interior lives, and Earl especially is relegated to the kind of wisecracking comic relief that “the black friend” has historically been relied upon to provide on the emotional journey of a white protagonist.

Similarly, Rachel’s character only comes into full focus once she’s off screen, by which time Greg can fully appreciate her gifts and, of more paramount importance, what she’s taught him. “Me and Earl and the Dying Girl” succumbs to the same cloying too-cuteness and solipsism that often plague its glib and sentimental genre. But those limitations are leavened by the film’s lively, ultimately affecting flourishes and sprightly voice. In the hands of filmmakers as energetic as Andrews and Gomez-Rejon, the teen weepie is a story that can be retold as many times as you can fully drench a hankie, wring out and repeat.

PG-13. At area theaters.
Contains sexual content, profanity and some thematic elements.
105 minutes.