The most obvious, hackneyed set up for a horror movie goes something like this: a group of college kids heads out to the middle of nowhere, planning to get drunk and have fun in an isolated cabin near a lake. On the way, they meet a creepy old guy who warns them that something nasty’s lurking in them there hills, but they ignore him… only to discover, as they’re picked off one by one, that he was right all along. Cue buckets of fake blood; running; screaming; the end.

So, yeah, The Cabin in the Woods looks very, very familiar. But it’s relying on the fact that you know that. This is a film that loves horror movies; it knows them inside out, and it expects you to have done your homework, too. It’s a gleeful deconstruction of the horror genre that takes an enormous amount of pleasure in holding up the most common tropes of the genre for you to recognise, and then very deliberately piling one of top of another until the whole thing threatens to topple over, Jenga-style.

But while the pieces are all there, they could end up anywhere. Recognition is half the fun, but it’s also kind of exhilarating to realise that, this time, you really can’t predict what’s going to happen. And the more you like horror movies, the bigger kick you’re going to get out of this one.

Of course, including self-aware characters and making references to other horror movies has become a cliché in its own right so while The Cabin in the Woods does do those things, it goes further than that. It understands why audiences watch horror movies, and knows that our relationship with the characters in horror movies isn’t straightforward. It knows that, while audiences identify with horror movie characters, and root for them, and cheer for them when they triumph over evil, we also need them to face up to the nastiest, scariest things imaginable.

Horror movies would be no fun at all if everyone just packed up and went home at the first sign of something scary. Much as we know we’d never go up into the attic/down into the basement/into the creepy house to investigate a strange noise ourselves, we really really want our hero and/or heroine to do it, even while we’re sitting on our sofas screaming at them to just, for the love of God, run away! The eventual defeat of a monster isn’t half as much fun if there hasn’t been a little bloodshed along the way; the heroine who manages to escape the masked maniac isn’t much of a heroine if all her friends haven’t been butchered first. The Cabin in the Woods gets all of that. It wants to give us what we want, but not without letting us know, first, that it knows we want it…

Although the kids in The Cabin in the Woods are pretty much the archetypal horror movie kids, the script – written by Joss Whedon and Drew Goddard – actually manages to make us care about them. Partly that’s through cleverness, using tricks borrowed from reality TV shows, but mostly it’s just that the dialogue is so good. In the space of just a few lines, the writing sketches a set of believeable, even sympathetic characters. It’s not as stylised as the dialogue in Buffy the Vampire Slayer, but the film’s sense of humour is recognisably Whedon-esque. (And it is really, really funny; Fran Kranz, as the movie’s annoying stoner, gets most of the best lines, and his comic timing is bang on.) Even if this was just a straightforward kids-go-to-the-woods-and-get-murdered movie, it’d be a better-than-average example of the form for its characterisation alone.

But it isn’t just a straightforward kids-go-to-the-woods-and-get-murdered movie. And beyond its jokes, the script is great; it skilfully builds anticipation and, crucially, delivers on all of its promises. Everything that’s set up in the first two-thirds is paid off, gloriously, in the final act. There’s almost too much to take in. This is a film that’s going to reward a second viewing, and a third – especially any second or third viewing armed with a pause button.

The Cabin in the Woods is a love letter to the horror genre, but it’s also possibly the ultimate horror movie. (And yet, in some ways, it isn’t a horror movie at all.) It’s the culmination of decades upon decades of scary movies; it knows that everything’s already been done, and uses that familiarity to its own advantage. Without that history, without a well-worn set of exhausted clichés, The Cabin in the Woods couldn’t exist. It’s almost obscenely clever – and after this, anyone making a horror film set in a cabin in the woods is going to look hopelessly amateurish.