It’s too bad there’s only one Joss Whedon. Think of all the cruddy superhero movies we would have missed if he had been available during the making of ‘Daredevil,’ ‘Green Hornet’ or any of a legion of other worthless films that saw their way through fruition even though Warner Bros. found Whedon’s ‘Wonder Woman’ unacceptable. These are the same people who green lit and released “Green Lantern.”

Instead of whining, it’s best to celebrate the fact that Whedon has something new out and that he has managed to treat the delicate property in his care with the right amount of reverence and wit. “Marvel’s The Avengers” works because Whedon remembers the greatest gift that Stan Lee brought to comics: superheroes with real-world neuroses.

In the better movies based on Lee’s co-creations, the stories become more accessible because the heroes involved are wrestling with the same battles with ego, anxiety, loneliness and other afflictions that flesh and blood people face. Many times interpersonal feuds can be as catastrophic as the whims of unchecked super-villains.

Because his TV series “Buffy the Vampire Slayer” dealt with real world dilemmas in a fantasy context, Whedon is a nearly ideal person to be bringing some of Marvel’s top characters together and to life. He makes better use of Dr. Bruce Banner/The Hulk (Mark Ruffalo) and Steve Rogers/Captain America (Chris Evans) than the filmmakers who handled their solo movies (and there have been two for the Hulk).

Ruffalo looks suitably tormented about the fact that he could turn into a giant green ball of rage without warning, and Evans now has more to work with and gives Captain America more personality and more emotional weight. He looks understandably pained about having lost everyone he knows because he’s been asleep for seven decades.Both of them are needed to take on a demigod named Loki (Tom Hiddleston) who has used a shortcoming in a renewable energy source to travel from his home in the realm of Asgard to Earth.

Vain and resentful that his brother Thor (Chris Hemsworth) is the heir to the throne back home, he thinks that humans, whom he can control simply by touching their chests would be ideal slaves for him. After all because people kill each other randomly, perhaps a worldwide dictator would be a good thing.

Not exactly. Loki is as shortsighted as he is egotistical, and Thor wants to bring him back to Asgard for punishment. That’s a nearly impossible goal.

Superspy Nick Fury (Samuel L. Jackson) realizes that conventional weapons are useless against a deity, and he has the unenviable task of recruiting The Hulk, Captain America, Thor, Black Widow (Scarlett Johansson), Clint Barton/Hawkeye (Jeremy Renner), and playboy weapons contractor Tony “Iron Man” Stark (Robert Downey, Jr.). While all have formidable abilities, getting along is a challenge. Dr. Banner is an antisocial recluse, and Stark has ego issues that rival Loki’s.

If it takes a while for Whedon to set up the battles, he knows that without the distinctive personalities Lee gave his creations, “Marvel’s The Avengers” would be a shallow, bloated excuse for people to fly and for exotic machines to explode.

Watching The Avengers learn to trust each other enough to keep Loki from taking over our little planet is as much fun as the action, and there’s a lot of that. Whedon’s typically snappy dialogue turns what could have been dry exposition into genuinely entertaining moments. Watching Stark’s face when he realizes he’s as much of a megalomaniac as Loki is as gratifying as watching the Hulk tear up buildings.

While I am lukewarm on the CGI Hulks that have been in the last two movies, the mean-green version of Ruffalo comes the closest to being convincing. I’d prefer to have another bodybuilder like Lou Ferrigno play the role, but this new version is less annoying than his predecessors.

Here’s hoping that Whedon is available for any follow ups (the post credit sequences indicate some might arise). If he’s not, Disney, who now own Marvel, would be wise to find another filmmaker who can meld the real world and fantasy so effortlessly.