LOS ANGELES — Compared to the traditional protagonists of summer movies, Greg Heffley really doesn’t measure up.

He’s a skinny little thing, is no pillar of rectitude and doesn’t have much in the way of friends. But to countless young boys, Greg feels like a real superhero, even as he’s becoming better behaved on screen than he is in print.

Opening Friday, “Diary of a Wimpy Kid: Dog Days” is the third entry in what has been a small but modestly successful series.

Adapted from Jeff Kinney’s wildly popular illustrated books, the films chronicle the everyday struggles of middle-school student Greg. An admitted underachiever — he’d rather play video games than pretty much anything else — Greg is frequently in trouble with his parents and classmates yet rarely takes much blame. The books and the movies alike throw more than a few scraps toward parents; there’s an ongoing joke, for instance, about the lameness of a “Family Circus” knockoff comic that only people of a certain age would get.

And for this installment, the “Wimpy Kid,” with a budget of about $22 million, will take on those big summer heroes rather than opening in March, where the first two releases in 2010 and 2011 grossed a combined $116.7 million domestically.

While the PG-rated live-action films make a number of narrative leaps from Kinney’s six novels (the 41-year-old writer also wrote two “Wimpy Kid” companion books), which have sold a combined 75 million copies in 35 languages, they retain the author’s celebration of Greg’s defiant if not occasionally unruly deeds. Like a modern-day Dennis the Menace, he’s no paragon of pre-adolescence, but his borderline behavior is usually harmless and frequently relatable.

To pay off a debt in the book “Dog Days,” for example, Greg considers stealing money from his younger brother’s savings or skimming the church collection plate. “All I could think was how I needed that money a lot more than whoever it was going to,” Greg writes in his illustrated diary entry. He spends time at the beach with his on-again, off-again friend Rowley not because Greg likes his company — “Believe me, Rowley’s the LAST person I want to spend a week with” — but because he will be able to go on a theme-park ride called the Cranium Shaker.

“I think he’s the rebel in all of us,” said Elizabeth Gabler, whose Fox 2000 made all three “Wimpy Kid” movies with producer Nina Jacobson. “He’s not perfect. He is lazy, and he is conceited in a way. He’s a slacker. But at the same time he’s endearing. He’s a little bit like Charlie Brown — he’s a victim of stronger people around him, like Lucy pulling out the football from underneath him.”

The third movie — and the second to be directed by David Bowers — is adapted from Kinney’s third and fourth books, “The Last Straw” and “Dog Days.” The story is largely focused on the combined efforts of Greg (Zachary Gordon) and Rowley (Robert Capron) to avoid being bored silly over summer vacation. The two spend a large amount of time at Rowley’s country club, which Greg ultimately sneaks into, where he pretends to have a job and racks up a big bill for poolside beverages.

In adapting the books for the screen, the filmmakers have sanded down some of Greg’s rougher edges, in part because what he says or does to the two-dimensional stick figures around him in a book plays more harshly when he’s doing those things to a living, breathing person on screen. “There are things you can get away with on the printed page that are funny that you can’t get away with on screen,” said Kinney, who left the screenwriting to Maya Forbes, Gabe Sachs and Wallace Wolodarsky, but consulted with the filmmakers on all three films. “I think he’s much more subversive in the books than in the movies.”

At the same time, Greg learns from his cinematic mistakes, something that doesn’t necessarily happen in the books. “I like to follow the beats of a morality tale and run the other way at the end,” Kinney said of how he crafts his novels. “One of the reasons I think the books do well is that kids can sense a morality tale from a million miles away. The kids are in on the joke — they know his actions are not meant to be emulated.”

All true, but family films have different rules. “You’ve got an imperfect character, and you’re trying to make him likable. In a movie, you have to see growth, because the audience expects it,” Kinney said of how Greg changes on screen. “They are looking for an emotionally satisfying conclusion, and my books are nihilistic in that way. I’m not looking for an emotionally satisfying conclusion. I’m looking to get a joke on every page.”

Kinney, who also launched the kid Internet site poptropica, grew the books out of an online comic started in 2004. “I really had my sights set on being a newspaper cartoonist, but I couldn’t break in, I couldn’t get syndicated.”

He describes the piles of rejection letters as “soul sucking,” but the negative responses proved to Kinney that maybe his own shortcomings, rather than the syndicators’ lack of vision, was the issue. “I could see for myself why I wasn’t getting accepted,” Kinney said. “My style wasn’t there professionally. If I maxed out at a seventh-grade drawing level, I should accept it.”

Several movie producers approached Kinney soon after his first “Wimpy Kid” book, published in 2007, started climbing the bestseller charts. Some wanted to turn the book into an animated film, but Jacobson, who also is producing Suzanne Collins’ “Hunger Games” trilogy, and Fox 2000 preferred incorporating Kinney’s distinct drawings into a live-action film focused on the friendship between Greg and Rowley.

“Part of what kids love about Greg Heffley is that he represents every kid’s worst alter-ego,” Jacobson said. “His imperfections bring a level of honesty to the medium that is rare in literature aimed at children that age.” To make a “Wimpy Kid” movie with animation, she said, would undercut that human connection.

“It’s unique — an anachronism,” Kinney said of the choice to make a live-action film. “A movie aimed at families with live actors has become increasingly scarce.”

Besides the movie, “Wimpy Kids” fans can expect a seventh book in November, while Fox is developing an animated Christmas special for 2013. But “Dog Days” could be the last movie with the present cast, which is aging faster than the characters, or even the last movie adapted from one of the “Wimpy Kid” books.

And for all of those critics who say Greg is a poor role model, Kinney has this response: “Bart Simpson has not created a generation of juvenile delinquents.”

© 2012 Los Angeles Times

Distributed by MCT Information Services