Five years ago, Joss Whedon's career wasn't going so well. The man behind the TV shows Buffy the Vampire Slayer and Angel had recently written and directed Serenity, a big-screen version of his short-lived series Firefly. It was his feature directing debut, and it was a commercial disappointment. Not long after, Warner Bros. decided to part ways with Whedon on his big-screen version of Wonder Woman, ending a period that Whedon later said was a particularly rough one for him. "I in no way want this to be a slam on Warner Bros.," he said in the summer of 2007, "but the fact of the matter is, [Wonder Woman] was a waste of my time." He cited creative stagnation and unspecified personal issues that had contributed to his glum mood. He talked about wanting to get back into television: "I miss the quick turnaround. Get it done, get it out, every month or every week. Movies move glacially, and that's really frustrating." Arguably the king of Comic-Con culture, Whedon sounded defeated.

In a few days, it's going to be very hard to remember that Joss Whedon was at one point not the biggest thing in the film world. As the writer and director of The Avengers, he'll be responsible for what's probably going to be one of the two or three top moneymakers of the year. This is only the second movie he's ever directed. Sure, he's a fantasy/sci-fi/comic-book nerd, but so is Kevin Smith, and nobody ever let Kevin Smith close to a project with this big of a budget. So even though Whedon is such a good fit for The Avengers, it's still rather crazy that a studio let him make it.

For a while, it seemed that Whedon was destined to be a beloved cult figure that mainstream audiences didn't "get." No matter how critically acclaimed Buffy was, it was never a ratings juggernaut. Same thing with Firefly and then, later, Dollhouse. It started to become depressingly predictable: Whedon would put out a show, his fans would swarm it, but nobody else really cared. (And that includes the network putting out the show: Both Firefly and Dollhouse ran on Friday nights, and, in the case of Firefly, out of order.) His film career had its own pitfalls. Yes, he was one of the writers on Toy Story, but he had pretty horrible times working on the original Buffy the Vampire Slayer film and Alien: Resurrection. He's been a script doctor on several projects, including Speed, but he tended to hate those experiences. "I usually walk away having gotten one or two jokes into a script and made some money and feeling like I am just bereft of life," he said. "It's horrible."

Whedon has adopted a self-mocking public persona that casts himself as the lovable loser, a sort of Charlie Brown of the AICN set. Even on the eve of The Avengers' presumed commercial triumph, he projects a "Hey, I'm no big deal" air. But underneath that, you can still sense a guy who's had to fight with a bunch of studios and networks to get his vision onto the screen:

Because of his cult following, he attracts the sort of fans who really, really love the stuff he's done. (On a couple different occasions in my own life, introducing people to each other who are big Buffy fans instantly made them friends for life.) And because his fans love him that much—and because he very much operates in the world of geek culture—there's a natural inclination for everybody else to be somewhat snide about the guy. This was proven yet again with this spring's The Cabin in the Woods, which he produced and co-wrote. If you didn't like the movie, the chances were pretty good you disliked its Whedon-ness: its clever banter, its mixing of genres, its melding of social commentary with pop-culture riffing. Although there are many reasonable complaints to be lobbed at Cabin, disliking the movie for some was simply a way to smugly separate oneself from the stereotypically insular world of the geeks—criticism as a form of acting superior to a target audience.

Sixteen years ago, I saw Scream for the first time. I loved it. Not only was it funny and smart, it …
Read more Read more

All these things make it even more ridiculous that Whedon was approached to helm The Avengers. Sure, Marvel had entrusted their other properties to inexperienced or decidedly non-A-list blockbuster filmmakers. But at least Jon Favreau had had a hit with Elf and had made a sci-fi film in Zathura before doing the Iron Man movies. And Kenneth Branagh had done battle scenes in Henry V and a big studio movie with that crappy Frankenstein before helming Thor. By comparison, Whedon had directed a lot of TV, but his only film was Serenity. (His third film will be a shot-on-the-quick Much Ado About Nothing adaptation.) And The Avengers wasn't just any movie; we've been building toward this for four years, and it was expected to be Marvel's flagship film. To be fair, Marvel wasn't alone in making such a gamble—Warner Bros. did something similar when they let the relatively untested Christopher Nolan do the Batman movies—but none of these filmmakers had suffered as many public disappointments as Whedon has.

Of course, this wouldn't matter if The Avengers was terrible. Thankfully, it's actually really fun. And while it does suffer a tad from Whedon's tongue-in-cheek irreverence, for the most part it's a surprisingly traditional comic book movie. He delivers lots of laughs and action, but even if you're not somebody who considers yourself a comic-book nerd, you can still have a great time enjoying the movie on a basic summer-popcorn level. And that's probably the happiest surprise of all: The Avengers isn't a movie for fanboys; it's for everybody.

As opposed to J.J. Abrams, whom Hollywood has decided to anoint as our new ambassador of geek culture, Whedon never seems to be trying to prove to us how much he loves this stuff. Maybe that's partly why some people prefer Abrams' movies: His Star Trek and Super 8 have an ironic detachment to them that signals that we're supposed to know it's OK not to really take this stuff seriously. Despite his great sense of humor, Whedon isn't ironic. For all his cleverness, he takes his worlds seriously. And even when he's being snarky, there's a sincerity underneath it all. With Abrams, you never get the sense that he absolutely has to tell these stories: He's more of a producer who has a gift for good ideas rather than an artist following a calling. Whedon has had his stumbles, but he's undeniably someone who lives and breathes his storytelling. Even if you hate comic-book movies or anything related to ComicCon, you have to respect Whedon's integrity. His whole career in some ways has been the perfect geek metaphor: the sweet, smart, nerdy kid who stayed true to himself but never got the girl. After The Avengers, I'll be curious to see how he copes with being prom king.

Grierson & Leitch is a regular column about the movies. Follow us on Twitter, @griersonleitch.