Despite its cutesy title, “The Inevitable Defeat of Mister and Pete” is a gritty, sometimes downright heartwrenching story of two young boys left to fend for themselves for weeks during a boiling-hot summer in a Brooklyn housing project.

Though it boasts an eye-catching roster of supporting performances — Jennifer Hudson, Jordin Sparks, Jeffrey Wright, Anthony Mackie — most of the running time is spent with Mister (Skylan Brooks) and Pete (Ethan Dizon), and both child actors hold your attention impressively.

When Mister’s drug-addicted mother (Hudson) is arrested for prostitution, the two must fend for themselves while dodging the perceived jailers of Child Protective Services, and various menacing project residents.

George Tillman Jr. (“Notorious”), directing a debut feature screenplay by Michael Starrbury, puts a human face on child poverty and hunger, while never turning the boys into objects of pity. Mister, determined to be an actor, steals the show practicing audition dialogue from “Fargo” and, more pointedly, “Trading Places.”