This article contains major spoilers. You have been warned. 

What is a life worth? What are many lives worth? What are you willing to trade to save many people? These are the complex questions facing the heroes, and villain, in Avengers: Infinity War. They are serious topics for a film series in a genre that is usually defined by levity and quip-heavy dialogue.

But the serious approach seems to be working. Even by the standards of the remarkable Marvel Studios film series this latest film is breaking records. The new movie which opened last month is outperforming Star Wars: The Force Awakens and had the biggest opening of all time.

In the process it demonstrates how the best popular culture can deal effectively with the big questions. Indeed, the most successful Marvel productions wrestle with moral dilemmas. Captain America: Civil War (released in 2016) had at its core a debate about the acceptability of government oversight (Iron Man loves regulation; Captain America less so).

Some Marvel films have dealt with less weighty issues, of course. Thor 2 (2013) was paper-thin on both plot and subtext. But even those lesser Marvel productions employ a sharp sense of humour, sadly lacking in the films being produced by Warner Brothers in the DC Universe.

Indeed, the filmmakers at Marvel Studios have been consistently the best in taking the essence of comics and translating it to the big screen.

Of course, comics have a rich history of offering a critique of governments and society’s prejudices. The X-Men have long been recognised as being influenced by the Civil Rights Movement and there are numerous examples of politics in the Marvel back catalogue.

In Captain America: The Winter Soldier, the smart political thriller of the Marvel series, espionage, the use of drones and risks to privacy were the themes. Its release during the Edward Snowden affair was explained by the filmmakers, who confirmed it was written well before the whistleblower’s mass data dump. If it was a coincidence, it was timely.

The latest film goes even deeper, addressing philosophical issues.

The villain of the piece in Avengers: Infinity Wars is a large, purple, walking, talking Malthusian. Thanos, a Titan, is maniacally obsessed with the elimination of half of the population of the universe, owing to the growing scarcity of resources and population increases. He plans to deliver this atrocity dispassionately, irrespective of whether his victims are rich or poor. It is equal opportunities extermination. Thanos is quite mad, but unlike most CGI-motion-captured baddies, at least he explains himself and his motivations.

That complexity helps explain why Marvel Studios has managed to sustain this series for so long. The central characters tend to be three-dimensional and properly fleshed out. In Thanos’ case, we find out that his own planet fell into ruin because his fellow Titans did not heed his warnings about population growth.

In addition, we have the subplot of his love for his adopted daughter, Gamora. Their own relationship is complex owing to the fact that she was orphaned at his hands, her parents the victim of another mega-atrocity.

The tragedy of Thanos sacrificing Gamora builds his character. At points the viewer almost feels sorry for a multi-billion-person murderer. Then (and major spoiler alert here) he succeeds, kills half your favourite characters and the movie closes with him sitting on a hill watching a sunrise, having fulfilled his quest to deliver a more prosperous, less populated universe.

How does he win? Only because the the good guys engage in the most blisteringly idiotic behaviour. They refuse to ‘trade lives’ until we get to a point where it is irrelevant that they’ve avoided the sacrifice. Instead, half the universe is disappeared with the click of Thanos’ fingers.

In this way, a succession of over-sentimental decisions about significant others and friends leads to the Malthus-inspired catastrophe.

The message is that our heroes need to buck up and learn to act for the greater good. An inability to make sacrifices means they ultimately fail and the Malthusian catastrophe occurs. That’s the moral of the story – you need to believe in what you’re fighting for more than your opponent. Otherwise, you lose.

There’s a second part to the latest movie due out next year. Maybe by then the Avengers will have learnt to do what is needed to win. Irrespective, Marvel will continue posing big questions and making huge profits from its army of fans.