The Wackness (15) Star rating **** Dir: Jonathan Levine With: Ben Kingsley, Josh Peck, Famke Janssen

click here to watch the trailer If you can ever forgive and forget The Love Guru, a good year continues for Ben Kingsley with this ice-cool comedy drama which plays out across a sweltering New York summer. As in Sexy Beast and, more recently, Elegy, the Oscar winner is at his best when consumed by the part he is playing. In Jonathan Levine's untidy but endearing indie he looks similarly possessed, by his hair if nothing else. If you've ever wanted to see what the follicly challenged Kingsley looks like with curly locks that would make Samson spit, want no more.

The Wackness is a period piece, the period in question being the mid-Nineties. Mayor Giuliani's campaign to clean up New York is under way, but not everyone can see the benefits of shiny, happy capitalism being given its head. Kingsley, playing a therapist, Dr Squires, likes the Big Apple the way it is, worms and all. His patient-cum-dealer, Luke (Josh Peck), agrees.

There's a lot the old shrink and the young slacker see eye to eye about. Luke, the awkward, friendless teenager caught between bickering parents, is on the face of it the one with the more immediate problems. What he needs, says a sympathetic observer, is to lighten up about life, embrace its absurdities. "I see the dopeness," says his unofficial counsellor. "You just see the wackness."

Squires, his semi-official counsellor, has a similarly unorthodox approach, advising Luke to seek salvation in good times rather than prescription medication. Though Squires is the senior man, he has a steeper learning curve ahead of him in Levine's double coming-of-age tale. Beginning to feel his age at last, Squires is more disillusioned than ever with his lukewarm marriage and general lot in life.

The two pilgrims in search of dopeness, and dope, make slow but entertaining progress towards answers. Along the way, a third force enters the picture in the form of Squires's step-daughter, Stephanie. Played by Olivia Thirlby, who was so impressive as the best friend of Juno, Stephanie is the coolest girl in class, and possibly New York. Luke naturally adores her from afar, but getting close to her seems as likely as Giuliani being unmasked as Biggie Smalls's greatest fan.

Peck and the fast-talking Thrilby are excellent as the troubled and apparently not-so-troubled teens. Peck keeps his performance low-key to the point of sleepwalking. His heroic slouching, though in keeping with the character's nature, is frequently on the brink of being seriously irritating, but he has enough charm to get away with it. Though what Luke does to earn money is wrong, he is essentially a good, if mixed-up, kid.

Neither Peck nor Thrilby, impressive as they are, stand much of a chance when Kingsley enters the frame. Never a shy, retiring presence in any picture, he is on towering form here as Squires, a man who is definitely drowning not waving. Levine's script gives Kingsley acres of room to riff in a strange, sometimes impenetrable, New Yoik accent, about life and how to survive it. "Never, ever, trust anyone who says they don't like dogs," is one of many pieces of sterling advice he gives Luke.

Taking a lead from its protagonists and the changing city in which it is set, The Wackness is a sprawling, scrappy picture. As such, it's a radical change of style for Levine. His debut feature, All the Boys Love Mandy Lane, was an efficiently executed but depressingly formulaic teen scream thriller. Here the writer-director gets to have some fun, backing up lots of energetic camera work with cleverly inserted graphics and tunes from the era. New York, old New York, is celebrated in all its heat-soaked, graffiti-strewn grubbiness.

The Wackness takes a while to get under the skin and its rough charms may remain permanently hidden to some. There's more downtime than is wise in what is essentially a thin story, with the teen babble and druggy dialogue verging on the tiresome after a while. More screen time for Famke Janssen, playing Squires's brittle, tuned-out wife, might have evened out the imbalance between Kingsley and the rest of the cast, but when the lead is on such wickedly amusing form it's hard to complain too much.

The subject, style and brief appearance by Mary Kate Olsen as a modern hippy chick suggest The Wackness is aiming itself at the youth market, but Levine's picture probably has just as much to say to the baby boomer generation. Behind his frantic attempts to seem hip and wise, Squires is that sad creature, the ageing idealist beaten down by everyday reality. His awareness of this is tenderly observed by Levine, and superbly rendered by Kingsley.

While the movie might play out in style to Mott the Hoople's All the Young Dudes, it's really the old dudes, and one in particular, who carry the news worth hearing here.