Grade: B

Coming-of-age movies are a dime a dozen, but if “The Perks of Being a Wallflower” doesn’t explore any new territory, it covers familiar ground engagingly, and sometimes touchingly. Writer-director Stephen Chbosky has transformed his epistolary novel into one of the better recent examples of the genre while dropping most of the letter-reading of the book.

The main character in the period story, set in the early nineties, is Charlie (Logan Lerman), a freshman who dreads the first day of high school. He expresses his fears via voiceover, reading a letter he’s writing to an unnamed “friend”—a leftover from the book that’s only occasionally employed. And as it turns out his concerns are valid ones—until he’s praised (and encouraged) by cool English teacher Mr. Anderson (Paul Rudd) and adopted by irresistible senior Sam (Emma Watson) and her wildly unconventional brother Patrick (Ezra Miller), who take him into their circle after a party at which he consumes some Alice B. Toklas style brownies and entertains the crowd before lapsing into recollections about his troubled past.

His big revelation involves the suicide of his best friend, which—we learn—was the occasion for a stint in a psychiatric ward. But flashbacks involving his beloved aunt Helen (Melanie Lynskey) suggest an even more disturbing circumstance in his childhood, one that’s fairly obvious early on but is withheld from full disclosure until late in the story, to much less harrowing effect than Chbosky obviously intended. Awkward time with his parents (Dylan McDermott and Kate Walsh) and siblings also provide back-story.

But most of the running-time is devoted to Charlie’s involvement with Patrick, Sam, and their clique—most notably Mary Elizabeth (Mae Whitman), the aggressive punk type the hero takes as a girlfriend while secretly pining after Sam. Lerman makes an agreeably gangly hero, although his habit of biting his lip to show his nervousness is employed much too often. Fresh from the “Harry Potter” pictures, Watson convincingly looks and acts the free-spirited girl Charlie would fall for, and she nails the accent.

But the real sparkplug of the movie is Miller, who follows his very different turns in “City Island” and “We Have to Talk About Kevin” with a flamboyantly enjoyable one here. Patrick isn’t exactly the most original character in the world—the extravagantly gay kid who has a ready quip for every situation and seems unable to take anything really seriously. But Miller gives him a carefree air that’s genuinely attractive, even when he’s in drag for repeated dress-up screenings of “The Rocky Horror Picture Show.” And when a subplot involving the school quarterback (Johnny Simmons) kicks in, Miller adds a degree of pain to the character that gives him genuine emotional depth. He’s so good, in fact, that he throws off the film’s balance: Charlie’s supposed to be the focus of the story, but you find yourself concentrating on Patrick instead. Miller’s so good, though, that you’re likely to find the imbalance worth it.

Chbosky and his crew—particularly production designer Inbal Weinberg, art director Gregory Weimerskirch, costume designer David C. Robinson and set decorator Merissa Lombardo—don’t overdo the period trappings, opting for an understated look instead, with good results, and cinematographer Andrea Dunn captures it all in work that doesn’t call attention to itself but is more than competent. The all-important music selections have been selected intelligently by Alexandra Patsavas.

“The Perks of Being a Wallflower” has a whiff of the afterschool special about it, and an air of affection sometimes sets in. But compared to other recent coming-of-age tales, it goes to the head of the class, not least because of Miller’s eye-catching performance.