Maybe Danny Boyle's previous film, Sunshine, bombed because even though it took place on a spaceship hurtling toward the sun at mind-boggling speed, nothing really moved. No such problem with his latest, which is set in a grubby Mumbai police station over the course of an hours-long, sometimes brutal interrogation but spins off like a fireworks display across years of history in one of the world's most densely populated and flamboyant cities from the point of view of one of its most downtrodden and irresistible denizens. Like Boyle's best film, Trainspotting, motion is everything — a compulsive flux of image, chronology, point of view, editing, and sound. Slumdog Millionaire doesn't allow for much comprehension along the way, and in retrospect it remains implausible and manipulative while still making elegant sense.

The young man getting the third degree is 18-year-old Jamal Malik (Dev Patel), the slumdog of the title and the unlikely winner of the top 20-million-rupee prize in the Indian version of Who Wants To Be a Millionaire. The host of the show (Anil Kapoor), no Regis Philbin, wonders how an uneducated ragamuffin could achieve what PhDs have failed to do; he may also fear that the contestant was getting more popular than the host. In any case, he turns Jamal over to the cops. After rougher treatment fails to produce a confession of cheating, the police inspector (Irrfan Khan) just asks Jamal to explain how he arrived at each answer.

And so a simple but exhilarating structure falls into place as each question proves a talisman that whirls the film into Jamal's sometimes hideous, sometimes wondrous, always photogenic past. It's like an MTV version of The Arabian Nights by way of Mira Nair's Salaam Bombay. The first question (about the star of a popular Bollywood movie) sets off a raucous chase scene with potbellied cops pursuing an army of urchins through the parti-colored squalor of Mumbai's Dharavi slum. It includes an astounding aerial shot of the tiny figures sprinting through the endless vista of hovels (Boyle has a knack for urban desolation, as in 28 Days Later), and it culminates in a slapsticky immersion of the hero in a cesspit.

But the shit hits the fan for real as the questions get more difficult and the autobiography follows suit. Horrific images — of the anti-Muslim riots that orphan Jamal and his tougher, more ruthless brother, Salim (Madhur Mittal), and of the cruelties suffered by children enlisted as professional beggars — strain Boyle's whimsy. At this point a Dickensian mode emerges (screenwriter Simon Beaufoy's previous credit is The Full Monty), with a villain who makes Fagin look like Mother Teresa, a loyalty/rivalry dynamic established between Jamal and Salim, and an elusive beloved, fellow urchin and latter-day beauty Latika (Freida Pinto). If only Jamal can somehow rescue her and make her his, then all the suffering will have been worth it.

No wonder then, that the Bollywood musical number that makes the concluding credits worth sitting through doesn't require such a difficult suspension of disbelief. But the willing suspension of outrage at the injustice and misery on display for the entertainment of audiences is another matter.