Max Brallier didn’t have very realistic career goals as a child.

“I wanted to be a Jedi,” he said.

That didn’t work out. But Mr. Brallier, a baby-faced 31-year-old, has found a more pragmatic way to channel his “Star Wars” fanaticism. The result is “Galactic Hot Dogs,” his new book about a boy who battles giant mutant worms and zombie space pirates with his sidekicks: a robot, a rebellious princess and a lumbering alien.

The story, which Mr. Brallier described as “a goofier ‘Star Wars,’ ” is undeniably silly. His publisher is treating the project very seriously, though. Aladdin, an imprint of Simon & Schuster Children’s Publishing, bought “Galactic Hot Dogs” in a seven-figure, three-book deal. The company is printing 500,000 copies, and began promoting the book more than a year ago, through an elaborate, million-dollar print and online marketing campaign.

Simon & Schuster has solid reasons to be bullish about “Galactic Hot Dogs.” The book has already taken off on Funbrain.com, a popular gaming website for children that has been an incubator for some of the biggest blockbusters in children’s book publishing. Jeff Kinney’s “Diary of a Wimpy Kid” series began as a free book on Funbrain in 2004, and now has more than 150 million copies in print globally. “Dork Diaries,” a middle-grade series by Rachel Renée Russell, experienced improved sales through a story-based interactive game on Funbrain’s sister site, Poptropica, and now has more than 20 million copies in print.

The comic strip “Big Nate,” by Lincoln Peirce, became the basis for a popular game on Poptropica and later became a print best seller. Other popular middle-grade series, including Stephan Pastis’s “Timmy Failure” and Brandon Mull’s best-selling fantasy series “Beyonders,” are finding audiences on Poptropica and Funbrain that are carrying over into book sales.