The good die young and that seems to be the inevitable outcome of Alfonso Gomez-Rejon's beguiling and intensely moving screen adaptation of Jesse Andrews' debut novel.

A teenage girl is diagnosed with cancer, classmates offer their heartfelt sympathy and one childhood friend sacrifices his studies to support her through chemotherapy.

There are obvious similarities to The Fault In Our Stars, but while that film had audiences sniffling from the opening frame, Me And Earl And The Dying Girl mines a rich vein of offbeat humour to stem the deluge of salty tears.

"This isn't a touching romantic story," confides Greg Gaines (Thomas Mann), the socially awkward high school student and narrator of Gomez-Rejon's remarkable film.

To some extent he's right: there's no boy meets girl cuteness here, no stolen kisses or wish fulfilment about the healing power of nascent love.

But his story is deeply affecting, recounted as a scrapbook of bittersweet vignettes and stop-motion animation, accompanied with self-explanatory onscreen captions like "Day 1 Of Doomed Friendship".

At the behest of his parents (Connie Britton, Nick Offerman), Greg visits estranged childhood friend Rachel Kushner (Olivia Cooke), who has been diagnosed with leukaemia.

"I don't need your stupid pity so please go," she tells him coldly, but Greg persists to placate his meddlesome folks.

A faltering friendship takes root, to the delight of Rachel's boozy mother (Molly Shannon).

In order to impress his high school crush, Madison (Katherine C Hughes), Greg agrees to make a film for Rachel with his partner in creative crime, Earl (RJ Cyler).

They have been producing charming homages for years including A Sockwork Orange, Senior Citizen Kane and Anatomy Of A Burger.

The pressure to deliver a masterpiece weighs heavily on Greg, creating friction with Rachel, who doesn't want to be surrounded by negativity.

"You can go back to your life of being invisible, detached and self-hating," she sobs.

Me And Earl And The Dying Girl is a beautifully judged rites of passage drama, that eschews mawkishness and emotional manipulation in favour of a richly detailed portrait of adolescent dreams in crisis.

Gomez-Rejon's whimsical visual flourishes are a constant delight, perfectly reflecting Greg's love of classic cinema and his penchant for homemade props.

The film is punctuated by numerous moments of unexpected humour, like when Greg says something thoughtless and insensitive to Rachel, and stares at a poster on her wall of a Hollywood hunk dressed as an iconic comic book superhero.

"I'm damned if I'm letting a punk like you waltz in here and stupid the place up," growls the character disapprovingly.

Mann doesn't strike a false note in the tricky lead role, gelling naturally with Cyler and Cooke.

"This isn't a sappy love story," Greg emphasizes, in case we had forgotten.

No it's something far more precious, fragile, haunting and life-affirming than that.

Damon Smith