The movie is based on a self-published novel that was written by author Andy Weir purely as a thought experiment: how might a man stranded on Mars actually survive?
Astronaut Mark Watney is left behind when the first manned mission to Mars is forced to abort. The next manned mission is in 4 years time. Watney must stay alive for 4 years on a planet that is frozen and sterile.
What follows proceeds step by logical step. He uses simple logic to establish his position, work out what needs doing with the resources available, and do it. Whenever a setback arises then it becomes a new problem to overcome in the same way. I gather that the original book is almost one long equation (as amusingly shown here; Weir even wrote his own software to check the orbits of the spaceships) but the movie actually uses English to keep us all in the loop, and for all that one critic described it as ‘competence porn’, Damon plays a very clever but also engaging and likeable man whom we want to succeed.
He can’t do it completely on his own; he also needs the help of his fellow astronauts and the NASA crew back on Earth. So, as the plot progresses, we come to know these people too and watch their own little subplots develop.
If you’re stuck in a plot, the solution can sometimes be to put aside what you want to happen and think: “what would happen?” If the only logical solution is one you don’t like (e.g. you can’t get round Watney dying horribly of asphyxiation on Day 2) then build in some pre-conditions that will help (e.g. give him a life-sustaining habitat abandoned by the expedition). Alternatively, the only logical solution might be better than the one you first thought of. An early draft critic of my novel His Majesty’s Starship helpfully pointed out the fundamental illogic of a key plot point. Fixing that meant bringing in a new variable which not only improved the book but made a sequel possible.
I’m currently reading my way through Luke’s gospel, with Jesus’s inexorable progression towards Jerusalem and the Cross. I’m not saying God was stuck for ideas on how to finish but I was surprised by the similarity in subtext. God had decided what he wanted to happen, and he set in motion a chain of events that would lead unstoppably to that conclusion. Along the way we get many marvellous stories of Jesus’s interaction with the people he met, none of whom would have known they were part of a much greater narrative. Dozens of small stories spun off the bigger one, all made possible by God pursuing his own consistent and logical plot that could only have one ending.