DANNY Boyle’s 14-year career as a film-maker has been erratic but broad in its range, from the early highs of Shallow Grave and Trainspotting, through the commercial travel-brochure gloss of The Beach, the fallow follies of A Life Less Ordinary and Millions, and on to the zombie re-birth of 28 Days Later and the retro experimentalism of his 2007 space adventure Sunshine.

His love of film, and more especially the possibilities of film, is writ large once more in Slumdog Millionaire, a film perhaps surprisingly closest in tone to Trainspotting, and his best since that 1995 landmark.

Without labouring the comparison, Slumdog Millionaire has all the wild energy, rebellious humour, sense of place, underground spirit, impoverished circumstance and need for escape of his Scottish kitchen-sink drama, but there is a difference.

Slumdog Millionaire is a fairytale, a “rags to raja” story rooted in Bollywood romanticism, and so its colourful collision of tragic realism and fantastical underdog triumph releases the same warm, feel-good endorphins first unleashed by Simon Beaufoy in The Full Monty.

You may, or more likely may not, have heard diplomat Vikas Swarup’s novel Q & A on BBC Radio 4’s Book At Bedtime, but that story forms the loose basis of Beaufoy’s new screenplay, wherein call-centre tea boy Jamal Malik stands one correct answer away from the 20 million rupee jackpot in the Hindi version of the TV quiz Who Wants To Be A Millionaire.

Alas, Malik (British actor Dev Patel, from Channel 4’s Skins) is in the brutal hands of the police, undergoing electric shock torture, under suspicion of cheating, after being handed over by the show’s slimy, jealous host (Anil Kapoor).

“I knew the answers,” says 18-year-old Jamal, and so begins a life story told in flashback that explains how he did indeed know the answers.

It is a rites-of-passage tale that takes in the slaughter of his mother, slum-dog squalor amid Mumbai’s rubbish heaps, abuse in an orphanage, a brother’s embroilment in organised crime and an undying love for his fellow orphan, Latika (Freida Pino): a love for an elusive butterfly that drives him to enter the Millionaire show for the publicity.

Much of that constantly endangered life must sound bleak, and yet Beaufoy and Boyle’s storytelling is defiantly upbeat, countering the hardships (such as the blinding of a child’s eyes with a burning hot spoon) with a romantic heartbeat.

The twists and turns grow ever further fetched, but you go with the flow, just as Boyle and his cinematographer Anthony Dod Mantle did in embracing the buzzing energy and vibrant colours of Mumbai.

How else could Boyle end such a winning film but with a Bollywood dance on a station platform, one last musical burst as full of exhilarating, dramatic impact as it was in Trainspotting.