Best-selling author Stuart Gibbs speaks to students at the public library.

A crowd of eager fourth- and fifth-graders walked over from Haines School to the library Friday morning to meet face to face with one of their favorite authors: Stuart Gibbs.

Gibbs also had separate sessions with students in third grade and sixth grade. But, as he confessed to the fourth and fifth graders, he liked the interaction with that age group the most.

“When people get to sixth grade, they often get embarrassed to ask questions. Of course, you guys are full of questions,” he said.

“Teenagers,” one of the students said, disparagingly.

Gibbs has sold about five million copies of his 33 books so far, mostly for students in the range of third to eighth grade. These include the “Spy School” series of books with 10 books, soon to be 11, and the “Fun Jungle” series, with eight books. His newest series is the “Once Upon a Tim” series, with a fourth book coming out in November. All of them are illustrated, and all featuring a medieval peasant named Tim, who wishes to become a knight.

“This is his first quest. He goes from the village, through the Forest of Doom, across the River of Doom, the Chasm of Doom, the Mountains of Doom – a lot of doom on that trip. He’s gotta face trolls, and sea serpents, and very angry, carnivorous butterflies,” Gibbs said.

Then there’s the “Moon Base Alpha” series, with three books about life on the moon in the year 2041. Although it’s a book for children, he wanted to provide kids with a more realistic look at what it would be like for kids in space.

“The first people on the moon are most likely going to be scientists. They will probably be up there with their families, because they gotta go to the moon for years at a time. So kids your age are moving to the moon and finding out that ‘Star Wars’ and ‘Star Trek’ and ‘Guardians of the Galaxy’ have lied to all of us about how awesome space travel is going to be,” he said.

So when crimes happen on the moon, the kids work together to solve them.

Another one of his projects, working with DC Comics, is a graphic novel called “Bruce Wayne – Not Super,” about what it’s like being the only kid in middle school without any superpowers.

At the Friday session, he described why he writes – which is the question he gets asked the most often.

“People have this misconception about how authors work. And there’s this thought that maybe we get this idea in a special way. That an author sort of gets an idea walking down the street – Boom! It comes to us; we know that whole idea from start to finish. We just run home, start writing. And that’s not really true,” he said.

As to how he became an author, Gibbs said he knew he wanted to be an author since at least the second grade, and to illustrate his point, he showed off a form he had to fill out in the second grade. The question was “When I Grow Up, I Want to Be … ” And the choices were fireman, policeman, cowboy, astronaut, soldier or baseball player. There was also a space to write in a response, and he put in “author.”

After college, however, Gibbs became a field biologist, studying animals in the Philadelphia Zoo. He had a stroke of luck when he selected an animal that today is fairly well known, but back then, nobody had ever heard of: the capybara. (Think: a very, very large hamster,)

His research got him behind the scenes at the zoo, after hours with the zookeepers.

“I got to see how a zoo worked behind the scenes. I got to talk to the zookeepers and hear all these stories about what happened behind the scenes at the zoo. Because I really wanted to be an author, more than I wanted to be a field biologist. I started to think the zoo was a fascinating place to set a story,” he said.

That eventually evolved into a mystery story, where the crimes happen to the animals. Gibbs incorporated a lot of his favorite animals into the story, including hippos, koalas and most recently, a blue whale. He also incorporated facts about nature. The result was “Fun Jungle.”

What I love about writing this series is, it’s not just facts about animals. There’s action, adventure, comedy, mystery. And you’ll learn a little bit, too. Hopefully, fun stuff.”

He promised more fun jungle stories, more spy stories and more graphic novels in the future.

Gibbs had a few words about the writing process for the students, some of whom had indicated that they wanted to be writers.

“It’s hard to say exactly where inspiration comes from. The best I can tell you is, for the most part, it comes from curiosity. Curiosity certainly starts in a place like this, in the library, where you can read as much as you can,” he said. “You can explore the world around you; you can ask your parents to take you out and explore as much of the world around you as you can, and when the time comes, experience as much of the world as you can. Curiosity drives inspiration.”