Avengers: Endgame, the fourth instalment in Marvel’s superhero crossover franchise, made an unprecedented $1.2bn at the box office last weekend.
It’s the biggest three-day haul in movie history; and a testament to the strength of Marvel’s serialised approach to story-telling.
Directors Joe and Anthony Russo said they were “definitely surprised” by the film’s “runaway success” – but also announced they were taking a break from the superhero genre, after making two Captain America and two Avengers films in the space of seven years.
“One of the most important things we learned is that when you’re shooting two of the largest movies ever made, and you’re shooting them back to back… is don’t shoot ’em back to back,” Anthony told BBC News, confirming the duo’s departure.
Joss Whedon experienced similar emotions after writing and directing the series’ first two instalments.
“Why on Earth would I make another Avengers movie? They’re really hard,” he mused on the DVD commentary for Age of Ultron. “It was ill advised. I see that now.”
But Marvel’s Cinematic Universe will continue – with new instalments of Spider-Man and Guardians of the Galaxy already confirmed; and a new configuration of The Avengers almost a certainty.
If you somehow end up in the directors’ chair, how should you prepare? Here are 11 key lessons from the people who made the originals.
This article does not contain spoilers for Avengers: Endgame, but will discuss plot details from the preceding films.
1) Start out on a TV show
All three directors of The Avengers made their names in TV. Joss Whedon created Buffy The Vampire Slayer and Firefly; while the Russo brothers worked on cult comedies Community and Arrested Development.
Those experiences were invaluable when it came to wrangling a cast of more than 20 characters, “because they are all ensemble shows,” says Joe Russo.
“Those were shows that had to be executed in 21 minutes, they had to be funny, and they had to have a plot. And sometimes, like in an episode of Community, you’d have 30 speaking parts – so that’s an exercise that certainly trained you in trying to contain as many characters as we do in two hours.”
“We’re drawn to multiple points of view and group dynamics, because we grew up in a very large Italian-American family,” adds Anthony, “so we’ve always loved working with ensembles.”
2) Know the characters inside-out
The joy of the Avengers is seeing how these disparate characters, and the actors who play them, interact.
“There is a natural competition when the leads from two different franchises get together and it plays right into the competition of two heroes getting together – so it is delightful,” observed Infinity War script-writer Chris Markus last year.
“A very compelling element of crossovers is who has primacy. They’re all leaders, they’re all used to leading their own worlds, and once you put them into the same room, who gets to call the shots? That is a notion we revisit several times.”
Still, it’s a challenge to give 23 separate characters a distinct voice in the confines of a three-hour film.
Luckily, there’s an old screenwriting tip that comes in handy: If your characters are well-written, you should know how each of then would react if they accidentally fall into a swimming pool.
“Thor from Infinity War would mess that pool up,” says Anthony. “Whereas Rocket – he’s not exceedingly self-deprecating, so I think I could see him gag and spit. He’d be a little irritated.”
3) Take a lot of toilet breaks
Scott Derrickson recently tweeted how he “ran into Joe Russo outside the men’s room,” while he was editing the Doctor Strange film in 2015.
“He pitched me the basic story for both Infinity War and Endgame [and] I told him that if he could make the first movie work, the second movie would be incredible.”
Which begs the question: How long did Joe keep his colleague waiting for the loo?
“I think it was like a 10-minute pitch,” he laughs.
“But the funniest thing is that people are like, ‘Do you guys get together at Marvel all the time and have meetings about the storylines?’
“And the answer is, ‘No, it all happens on the way to the bathroom’. That’s where everyone runs into one another and starts exchanging information.”
In other words, don’t hold it in.
4) Keep the story simple
For all of the acclaim heaped on Infinity War, the plot can be boiled down to three words: “Thanos wants stones”.
“We have so many characters in the movie that we knew if the plot was complicated, it would take too [long] to explain and that would take away from the characters and the action,” said screenwriter Chris Markus on the DVD commentary.
Even the number of Infinity Stones caused a headache, said co-writer Steve McFeely.
“Had we invented the idea of Infinity Stones in a vacuum, I’m sure we would not have decided there were six of them. Six MacGuffins is a lot for one movie.”
To keep things moving, the Russos dictated that every scene “had to do more than one thing”.
So the opening sequence – in which Thanos crushes the Hulk, kills Thor’s brother Loki and steals one of the Infinity Stones – conveys three plot points in two minutes.
“It establishes Hulk’s journey – he’s been defeated and doesn’t particularly want to help [Bruce] Banner over the course of the movie,” explained Anthony Russo.
“It establishes a vengeance story for Thor by taking out his brother, and it establishes the plot for stone collection.”
5) The odds should seem insurmountable
“I wanted to make a movie where being a superhero wasn’t a free pass,” said Joss Whedon, about scripting the first Avengers film in 2012.
“Where things were tough enough that you would be as strong as you could possibly be and still not be enough to deal with what was going on.
“The stakes,” he added, “are always the same.
“The stakes are: You could die.”
6) Acknowledge the ridiculous
When your heroes are up against a sentient robot who’s ripped an entire city off the face of the planet, it pays to acknowledge that everything’s a bit far-fetched.
And so, at the climax of Age of Ultron, Hawkeye takes stock of the situation and says: “We’re fighting an army of robots and I have a bow and arrow. None of this makes sense.”
“I refer to that as ‘inoculation,'” Whedon explained. “He says the thing we’re all thinking, and it plays.”
7) Talk to the animators
The Avengers films are some of the most effects-heavy movies in history, with four major characters – Thanos, Hulk, Rocket and Groot – created by computer animation.
Making them believable is a crucial task, so both Whedon and the Russos started working with artists before the scripts were written.
“Thanos was difficult,” says Joe Russo. “We knew we were sunk if Thanos wasn’t photo-real, so we spent two years doing research and development on Thanos and making sure that he would work correctly.”
For his debut as the Hulk, actor Mark Ruffalo even wrote a letter to the effects team, stressing that his motion-captured performances were only the first stage of creating the character.
“We are all playing this part,” he wrote. “I have taken it as far as I can and you guys have to use what you can and then forget about me and become the Hulk.”
“It was incredibly inspiring to the animators,” recalled Whedon, who set aside a day to explain how the movie portrayed two different aspects of the green-skinned monster: “The one Bruce Banner becomes unwittingly and the one he decides to be”.
“What I found out later was that most of them – in fact all of them – had not been able to see the script, so they were just animating things in a vacuum,” he said. “So it was incredibly productive.”
8) Always put the raccoon on a chair*
Have you ever noticed that Rocket – the CGI raccoon played by Bradley Cooper – is almost always standing on a chair?
“That’s a great point,” says Anthony. “When you’re dealing with characters of radically different sizes, it presents a lot of framing challenges.
“You start to learn tricks in blocking [staging the scene] to keep everyone in the same relative plane, so you can actually shoot them.”
(* or a table)
9) Ban t-shirts
When we first meet Scarlett Johansson’s Black Widow in Avengers Assemble, she’s tied to a chair, barefoot and in a vest top, apparently being interrogated by shadowy Russian forces.
Of course, she breaks free in spectacular fashion… but her outfit made it one of the hardest stunt scenes to choreograph.
“Whenever you say ‘she has no sleeves’ to your stunt co-ordinator he cries man tears,” Joss Whedon noted afterwards.
“It’s very difficult to do a lot of these things if you can’t pad up the knees and elbows.”
10) Embrace the darkness
Making these films is “incredibly physically demanding,” says Joe Russo, and there will inevitably be dark days.
“When you start out, it’s all perfect in your head,” Whedon told BBC News in 2015, “and when you work with the actors, it gets better.
“Then at some point you’ve been editing for so long you start thinking. ‘Who am I? What’s happening?’ and you forget why you ever showed up, and what you’re trying to say. And you despair. It’s a very bleak experience.
11) Emotion > action
Adding character beats to action sequences has been Joss Whedon’s calling card since Buffy – and he pulls it off perfectly in Age Of Ultron’s climactic battle, where Hawkeye stops whaling on the bad guys to discuss home improvements.
“You know what I need to do? The dining room,” he tells Black Widow. “If I knock out that east wall, it’ll make a nice work space… What do you think?”
“That sequence is, for me, the reason I show up,” Whedon said in the commentary. “Where two people in the apocalypse are talking about re-doing the dining room, that says more about their relationship than anything else I could have done.”
The Infinity War team made a similar decision. Their film doesn’t end with a battle but the emotional fallout of Thanos’s “snap” – scenes that left some viewers in tears.
So what will they feel when they walk out of Endgame?
“Catharsis,” says Joe Russo.
“We realise how impactful the Infinity War ending was,” adds his brother.
“We saw how difficult it was for many people and that’s something that we really respect. So we were very committed to paying off that kind of a story.”
Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email entertainment.news@bbc.co.uk.