Matt Damon in a scene from “The Martian.” (Aidan Monaghan/20th Century Fox via Associated Press)

I was out of the country when “The Martian,” Ridley Scott and Drew Goddard’s lively, lovely movie adaptation of Andy Weir’s novel about a botanist named Mark Watney (Matt Damon) stranded on Mars, arrived in theaters. But while it can be fun to offer the first look at a film, sometimes it’s even more interesting to see the debate that comes together around one. And so it was fascinating to come back to find a debate over whether “The Martian” constitutes “competence porn,” a pop culture trope that involves watching smart people solve seemingly-intractable problems, and whether that’s a good or bad thing.

I’m all for movies that show a real and intelligent interest in the mechanics of law, or heists, or space farming, but it strikes me that these sorts of debates are missing the symphony of the planets for the Martian regolith. “The Martian” is a movie about a smart man who innovates his way out of desperate circumstances. But it’s also one of a number of recent space movies that are all about our relationship to Earth in general, and our relationship with China in particular.

One of the things that’s striking about “Gravity,” “Interstellar,” and now “The Martian” is that each of the three big space movies to debut in the last three years involves astronauts who are eager, even desperate to get home.

In Alfonso Cuarón’s “Gravity,” Sandra Bullock plays Ryan Stone, a scientist who has turned to space in part because of her alienating grief over the death of her son. When an accident disrupts her mission and forces her to take desperate action to try to survive, Stone learns that she still loves life enough not to want to die in the aridness of space that seemed a match for her broken heart. The movie ends with her climbing out of the lake into which she’s crash-landed, newly baptized as a member of the human race.

“Interstellar,” Christopher Nolan’s 2014 film about astronauts on a desperate mission to find a new home for humanity, which has been imperiled by global warming that threatens the food supply, sends Cooper (Matthew McConaughey) on a dangerous mission to assess planets that might be able to support human life. While the mission has its own propulsive energy, “Interstellar” is defined in part by Cooper’s emotional pull back to Earth, where he left behind his daughter Murphy (played by Jessica Chastain and later Ellen Burstyn). Every stop on the trip adds years to Cooper’s journey because of the way time functions on each planet, making it less likely that he’ll be able to return home while Murphy, who has grown up resenting her father, is still alive. When Cooper finally heads back into space, it’s with Murphy’s blessing.

She has made a scientific breakthrough that allowed her to save humanity, if not the species’ home on Earth, in his absence. But we apparently took a powerfully specific vision of Earth, one that looks like Ken Burns’s “The Dust Bowl,” and where kids playing ball find new ways to break neighbors’ windows thanks to gravity manipulation. In “Interstellar,” the drive to space isn’t motivated by the dream of a different way of living and being human. It’s all about the desire to preserve what we have.

“The Martian,” in keeping with Weir’s focus on the mechanics of survival, is less philosophical. When a sudden storm on Mars forces a mission to evacuate and return to Earth, Watney is left behind by accident after his biomonitor is destroyed and his colleagues mistake him for dead. On a practical level, Watney can’t survive on Mars, so he has to find a way to get home. In so much as “The Martian” meditates on the way leaving home helps us understand what it means to be of Earth, it’s mostly through humorous meditations on Watney’s accidental colonization of Mars, and, more substantively, a look at how his plight affects the people watching him back home. Specifically it shares with “Gravity” the idea that the risks of space might help the United States and China find common ground.

The role China plays in both “Gravity” and “The Martian” is an acknowledgement of the power of the Chinese box office, as well as a nod to real-life geopolitical tensions. In both films, it’s Chinese technology partnered with American gumption and creativity that save our heroes.

“Gravity” explicitly plays Russia — America’s old enemy in the space race — and China against each other. It’s a Russian missile that sets off the disaster that strands astronauts Matt Kowalski (George Clooney) and Stone in space, and the existence of a Chinese space station that provides Stone with her hope of survival. Still, though the equipment is Chinese, it’s Stone’s will to live and creativity that ends up saving her, rather than anyone else. The Chinese may be in space, but Americans are still the toughest and bravest pioneers in this new frontier.

Still, it was enough to help “Gravity” capture a crucial piece of the Chinese box office when it was released in 2013. “‘Gravity’ has become a social media phenomenon in China, where the country’s space program is new and popular,” Clifford Coonan wrote in the Hollywood reporter at the time. “China first launched a man into space in 2003, and since then there’s been a space walk, a woman astronaut and a recent mission to land the Jade Rabbit rover on the moon. China has advanced only to where the U.S. was in the 1960s, but its program has become a symbol of the country’s growing progress. And ‘Gravity’ is sympathetic to those efforts. In one scene, Bullock’s character is rescued by a Chinese ship, and there are nods to China’s technological abilities throughout.”

China plays an even bigger role in “The Martian,” and the book and film have more ambitious ideas about the possibility of space exploration to unite two countries that find themselves in increasingly antagonistic positions. After U.S. efforts to get Watney the supplies that would allow him to stay on Mars until a subsequent mission end in disaster, Chinese scientists approach their American counterparts to offer up a booster rocket that had previously been a state secret. It’s a self-sacrificing decision that denies the Chinese space program an opportunity to steal a match on the Americans. But once again, it also fuels a rebellious, creative American spirit, giving Captain Lewis (Jessica Chastain again) the supplies she needs to blow off official NASA orders, extend her crew’s mission, and go bring Watney home.

“The Martian,” in an ending that the film tacks on to the book, takes this fusion of Chinese technology and American adventurism a step forward. We see American astronaut Rick Martinez (the always-welcome Michael Peña) heading back into space on what appears to be a joint American-Chinese mission. That’s an optimistic vision of cooperation, the spirit of scientific exploration and our common humanity turning the space races of old into a transnational collaborative endeavor. It also ought to be a massive sop to Chinese moviegoers, who will get their crack at “The Martian” on November 25.

If there’s something a tad Earth-bound and business-minded about the shape of our current space movies, there’s still something hopeful about the resurgence of space movies. Even if all we hope for is personal redemption, a small measure of scientific cooperation between nations, or a ball game near Saturn, “Gravity,” “Interstellar” and “The Martian” have rescued space exploration from the budget hawks and returned it to its proper position as a stage for dreams.