A sequel to Trainspotting could have been as bad an idea as picking up your old heroin habit. The 1996 movie was a perfect and efficient statement, a coming-of-age story told through the prism of drugs and petty crimeā€”American Graffiti shot through with skag and Scottish brogues.

Director Danny Boyleā€™s flamboyant filmmaking approach generally veers toward visual and sonic assault, but in spite of this, T2 Trainspotting looks inward rather than outward (and donā€™t worry, that clunky title is probably the worst thing about it). Rather than a traditional sequel, itā€™s closer to something like Richard Linklaterā€™s Before trilogy, in which we revisit familiar characters at different turning points in their lives. In T2ā€™s case, the characters are nothing short of indelible, although you should have at least a passing familiarity with the first Trainspotting before embarking on the second.

In T2, Mark Renton (McGregor) hasnā€™t been seen since he ripped off his best matesā€”heā€™s started a new life in Amsterdam, but a coronary episode and his motherā€™s death send him back to Edinburgh. Spud (Ewen Bremner) is still caught in the cycle of addiction, as hapless and pitiable as ever. Begbie (Carlyle) has spent most of the intervening 20 years behind bars, although his psychotic tendencies havenā€™t diminished one bit. And bleached-blond Sick Boy (Jonny Lee Miller) prefers to be called Simon nowā€”and heā€™s changed his drug of choice from heroin to cocaineā€”but he hasnā€™t given up his grifterā€™s ways, roping in his maybe-girlfriend Veronika (Anjela Nedyalkova) to some tawdry blackmail schemes.

Thereā€™s tons of plot in T2ā€”the four men, who forgive and donā€™t forgive each other to varying degrees, embark on a series of shady endeavorsā€”but very little of it matters. What does matter are the characters and performances, which are superb, particularly Bremnerā€™s Spud, whose idiotic faƧade hides a poetic soul, and Millerā€™s Simon, a figure of agitated narcissism and continually wounded pride. Carlyleā€™s Begbie, naturally, is just as hilarious and terrifying as heā€™s ever been. McGregor might be the weak linkā€”you can tell this guyā€™s been a pampered movie star for the past 20 years. It does work with his character, though, as Renton is someone whoā€™s wholly disassociated himself from his past.

T2 overplays its hand at times, and Boyle seems particularly frenzied, cramming far too many visual ideas into whatā€™s primarily a character-driven story. He incorporates footage from the original Trainspotting, which sometimes works and sometimes doesnā€™t. Screenwriter John Hodge, too, juggles a few unnecessary elements, although he retains the essence of novelist Irvine Welshā€™s source material. (T2 is based partly on unused sections of Welshā€™s original novel and the 2002 sequel Porno, but itā€™s mostly newly concocted stuff.) Nonsensical sequences sit alongside really great ones, and the filmā€™s reliance on Veronika makes the whole thing a bit wobbly. Perhaps Boyle and Hodge sensed the need to inject a woman into this very laddish story, but Veronikaā€”a gorgeous Bulgarian a full two decades younger than these Scottish loutsā€”is a pure figment, a wise and magical hooker with a heart of gold who acts as the balm to these man-boysā€™ troubled relationships.

Still, what T2 does well, it does astonishingly well. More than a few scenes are hysterically funny, and more than a few escapades are white-knuckled fun. But what sticks with me are the things I never thought Iā€™d get out of a Trainspotting movieā€”the smart, emotional things it has to say about friendship and the passage of time. It knows how much it sucks to get old, and how hard it is to change our nature. But it also shows us, through these remarkably drawn characters, that thereā€™s always a compulsion to keep trying to get it right.