“Serenity” proves what many of us have always believed, which is that given the chance, Joss Whedon can write and direct better than nearly anyone in Hollywood. And he’s … gasp … a TV guy!

His shows “Buffy the Vampire Slayer,” “Angel” and “Firefly” inspired much geekiness, to be sure, but no nerdery is required to enjoy “Serenity,” a ridiculously smart and funny sci-fi Western space adventure that picks up where the short-lived “Firefly” left off.

I come at the film almost as a novice, having watched only the first few episodes of “Firefly.” I don’t know whether that series’ hardcore fans will love the movie, though I suspect they will. What is certain is that admirers of great stories of heroes and semi-heroes who do battle with evil while engaging in witty conversation will find much to enjoy here. Picture “Star Wars” mixed with, I don’t know, something really intelligent and witty and you’ve got “Serenity.”

A few hundred years hence, the galaxy has come to parallel the American Old West. You have your central planets that all operate under the Alliance, a well-intentioned organization that has become corrupt and bureaucratic; and you have your outer planets, the lawless ones on the frontiers of space, barely settled and resisting Alliance efforts to bring them into the fold. These planets, to bring home the comparison, are full of futuristic saloons and decorated in sagebrush. Outlaws, of which there are many, carry laser guns as well as the old-fashioned bullet kind.

One of these outlaws is Malcolm Reynolds (Nathan Fillion), a Han Solo mercenary type with a rickety spaceship, a small crew, and a staunch position of self-preservation. The ship is called Serenity, and there’s no word on whether it came by that name ironically. Despite the best efforts of mechanic Kaylee (Jewel Staite) and pilot Wash (Alan Tudyk), most landings are borderline crashes — not helped by the fact that they’re usually on the run from whomever they’ve just robbed. (All for clients, of course. They don’t steal for their own purposes.)

Wash’s wife Zoe (Gina Torres) is Mal’s first mate, and the muscle — Mal’s Chewbacca, I suppose — is Jayne Cobb (Adam Baldwin), whose mouthy insubordination is indicative of the level of respect the captain gets from his crew. Jayne is particularly vocal against the two freeloaders currently onboard: Simon Tam (Sean Maher), who has some training as a doctor; and his sister River (Summer Glau), a 17-year-old psychic who has begun to display psychotic tendencies.

Simon rescued River from an Alliance-run facility, and anyone who annoys the Alliance is a friend of Mal’s. Still, it means Mal must add the Alliance to the list of people who are constantly chasing him. River’s presence is a burden, in other words, made worse by her sudden and seemingly unprovoked whirlwind of butt-kicking in a saloon.

Meanwhile, there is a nameless assassin (Chiwetel Ejiofor), smooth of voice and cold of demeanor, who has slain many people in his quest to get to River. There is something in her mind, perhaps stored in her memory, perhaps dealing with whatever the Alliance was doing to her in that facility, that is of importance to him.

The Serenity crew tend toward the cowardly, with running and hiding as a frequent game plan, and no qualms about fighting dirty when fighting is inevitable. This is plenty funny, of course, and for as thrilling and action-packed as the movie is, it’s pretty hilarious, too. (One thing we Whedon fans admire about him is his ability to combine heroics, adventure and humor, even in the same scene.) But the movie’s arc for these characters has them slowly developing a sense of justice and rightness, an acceptance of life’s uncertainties coupled with the realization that just because they don’t have all the answers doesn’t mean they can’t believe in something.

It’s Mal, as the protagonist, whose psyche is most at center-stage, and it’s a little troubling. He’s so single-mindedly selfish and mercenary that his eventual slight change of heart may be too little, too late. When the film’s over, you may remember him as a jerk — an entertaining one, sure, and a cool character, but ultimately a creep. I get the feeling that’s not what Whedon intended.

What Whedon surely did intend are the many touches that remind us of “Star Wars,” “Star Trek,” Whedon’s own “Buffy the Vampire Slayer” — heck, one scene is straight out of a zombie flick, as our heroes are besieged by a posse of bloodthirsty humans called Reavers. Yet nothing in the film feels derivative. Where it is reminiscent of other sci-fi icons, it seems to be in homage, always enlivened by Whedon’s wit and astute visual sense. “Serenity” is completely fresh, perhaps the best sci-fi film this year, and one of the better ones of any genre.

A- (1 hr., 59 min.; PG-13, a couple profanities, one sexual reference, a lot of action violence and some blood.)