Earlier this year, an unassuming science-fiction book hit bookstore shelves: The Martian by Andy Weir. You wouldn't know it to look beyond its striking cover, but The Martian took an unconventional route through the world of publishing and, even before it landed in the hands of readers, it was already poised to hit the big time.

What kind of story merits that success? The Martian is about an astronaut named Mark Watney who is part of a manned mission on Mars. Just days into their two-month mission, tragedy strikes and the mission is aborted. Mark is left for dead while the other astronauts evacuate the planet. Left stranded and alone on Mars, Mark must use his ingenuity and engineering skills to leverage what meager resources he has to not only survive, but also find a way back to Earth.

The appeal of The Martian is not just the riveting story of survival; it’s also the allure of its main character. Mark is a wise-cracking problem solver. Despite his dire circumstances, Mark remains surprisingly and refreshingly optimistic. To him, this is just another engineering problem to be solved.

But would audiences buy the idea of a smart, retooled "Robinson Crusoe in Space?" They did. Within weeks the book became a New York Times #1 bestseller. Hollywood took notice as well. The film adaptation of The Martian was optioned for film by 20th Century Fox even before it was released. The film version stars Matt Damon as the level-headed Mark Watney, and it will be landing in theaters on October 2nd.

I had the opportunity to chat with Andy Weir about his gripping novel, its journey through the publishing world, and the film adaptation.

Q: What is the genesis for the riveting story you tell in THE MARTIAN?

Andy Weir: I was imagining a manned Mars mission, putting it together in my mind. Naturally, you have to account for failure scenarios and have plans for what the crew could do. I realized those failure scenarios made for a pretty interesting story.

Q: Despite the dire circumstances of its main character, THE MARTIAN remains remarkably optimistic. Why did you take that approach?

Andy Weir: I wanted the story to focus on the problems and solutions. I didn’t want it to be a dark and depressing tale of a man’s struggle with crippling loneliness and constant stress. That’s just not the story I wanted to tell. So I decided Mark is made of sterner stuff than most people. After all, he was chosen to be on a manned Mars mission, so he’s not just some guy off the street. He beat tens of thousands of other people for that position.

Q: The story has a fair amount of science in the narrative, yet is notably delivered in easy-to-grasp terms, making it both accessible and (gasp!) educational. Can you tell us about the breadth and depth of the research you did to write it?

Andy Weir: It was quite a lot of research. It took me three years to write the book and I’d say about half of that time was research. But I like doing that sort of thing so it was fun for me.

Q: The novel took an unconventional route to publication. Tell us about it.

Andy Weir: Originally the book was just a serial I posted a chapter at a time to my website. Once the book was done, people started requesting that I make an e-book version so they didn’t have to read it in a Web browser. So I did and posted it to my site. Then other people emailed saying they want to read the e-book, but they aren’t technically savvy and don’t know how to download a file from the Internet and put it on their e-reader. They requested I make a Kindle version they could just get through Amazon. So I did that as well. I set the price at Amazon’s minimum allowable price of $0.99. More people bought the book from Amazon than downloaded it for free from my website. Amazon has a truly amazing reach into the readership market.

The book sold very well and made its way up various top-seller lists on Amazon. That got the attention of Julian Pavia at Crown. He told his colleague David Fugate (a literary agent) about it. David ended up becoming my agent and Julian offered me a book deal. It was a whirlwind of activity because 20th Century Fox optioned the movie rights that same week.

Q: How did THE MARTIAN find its way to Hollywood?

Andy Weir: I don’t know how they initially heard of it. But Fox approached us for the film rights out of the blue.

Q: How involved were you in the film adaptation of your book?

Andy Weir: Mostly my job was to cash the check. Though they did send me the screenplay to get my opinion. They are not required to listen to anything I have to say. They keep me updated on the production because they’re cool.

Q: Film is a different storytelling medium than paper, so almost necessarily, there are bound to be differences between book and film. What can readers expect when they see the film?

Andy Weir: I can’t talk about the film too much, but I can say I’m very happy with how the screenplay turned out.

Q: What can readers expect next from you?

Andy Weir: I'm working on my next book now. It's a more traditional sci-fi novel with aliens, faster-than-light travel, and telepaths, etc. It’s tentatively titled “Zhek” and it should be out in mid-2016.

John DeNardo is the editor of SF Signal, the Hugo Award-winning group science-fiction and fantasy blog featuring news, reviews and interviews. You can follow him on Twitter as @sfsignal