Matt Damon as stranded astronaut Mark Watney in “The Martian.” (Aidan Monaghan/Twentieth Century Fox) (Aidan Monaghan/Twentieth Century Fox)

Most movies follow formulas: The good guy overcomes obstacles; the pretty leads fall in love; the evil villain meets his maker. Viewers won’t normally notice that they’ve been programmed to expect the same old, same old — until they’re watching a movie that veers from the typical pattern.

And that’s the case with “The Martian,” Ridley Scott’s thriller about an astronaut, Mark Watney (Matt Damon), who gets stranded on Mars after his crew leaves him for dead. The most obvious way the movie — which opened to an impressive $55 million at the box office its opening weekend — flips the script is that, considering it’s basically “Cast Away” in space, “The Martian” is really funny with its snappy dialogue and an ensemble of quirky characters. (In fact, the novel the movie is based on, by Andy Weir, is even more comical.)

“I am the greatest botanist on this planet,” Mark announces after figuring out how to make potatoes grow using various hacks and his crewmates’s feces. If “The Martian” is a descendant of “Gravity” and “Apollo 13,” it certainly doesn’t sound like it.

But that’s not the only way the movie conscpicuously subverts expectations. Here are some other examples — including a few spoilers.

"The Martian" is about an astronaut who gets stranded on Mars and has to figure out how to survive before NASA can rescue him. How realistic is the movie's depiction of what life would be like on Mars? The Post's Rachel Feltman fact-checks the movie trailer. (Rachel Feltman and Nicki DeMarco/The Washington Post)

The characters are all really nice

Suspenseful movies put viewers on high alert for the secret villain. And so, throughout “The Martian,” certain character’s actions seem potentially suspicious as we wait for the monster to reveal itself. When one of Mark’s crew mates, Chris Beck (Sebastian Stan), floats around preparing for the marooned astronaut’s risky launch to meet the Hermes spacecraft, there’s a tense moment when we see him pressing buttons and suddenly it becomes clear: This guy is going to sabotage the mission!

Except he doesn’t. He’s just a good guy doing his job.

Earlier, when the crew members are weighing whether they should stage a mutiny against NASA and mount that risky mission to rescue Mark — which would tack on hundreds of days to their trip if they make it home at all — we expect at least one dissenter to put a kibosh on the plan or at least get a debate going. Except the good-natured astronauts unanimously agree to the operation. What a bunch of mensches.

There’s no make out session in the rain

Here’s an overused device for filmmakers: include a love story, even if you have to awkwardly shoehorn it in. But who in “The Martian” will it be? It seems like Mark and his commander Melissa Lewis (Jessica Chastain) have a special relationship. Have they been secretly getting it on in space? Hmmmm. Maybe not. She appears to be happily married, and the way he teases her for her love of disco music doesn’t turn out to be pigtail pulling.

Meanwhile, back on earth, Vincent Kapoor (Chiwetel Ejiofor) has a nice banter with Mindy Park (Mackenzie Davis). And Teddy Sanders (Jeff Daniels) keeps shooting looks over at Annie Montrose (Kristen Wiig). What does it all mean? It definitely looks like it could be flirting. Or not.

So okay, there is one love story — non-villain Chris ends up with his crewmate Beth Johanssen (Kate Mara), but there’s no are-they, aren’t-they lead-up. The first moment they share screentime alone, it’s clear they’re together when she adorably plants a kiss on his space helmet.

ET doesn’t show up on his bike

Every time Mark leaves his Mars home, the Hab (short for habitat), and wanders or drives around the red planet, all the quietude lends itself to the thought that this is the moment an alien will pop out of the ground and attack the astronaut. After all, this is a Ridley Scott production. But Mark really is alone on Mars. He doesn’t even have an alien hiding in his stomach.

The astronauts talk like normal humans with normal human emotions

The astronauts in “Apollo 13” were amazingly skilled robots. When their mission went south, they took some deep breaths and announced with aplomb, “Houston, we have a problem.” Mark Watney is not that kind of astronaut. He’s smart, sure, but he talks and reacts to problems like an average dude — with four-letter words.

Ham-fisted heartstring pulling < Subtle, disarming heartstring pulling

Despite a misleading trailer that makes it seem like Mark has a wife and child waiting for him back on Earth, he doesn’t. That would be an easy way to make the story more wrenching, but, true to the book, the movie doesn’t go in that direction. He does have parents, though, and in one of the most poignant scenes, Mark writes a message to Commander Lewis telling her to visit his mom and dad if things don’t work out for him. He wants her to tell them that he has no regrets, that his mission to Mars was bigger than himself and it was even worth dying for. It’s a touching moment, but never feels like a cheap bid for tears.

But old habits die hard, so as we watch the crew assemble and prepare for their rescue mission, we start to wonder which one will bite the dust. Someone has to die, right? Will Lewis sacrifice herself for Watney, “Armageddon”-style? Will Chris die trying to save Beth in a scene manufactured for maximum waterworks? Will Mark meet an untimely end and float around in outer space until the end of time? None of the above. They all survive, and audiences get to leave the theater feeling nothing but unequivocal joy.

Sean Bean for the win!

Poor Sean Bean. His characters so often bite the dust. Not this time, though — he survives all the way to the credits and even becomes a golf instructor. If only Ned Stark could have had it so easy.