Roald Dahl was a lucky author, one of a very few writers whose wonderful stories and novels were almost always turned into reasonably wonderful movies.

I used to put that down to luck, and certainly there was some luck involved, as things can always go wrong with a film, even when talented people make it. But I think most of the credit belongs to Dahl. Matilda, Charlie, Mr. Fox, and all the rest are wonderfully drawn characters—not fussed over, just vivid. And the stories move like they’re on greased wheels. A Dahl story never feels rushed and never dallies, and they’re all very hard to put down, even when you’ve read them before.

Kids may put up with bad stories one time through, but the stories they love, the ones they want to hear or read themselves again and again, are almost always very good. And almost as invariably, those stories are written by people who know backwards and forwards how to construct a tale, whether in words or pictures—the Potters and Steigs and Dahls of this world.

Judging literature numerically is a risky business, but it seems safe to say that Dahl, whose books have sold more than 200 million copies, knew what he was doing.

For one thing, he was ruthless. Or, if that’s too strong a word, let’s just say he did not coddle his readers, young or old (and as for what he wrote for grown-ups, he is surely the only successful children’s book author to ever get away with writing stories and novels for adults that are often, as my aunt would have said, prurient, and often just this side of pornographic).

Like Beatrix Potter, he wrote about animals as they are, red in tooth and claw. If you find yourself reading The Fantastic Mr. Fox to a young audience, you will surely be thinking as you read: This is a story about a fox that steals and kills chickens and geese and turkeys. That fact is acknowledged but not discussed in the story. But it looms over everything. How, you keep wondering, will Dahl handle things when the fox actually gets in the henhouse?

Like this: “Mr. Fox chose three of the plumpest hens, and with a clever flick of his jaws he killed them instantly.”

Nothing more is said about that. Mr. Fox and his children take the chicken carcasses and depart the henhouse, and the story goes on its way.

Dahl was not breezy about death (as an RAF airman in World War II he had nearly been burned alive in his crashed plane, thanks, at least indirectly, to the stupidity of his superiors). But he didn’t go on about it either. It was every bit as much a part of life as love and good and evil and cruelty, and there is a lot of all those things in his stories.

The BFG, the film version of which hits theaters today, is largely concerned with a group of vicious, cannibalistic giants (and one, the title character, who isn’t). Charlie and the Chocolate Factory slays, or at least “disappears,” any number of greedy, gluttonous children. Evil is everywhere in his stories, and even though good does triumph in the end and the wicked are punished or killed, it’s almost always the bad characters you remember most vividly.

There is no denying that Dahl was an imperfect, complicated man. He loved to say outrageous things, many of them anti-Semitic. How much of that he meant is anyone’s guess, though is there ever a good reason for saying hateful things about people? But he was equally fond of saying and writing things that put him in a bad light, too. For example, in Going Solo, his late-life memoir about his World War II experience, he records an encounter with a Zionist who tries to explain the idea of a Jewish state to the baffled, uncomprehending young airman. The very point of the story—the reason for including it in the book—is to illustrate Dahl’s ignorance and parochialism.

Flawed people do make great artists, though, and in his art, Dahl left aside any troubling prejudices he may have harbored. We do well to remember that a person’s artistic output is usually that person putting their best foot forward. If they happen to be good, lovable people in the bargain, that’s just gravy. But if we judge Dahl strictly by his books, he was a hero, especially in his children’s books. He never lied to children about what a mess the world is. If anything, he confirmed what they already knew: that children, like adults, can be stupid and mean, that bullies aren’t always punished, and that the weak must be clever and sometimes even duplicitous if they are to outwit those who persecute them. The amazing thing is that out of this dire vision he made stories that are not only entertaining but fun more often than not. If that’s not genius, what is?

The best movies made from Roald Dahl books:

The worst of the best:

Charlie and the Chocolate Factory and Willy Wonka and the Chocolate Factory are both enjoyable, better than average movies that the whole family can watch without killing each other. There is something sort of creaky about both movies, but Gene Wilder and Johnny Depp are both appropriately charming and sinister, and any movie with Oompa Loompas is something to love.

James and the Giant Peach is good but it never quite gets off the ground. But then, this is one Dahl book I’m not that fond of, so maybe I’m missing something.

The best of the best:

The Witches is Nicholas Roeg’s best movie, even better than Don’t Look Now. I don’t know anyone, old or young, who isn’t terrified by Anjelica Huston’s head witch. You have to go back to Nosferatu to find evil this frightening on screen. And yet the movie is not so scary that it doesn’t encourage repeated viewings. When my children were children, it was in steady rotation all the time.

The Fantastic Mr. Fox may not be Wes Anderson’s best movie, but it may be the one instance of a movie being better than the Dahl book it’s based on. On the book’s bare-bones plot, Anderson has added his usual eccentricities of character and incident, but the best thing of all is George Clooney’s peerlessly droll performance as the voice of Mr. Fox. It is, in a word, fantastic.