With the worldwide success of Buffy The Vampire Slayer and its spinoff Angel to his credit, you'd have thought that creator Joss Whedon could do no wrong.

You'd be wrong. Three years ago his TV series, a space drama called Firefly, was cancelled halfway through the season after 15 episodes.

Like the undead that populate Buffy and Angel, he didn't take it lying down and hawked the idea around until he found a movie studio willing to back a feature film follow-up to Firefly.

To support him, he had the fans who'd helped DVD sales of Firefly to impressive levels. It had happened to him before with Buffy. Only that time the film version came first. It flopped. Undeterred, Whedon took control of the TV series and steered it to worldwide success and an Emmy nomination.

He's both writer and director of Serenity, the $44m spin-off from Firefly which has not only satisfied fans but won good reviews from critics who usually dismiss science fiction as a silly genre.

In person, Whedon could easily pass for one of the geeks - sorry, devoted fans - that have backed him in his bid to bring back Firefly from the dead. But he's clearly a man in tune with what the public want. Before he became embroiled in fantasy TV and films, he won an Oscar nomination as the co-writer of the computer animated hit movie Toy Story.

Serenity is the spaceship captained by Malcolm Reynolds and his ragtag crew after a galactic civil war. They live on the edge of the law, transporting cargo and passengers, mostly at odds with the Alliance, which dominates the galaxy.

What makes it stand out from the other space operas like Star Wars is Whedon's script that marries comedy, drama and space battles in equal measure. You don't have to be a sci-fi fan to like it. You wouldn't be far wrong to describe it as a western in outer space.

Whedon, in London for the opening of Firefly, says that the western influence dates back to reading a book detailing the minutae of frontier life. His interest became obsession. "I found that very exciting because we're not leading that sort of life any more," he says. He translated the western setting to outer space.

Universal seemed happy to let him make the movie he wanted with the original cast of the TV series and not a star name among them. "They never said cast famous people. They did talk of getting a name for the villain, but the more they thought about it, they said, 'just get the best actor you can find'."

Telling the actors that the series was returning was a particular pleasure. Not that they believed him. "I thought he was drunk again," says Nathan Fillion, who plays Malcolm Reynolds. "But he was telling the truth. I was very excited but took a long time believing it was true. It wasn't until the third week of filming that I began to relax and know it was going to happen."

Returning to the Serenity and the new, improved version built for the film was a moving experience. Summer Glau - who plays River, a passenger with special powers - says: "It doesn't feel like a set. It's really built like a ship, it's not like a wall here and a wall there. You feel like it's your home."

Whedon may even have shed a tear to be back aboard Serenity. "When Nathan came on, we walked on the set together and he said, 'captain on deck'. I don't know whether he meant himself or me, but it really moved me. Filming back on Serenity was extraordinary. The one part of the film I remember best was when we were on the ship again."

The Firefly/Serenity affair has had an effect on him. "I regret the things I lost and love the things I have. I loved Firefly, I love Serenity. But they are completely different things. It's like having a child and then having another child," he says.

"I make movies for everybody. What's interesting about science fiction is the fiction. Everything I do, no matter how many monsters and spaceships are in it, has to be about people."

What if Universal had refused to let him director Serenity? "I would have set the script aflame in the lobby of Universal," he says. "After years of working in TV, they got it into their heads I might be able to handle a film."

Now it now looks like he'll get the chance to direct the big screen revival of the old TV hit Wonder Woman.

Serenity (15) is now showing in cinemas. Firefly, Buffy The Vampire Slayer and Angel are all available to buy on DVD.