Andy Weir at Johnson Space Center.
Andy Weir at Johnson Space Center. - 
Listen To The Story

The movie "The Martian," directed by Ridley Scott and starring Matt Damon, hits theaters this Friday. It's a big-budget Hollywood production about an astronaut stranded on Mars using his wits to survive. But this man-versus-nature epic has a surprisingly humble origin. It was initially published online for free by computer programmer Andy Weir, who used his computer design background and the combined knowledge of his readers to write what might be the most scientifically detailed novel about space travel. 

After offering "The Martian" as a free web serial online, Weir was met with a demand for an easier way to access the his writing on e-readers. So he listed his book for the cheapest price available on Amazon: 99 cents. The publication quickly became a best-seller on the site. Soon, Weir sealed a print deal with Random House and a film deal with Twentieth Century Fox. 

During the writing process, Weir wanted to make his story as realistic as possible. An experienced computer programmer, he built his own computer simulation of the orbital trajectory. But there were also places in the story where he sacrificed accuracy for drama. In the beginning of the book, for example, the protagonist confronts a sandstorm on Mars. In reality, that would feel like "somebody blowing on you on Earth," Weir explains.

But in a man-versus-nature story, Weir wanted "nature to get the first punch."

Click on the multimedia player below to hear the extended conversation with Andy Weir. 

Sign up to stay connected to Marketplace and you could be in for a Halloween treat!

Subscribe to our daily newsletter by Oct. 31 and you're automatically entered to win one of 10 Marketplace treat bags. They're filled with some great swag, plus something unique to give you a peek behind the scenes — a program rundown signed by Kai Ryssdal.

Subscribe today for your chance to win – and good luck!

Follow Molly Wood at @mollywood