Jeff Kinney presents his newest work at the Jefferson Building of the Library of Congress in Washington. (Astrid Riecken/For The Washington Post)

Jeff Kinney wears his pants properly now, not with the waistband high, up near his belly button. He is no longer skeletal. He certainly doesn’t carry his patrol badge everywhere.

And when he strolled into his old elementary school gymnasium on Tuesday as a multimillionaire author, not the Dungeons-and-Dragons-playing goofball he once was, he was greeted like a celebrity. More than 200 children lost their minds, screaming and waving fans decorated with covers of his books.

“Now that is so cool,” he said as the cheering wouldn’t stop.

Kinney returned to Potomac Landing Elementary School in Fort Washington, Md., to launch “Double Down,” the 11th book in his “Diary of a Wimpy Kid” series, a global publishing phenomenon that has sold 180 million copies in 52 languages. Kinney earned nearly $20 million last year, according to Forbes magazine, making him the second-highest-paid author in the world, in between James Patterson and J.K. Rowling.

His new book, out for mere hours, is already the top-seller on Amazon.

Students greet Jeff Kinney at Potomac Landing Elementary School in Fort Washington, Md., where he went to school as a kid. (Astrid Riecken/For The Washington Post)

Kinney, 45, built his not-so-wimpy empire — the books, three movies, a musical headed for Broadway and an upcoming animated TV series — by mining the high jinks and awkwardness of his childhood. Greg Heffley, Kinney’s main character, does and says things a lot like he did.

With the children sitting on the gym floor where Kinney used to shoot hoops, Kinney told stories that have made their way into his books, including the time he hid in a swimming pool bathroom and wrapped himself in toilet paper because it was cold.

“Can you tell why I called the book ‘Diary of a Wimpy Kid’?” Kinney asked them.

Much howling.

“Most things in the books happened in truth or in spirit, but mostly in spirit,” Kinney said in an interview. “I try to put it all through the fiction blender and get to the essence of the thing and hopefully get a joke out of it.”

What has made Kinney so successful, say booksellers and publishing experts, is how unusual the series was when it launched in 2007. The books are Greg’s diaries. The pages are lined like a notebook with handwritten entries and cartoon doodles — the writing sets up the joke, delivered in the doodles.

Hundreds of students celebrate the arrival of Jeff Kinney at the Library of Congress. (Astrid Riecken/For The Washington Post)

To readers, especially boys, that didn’t look like any of the books at school.

“My 8-year-old son hated to read,” an Amazon customer wrote in a review of the first book. “No matter how much we worked with him he just wasn’t interested.” But Kinney’s book was, the reviewer said, “the miracle we’ve been looking for.”

It wasn’t just the format that was appealing. It was the tone.

Greg is bumbling. He is not particularly popular. But he’s mouthy in a mostly harmless way.

“Let me just say for the record that I think middle school is the dumbest idea ever invented,” Greg writes on the third page of the first book. “You got kids like me who haven’t hit their growth spurt mixed in with these gorillas who need to shave twice a day.”

Mary Alice Garber, the children’s department buyer at Politics & Prose bookstore in Northwest Washington, expects plenty of excitement for Kinney’s new “Wimpy Kid” installment.

“We have the same track record with him that we do with J.K. Rowling,” she said.

Jacob Baxter, 10, one of the children in the Potomac Landing gym, explained his obsession with Kinney in a letter he wrote him in September.

“I can read your books in 2 days,” he wrote, adding that he had finished all the books, “so I started all over. . . . You are my favorite author.”

In many ways, Kinney’s success is a total accident.

He grew up reading the comics in The Washington Post every morning with his father, a retired military analyst who worked at the Pentagon. At the University of Maryland, Kinney studied computer science and drew a comic for the student newspaper called “Igdoof,” about an awkward freshman with three strands of hair, like Greg.

That was the life Kinney saw for himself — newspaper cartoonist. That life never materialized. Kinney took a job at a health-care company as a computer programmer, and in his spare time he began working on a graphic novel of sorts — for adults — featuring some dorky but lovable kids. He spent four years filling his journal with doodles and one-liners. He wound up with 1,300 pages.

In 2004, he began publishing the diary entries on Funbrain, a website he worked for creating games and puzzles to help children learn. Greg had a cultish following. Hoping to find a publisher, Kinney went to Comic-Con, an annual convention for comic book writers, gamers and graphic novelists. There, he handed his book to Charles Kochman, a well-known editor of graphic novels and comics at Abrams Books.

“I just instantly loved it,” Kochman said. “There was nothing like it out there.”

He saw it as a humor book in the same vein as “The Wonder Years,” the hit coming-of-age TV show starring Fred Savage that ran on ABC from 1988 until 1993. But when Kochman pitched it to his colleagues, they suggested he try it as a kids’ book. Kinney was dumbfounded. A kids’ book? It never occurred to him to a) write a kids’ book or b) that what he had already written was for kids.

But looking back, Kinney realizes that not writing the book for kids is actually what made it so popular with kids. He wasn’t moralizing or writing down to them.

“For me, the priority was always humor,” Kinney said.

And kids could see their own lives in Greg’s.

“The kids might know they aren’t as bad as him, but even if they are, then it’s comforting,” Kochman said. “This is not a happily-ever-after kind of thing. Authenticity really matters to kids.”

All kids. Though Kinney’s early readership skewed male, Kochman said about 45 percent now are girls. “I think girls find the books to be a good cue into what boys think,” Kochman said. “It’s funny to them. The humor is universal.”

And it all comes back to Fort Washington, to the house on a hill where Kinney grew up within walking distance of Potomac Landing Elementary. His best buddy back then was Ryan Coudon. They tinkered with computers, programming them to alphabetize their homework. They played Dungeons and Dragons. They built forts.

“I guess we were kind of nerdy,” Coudon said. “But we thought we were cool.”

Though they lost touch in their middle and high school years, Coudon has followed Kinney’s career with awe. And the books brought them back together. Kinney even invited Coudon’s family to one of the movie premieres.

Coudon has watched his own childhood unfold in Greg’s diaries — and again on Tuesday at their old school. Coudon attended the event with his wife. Kinney told the story about the time he rolled a soccer ball at the wheels of Coudon’s bike while he was riding it. Coudon fell. Bones were broken.

“I’m here to say, ‘I’m sorry,’ ” Kinney said into the microphone. “Is your wrist working now?”

Much howling.

Kinney left the gym with his old buddy, walking past the library, swapping stories that might one day wind up in a book.

That time a teacher opened his car door and it fell off.

That time he used mirrors to shine the sun in kids’ eyes.

Kinney now lives with his wife and two sons in Plainville, a small Massachusetts town near Rhode Island, where he recently opened a bookstore. After his return to the D.C. area — he also did an event at the Library of Congress — he will be plugging his books in England, Germany, India, Israel, Korea. But he’s taking Fort Washington with him.

“When I think of the wimpy universe, I think of that school and the hill that I lived on,” Kinney said in the interview. “That’s my frame of reference. It serves as the campus for all of my stories.”