“Why is my body changing?” That’s the unspoken cry of every teenager in every coming-of-age movie. It also happens to be the struggle of the reluctant superhero in “Shazam!,” the latest offering from the DC Comics Universe. Based on a character that first appeared in 1940 — and was originally called Captain Marvel, but that’s another story — this has all the thrills of a 21st-century blockbuster, but with the heart and patient pacing of an ’80s adventure.

That’s largely thanks to director David F. Sandberg, whose 2017 movie “Annabelle: Creation” put the finely developed characters of “The Conjuring” universe into the service of a series of jump scares. “Shazam!” reverses that process, and shifts from the rapid-fire editing of a typical comic book movie to spend more time developing characters.

Characters like Billy Batson (Asher Angel), a 14-year-old who’s run away from every foster home he’s been placed in so he can search for his real mother. (Although, as his social worker points out, his mom hasn’t seen fit to look for him.) Authorities give him one more chance, placing him with foster parents who have hosted a whole crew of diverse children, including his roommate, a boy named Freddy (Jack Dylan Grazer), who walks with a brace and seems like Robert Downey Jr. shrunken into Fred Savage of “The Wonder Years.”

Billy resists the affections of his motley new family at first. But after he stands up to bullies who target Freddy at school, Billy magically appears before a wizard (Djimon Hounsou) who’s looking for a champion to take on his power to fight evil. Billy knows he wouldn’t pass any purity test — but is he the hero the world needs?

With the magic word and new name — “Shazam!” — the wizard passes his power onto Billy, who’s transformed into a buff adult (Zachary Levi). The thing is, Shazam is a goofy buff adult who feels terribly self-conscious in a boldly colored, tightfitting costume he finds ridiculous.

Levi plays Shazam as far more immature than Billy, as if a grown man’s body has revealed the scared kid hiding behind the street-wise swagger. Shazam’s attempts at flight are as uncertain as a baby duckling’s, which leads to some effective slapstick comedy. That physical humor makes his eventual triumph that much more exciting, and Levi’s childlike glee conveys that with a modesty that makes him more relatable than your average flying crusader.

Shazam develops from vulnerable teen to cocky social media star to selfless family man. In the process, he confronts a supervillain (Mark Strong) who has gained control of demons who represent the Seven Deadly Sins.

“Shazam!” operates as a thrilling fantasy and a comedy about the learning curve of growing up. It’s also a stirring tale of the heroic potential that lies inside each of us, if only we’re put to the test.

MOVIE REVIEW

“Shazam!”

Grade: B

Starring Zachary Levi, Mark Strong and Asher Angel. Directed by David F. Sandberg.

Rated PG-13 but contains intense sequences of action, strong language and suggestive material. Check listings for theaters. 2 hours, 12 minutes.

Bottom line: Coming-of-age story that combines fantasy with comedy