There’s a key scene in Joss Whedon’s “The Avengers” where a host of superheroes are in a room together discussing the whereabouts of a glowing cube that opens portals to other dimensions. That description alone suggests the scene would be a dud. It’s generally not a good idea to sit characters down and have them discuss the plot — especially if it’s ridiculous — lest filmmakers bore the audience, further confuse them, or seem condescending. But Whedon’s take on the scene is indicative of the success of the entire film. It’s a lot of these characters’ first time interacting with one another, so Whedon fittingly plays it like a romantic comedy.

It’s not a typical courtship, of course. There aren’t any sexual feelings between the superheroes (unless you read the fanfiction — oh my), but there is ample dishonesty, jealousy, miscommunication and eventually adoration. The entire film is essentially a series of meet-cutes between legends, but instead of being a detriment to the movie, Whedon maintains the light tone for maximum effect. That’s how scenes that lay out the mythology of a glowing cube can work: No matter what they’re talking about, people are always concerned with making an impression on a first date.

Although there are plenty of well-shot action scenes in the movie, the real star is the screenplay, which balances seven or eight idiosyncratic main characters and manages to flesh out each one of them. Captain America, Thor, Iron Man, Black Widow, Hawkeye, Nick Fury and Bruce Banner (as well as Banner’s big, green alter ego) each contribute something unique to the roster and all have discernible arcs that dispatch them to their destinies or back to their respective solo franchises.

It’s a graceful juggling act, the accomplishment of which is impressive enough — but add in the film’s terrific dialogue, and now Whedon’s just showing off. The dialogue is pitch-perfect, balancing hokey hero talk with self-aware humor and terrific one-liners that come rapid-fire. There is a sense of timely skepticism in the writing, but also of pride. Yes, most things in “The Avengers” are corny, but America has always indulged in campy comic book characters, and the wars and hardships of past decades haven’t snuffed the excitement we feel when seeing them in action. Even cynics need heroes.

Credit is due to the cast for bringing the heroes to life. Each actor has to strut their stuff in a silly outfit while also revealing the vulnerability of their character. Yes, Chris Hemsworth’s Thor is a strange sight walking through Midtown Manhattan with his flowing red cape and giant hammer, but viewers can recognize his pain in being there, defending the Earth against his brother’s prideful takeover. Robert Downey Jr. as Tony Stark is as caustic as ever, but he’s fascinating to watch when realizing he can no longer fight only for himself. Perhaps Scarlett Johansson and Mark Ruffalo fare best. Johansson’s Black Widow, a trained liar, puts up so many fronts that moments of honesty feel appropriately precipitate, and Ruffalo’s Bruce Banner is a man boiling under a meek smile who would rather crawl out of his skin than have it turn green one more time. Chris Evans is the steady center of the movie, a man displaced in about every way possible who wonders if his kind of hero is just too old-fashioned.

The only shortcoming of “The Avengers” is that it feels a bit short despite running a healthy two hours and 15 minutes. The final battle arrives on the heels of an extended action sequence in the second act before most viewers are ready to take in more fireworks. More time spent on the fallout of that middle section would have provided some needed table-setting for the finale and afforded each hero a few more human moments before launching once more into the fray.

Still, “The Avengers” is nearly the best movie it could possibly be and is certainly one of the best superhero movies ever made, easily eclipsing Marvel’s other offerings and matching up well against less fantastical competitors like “Unbreakable” and “The Dark Knight.” It’s a safe assumption that Marvel will release a sequel after a few more Thor and Captain America movies are made. Here’s hoping “Avengers 2” also emphasizes the awkward-date aspects of pairing heroes instead of just the holes they leave in buildings. Let us get this one, Avengers. You buy next time.

Grade: A-

Culture Getting To Know Them: Whedon's ‘Avengers' an Engaging Bunch