Some writers focus on moral subtext in their works. Others, an overarching lesson. But for Andy Weir, there’s only one driving approach to creating his bestselling novels: science first.
“There’s never any deeper message or meaning in any of my stories. It’s always just there to entertain,” Weir tells Rolling Stone. “I’m not trying to change your mind or set your opinion on anything. When you’re done with my book, I just want you to put it back on the shelf and think, ‘That was fun.’”
It’s been almost 15 years since Weir became a New York Times bestselling author with his space-MacGyver odyssey The Martian, which became a seven-time Oscar-nominated film starring Matt Damon in 2015. Now, his work is back onscreen in a new interstellar offering: Project Hail Mary starring Ryan Gosling. The movie, based on Weir’s 2021 novel of the same name, follows an amnesiac astronaut on a solo mission to save Earth, all while exploring questions of hubris, bravery, and global cooperation in times of immense danger. These are all themes that seem especially timely in an era of ongoing political strife. Weir sees those parallels. He just doesn’t consider them nearly as interesting as figuring out how to make the tech and science in his stories actually work. It’s a mindset that seems like it would immediately sacrifice character on the altar of the laboratory. But it’s this inside-out focus that’s turned this science-fiction author into a bonafide blockbuster machine.
“I know more than the layman about science, but not as much as real scientists, so I know enough to search for what I don’t understand,” Weir explains of his process. “It’s easy for me to write characters that are way smarter than I am, because I can spend two weeks working on a problem and say the character solved it in five minutes. When you stick to real science, that science will help you create the plot and the challenges.”
Challenges are what came first in Weir’s journey from software engineer to author. His original idea for The Martian came while he was working at Blizzard Entertainment, working it out as a puzzle in his head. How would a man survive alone on Mars? As Weir worked through the character’s problems — like obtaining food, water, and the eventual return trip to Earth — he published chapters of the story on his blog, eventually self-publishing the full work in 2011 via Kindle. A traditional book deal with Crown Publishing and movie adaptation followed shortly after. Since that breakout moment, Weir has continued to use scientific questions to drive the plots of his work, like 2014’s Artemis, a space-heist story starring an intergalactic smuggler set entirely on the moon. And of course, Project Hail Mary, which started as a theory about a fuel that weighed so little and had so much energy that it could enable previously impossible distances of space flight. But in solving those challenges, Weir — unintentionally or not — builds out the desires and needs of stirring, compelling characters.
“As a writer, the most awesome thing about space stories is you are hopelessly far away from any sort of immediate help. You’re just completely isolated, so you’re on your own,” Weir says. “Also, as a dork, you’re surrounded by technology. So those two things combined make very interesting framings for exciting, thrilling stories.”

Andy Weir on the set of ‘Project Hail Mary.’
Jonathan Olley/Amazon Studios
Project Hail Mary, on which Weir serves as a producer, throws viewers into a terrible, horrible, no good, very bad day for one lonely astronaut. In this case, it’s former school teacher Ryland Grace (Gosling), who wakes up on a ship he has no memory of boarding. On either side of him are dead shipmates, and the sun on the screen and the spaceship around him are pretty good indications that wherever he’s going, it’s not Earth. Through a series of flashbacks and vodka-induced mental breakdowns, Grace figures it out as the audience does. The Earth’s sun is infected with a mysterious phenomena conjured by Weir called a Petrova line, a trail of alien cells called astrophage that are slowly consuming the fiery orb.
If scientists can’t figure out what the cells are and how to stop them, it will set off a global catastrophe, killing a third of Earth’s population and leaving the survivors to grapple with supply chain disruptions, climate disaster, famine, war, and eventually death — all within one generation. The astrophage have infected every star in the galaxy except one: Tau Ceti I, lightyears away from Earth. The plan is to send a group of scientists to figure out why Tau Ceti has remained immune to the astrophage and hopefully send the answer back in time to save the world. The project is led by Eva Stratt (Sandra Hüller), a mysterious government figure with unlimited authority who’s willing to sacrifice anyone if it means Earth’s survival. It’s a death sentence wrapped in a one-way trip — and Grace has no idea why the hell he’s onboard.
Just like in The Martian, Project Hail Mary’s plot relies on figuring out scientific problem after scientific problem. Grace has to use hard science for literally everything — to find out where he is, determine what’s keeping the astrophage alive, and even figure out what appears to be an alien ship is doing alongside him. That science exists in the film, but it’s far less precious about showing its work down to the subatomic decimal point.
“You don’t have to actually teach [the audience] the science in such depth that they could later solve problems on a test. They just need to understand what’s going on,” Weir says. “We’re lucky if five percent of a book gets into a movie. It’s just such a confined, constrained storytelling medium. So we just kind of skip all the intervening math and just tell them the answer. But I think most people just accept that we’re probably right.”
While Weir mostly took what he calls “big, huge piles of money” for The Martian and let the film’s creative team do the rest, Project Hail Mary was his first time as an active producer on set. “I really saw how the sausage gets made,” he says. “I didn’t realize how much creativity and actual writing that the actors bring to a story.” And in Gosling, Weir says he found a partner who not only got through the experimentation in the book but was determined to dig into the interiority behind the quippy, humorous nature of Grace. “It’s great to have someone like Ryan come in and add all these layers that I didn’t have in the original,” Weir says, laughing. “Everyone’s going to watch the movie and they’ll ascribe all those layers and complexity to me as the original book writer. And that’s great. All Ryan’s work, all my credit.”
The space epic is well traversed territory, but Weir is far from tired of exploring it. After all, the universe always presents a problem to solve, and science (almost) always has an answer. And while the author is purposefully vague about what his next work will be, this physics-focused writer can’t help but point out that with his stories’ heavy focus on science, unintentional messages underneath always manage to come through.
“[Project Hail Mary] has got such an upbeat message of hope and friendship,” Weir says. “It may seem almost childishly optimistic. But I’m childishly optimistic, so that’s the sort of stuff that I write. I want people to come out of the theater feeling good about humanity. There’s plenty of negativity out there. I sell positivity. That’s my product.”
