To paraphrase a line from the American classic “Ghostbusters,” when someone asks you if you want to be an author, you say “Yes.”

At least that’s what Mark Parisi figured when he got a note from the children’s editor at HarperCollins asking exactly that, even if writing books wasn’t exactly on his radar.

“I never thought I’d be writing books,” says the Melrose resident and Gloucester native, whose book “Marty Pants: Do Not Open!” -- a text-and-cartoon novel in the “Diary of a Wimpy Kid” vein -- was released by HarperCollins on Tuesday. “I don’t feel like I’ve read enough books to be able to write a book!”

Not that Parisi isn’t used to being published: His nationally syndicated daily cartoon panel “Off The Mark” celebrates its 30th anniversary this year. You’ve likely spotted Parisi’s off-kilter punchlines on greeting cards, calendars and shared endlessly on social media.

But a full 243-page book, with fleshed-out characters and, presumably, a plot -- well, that was something different.

When he started, “I didn't have any of the groundwork for characters and I had never developed characters before,” says Parisi, who knew his protagonist would be a school-age boy, and that was about it. “I had to go, so how many parents, how many siblings, who are the friends and the teacher and all that. So it was all a learning experience.”

Still, based on what he’d seen of Jeff Kinney’s “Wimpy Kid” books, Parisi felt it was something he could tackle. “I had never wanted to do a regular chapter book -- it's just too much writing,” Parisi says. “And I never want to do a graphic novel because it's too much drawing, too much structure.

“But when I saw the ‘Wimpy Kid’ books, I thought, wow, this looks like fun,” he says. “This looks like something I could do, and maybe do well, hopefully.”

Advice from everywhere

Not one to hedge his bets, Parisi took advice wherever he could get it -- primarily from his editor at HarperCollins, David Linker.

“My original reaction as the creative type is when someone tells you how to do something, you're like, ‘You're the ‘man’! You can't tell me …,’” laughs Parisi. “But I realized I didn't know what I was doing. If there was anyone I should listen to, it should be him.”

For his part, Linker says Parisi actually turned out to be a natural, comparing him to cartooning icons Charles Schultz and Bill Watterson.

“Mark is amazing. All I did was point him in a direction,” Linker says. “Working with him has just been such a pleasure, because it’s like going to comedy school. He gives me six different takes on every idea and fusses about making sure every word is exactly the right word to get the biggest laughs.

“That he’s never really written narrative fiction before is just amazing to me, because he’s got a storyteller’s heart,” Linker says. “He knows instinctively how to balance the laughs and the narrative in a way that I think will make kids fall in love with the stories and the characters.”

Parisi’s penchant for getting each punchline and plot twist just right made for some circuitous editing sessions as the manuscript passed back and forth. “I was changing things so many times,” he recalls. “Right up until they said yeah, sorry, no more changes. I'd be like, ah, but I still want more!”

School-age conspiracies

What Parisi wound up with was the story of Marty Pants, an elementary school-age conspiracy theorist prone to jumping to outrageous conclusions he can’t be talked out of -- like that his teacher is an alien bent on planetary destruction. As Linker describes him, he’s a kid “who’s so certain of himself that he even when he’s utterly wrong he finds a way to make it right.”

He’s also a would-be artist, and the illustrations in the book are ostensibly Marty’s own take on his ongoing adventures. “He draws well for his age,” jokes Parisi, who tried drawing in a more childlike way before realizing that made things just too sloppy. “I said, I just can't [bring myself to] draw that much worse than I draw [in real life],” he says. “So it's just kind of a leap of faith.”

Surrounding Marty’s efforts to unmask the “alien” threat are plotlines involving his too-smart-for-her-own-good sister, her no-goodnick boyfriend and a certain mysterious object of Marty’s affections who always seems to catch him in his most embarrassing moments. And all through are jokes and funny situations bound to resonate with parents as well as their young readers.

“I wanted to make it so that adults would enjoy it too,” says Parisi. “I just kind of wrote it the way that I wanted to write it for myself, the way I would enjoy it, and I would put [some] jokes in that I knew kids wouldn't get but that adults would get. But if the kids don't get it, it doesn't matter because there's another joke coming.

“So I put in things that I thought [parents would appreciate],” Parisi says. “I mean, there were Beatles references!” (Mostly from Marty’s father, whose constant nattering about “old music” is the perfect cure for Marty’s alien-induced insomnia.)

Apparently Parisi’s efforts resonated with HarperCollins -- after Parisi submitted “Marty Pants: Do Not Open!,” Linker came back to him with good news: “He was like, congratulations, you have a three-book deal!,” Parisi recalls, laughing. “And I was like, three? Do you know how hard this was? And so I was kind of freaking out, saying, how I do this again? And not repeat it?”

Fortunately, Parisi found a way, and books two and three are now both in the pipeline. “For the second one, at first it was tough but when it finally clicked, I was just so elated that I could do it more than once,” he says. “You know, 'cause I think anyone could do one. They always say that. So when I was able to do two I was so excited.

“Even if they don't sell -- which, you know, hopefully they will -- it's still, I'm proud,” Parisi says. “It's an accomplishment. I actually was able to do it, and I didn't know if I could.”

Editor’s note: Parisi began a book tour Monday that will include stops in Chicago, Ohio, Rhode Island and, on May 13, at “An Unlikely Story,” Jeff Kinney’s bookstore in Plainville, Mass. For more information, visit the Marty Pants Facebook page at facebook.com/MartyPantsBooks.