For many and many a year, a good decade and a half now, a lot of us have been saying that M. Night Shyamalan is a (potentially) great stylistic director who really needs to stop writing his own movies. I'm definitely not going to suggest that Split, the director's twelfth feature in a career that this year hits the quarter-century mark, proves that theory wrong. It is not, by some of the most important accepted yardsticks, a "good" screenplay.

It features a few really good lines (including an almost-great Henry V joke that I think was supposed to be a Henry VIII joke) scattered in among a great deal more flat-footed dialogue of the "Hello Character Name, can we discuss this subject about which we both know a great deal already?" variety; exposition is, in fact, a long-term problem that the film keeps getting wrong literally all the way to the scene after its last scene. It's a film that pivots on a (ginned-up for the purposes of fiction and genre) mental disorder, which means a wise psychologist character, Dr. Karen Fletcher (Betty Buckley), who spends the whole movie repeating one of a handful of clarifying statements. Kind of like if that godawful penultimate scene of Psycho was the length of an entire feature film. Maybe worst of all - least damagingly, but absolutely the most ineffectively and even offensively - Split trots out a whole bunch of flashbacks that are only sometimes well-motivated, and build up to a hoary reveal of a "deep dark trauma" cliché that doesn't inform character the way it's supposed to, and would still feel exploitative even if it did.

And yet - and yet - and yet, screenwriting is about a lot of things, and one of the most important is structure, and holy God-damn, Split has some terrific structure, all right. It is, in essence, two very different movies sharing the same body (which is even thematically resonant, thought I'm pretty certain it's not on purpose). One of these movies is a a nasty little horror movie 100% in line with the needs and style of parent studio Blumhouse Productions. We open at the awkward end of a birthday party, to which the gregarious, distinctly snobby Claire (Haley Lu Richardson) has invited every member of her class, all but one of whom she was happy to see there. The odd woman out is Casey (Anya Taylor-Joy), sitting miserably alone waiting for her ride to come get her. This is all presented economically, and then re-presented rather bluntly and explicitly, and anyway the upshot is that Claire, her great friend Marcia (Jessica Sula) and Casey are all sitting in the car waiting to leave when Claire's dad (Neal Huff) is knocked unconscious by a figure we don't see until he casually sits in the driver's seat, next to Casey (he's played by James McAvoy, and there's a good reason I'm not giving you his character name yet).

The man takes the girls to his very post-Saw chamber of horrors, a room  with unfinished drywall walls deep inside a subterranean bunker of some sort, full of ancient, stained brickwork and dim lighting, the whole nine yards. Here, they quickly learn two things: the man harbors several personalities, including neat-freak/sex maniac "Dennis" (the one who kidnapped them), matronly "Patricia", and 9-year-old boy "Hedwig"; and in all incarnations, he's planning to feed them to "The Beast". Casey, it turns out, has quite an elaborate stable of survival techniques, learned on hunting trips with her dad and uncle, and she's able to at least partially give herself and the other young women a chance to survive their ordeal.

That's one story: it's a good one, albeit generic. The other story, and where Split suddenly gets very complex in interesting ways, is the man's own tragic tale. We learn, rather substantially into the film, that before he started spawning personalities, he was a man named Kevin, though Kevin doesn't come much to the forefront. Officially, his 23 personalities have agreed that Barry is the one in charge, but Dennis and Patricia have been concocting something of a millenarian cult around "The Beast", and have managed to oust Barry from power. The aforementioned Dr. Fletcher is Kevin's psychologist, convinced that he represents a human being with a great deal of potential to unlock the ability of the human mind to do more than just think in one linear direction, inside a fleshy sack of water and muscle, and she takes it as her duty to first figure out what Dennis is up to, and then to convince him and Patricia to calm down in their paranoid zeal. All without having a clue about the kidnapped girls, of course - the other 20 personalities keep trying to contact her, but Dennis, Patricia, and Hedwig are keeping them forced to the background.

Two movies; two protagonists; two genres, even (psycho horror, psychological thriller). Let nobody take it away from Shyamalan the writer that he balances these two very different elements of Split such that it never feels that we never see the seams. It's quite a bravura piece of parallel storytelling, with great care put into not just the exchange between scenes, but the camera positioning and editing as well: there are points where Split has to change from Casey's story to Kevin's right in the middle of a scene, and Shyamalan and cinematographer Michael Gioulakis do exemplary work of manipulating POV to quickly re-orient us as necessary (the film quite aggressively uses first-person angles, not always to clear gains: at one point, we see from Marcia's perspective, which isn't supported by anything else in the movie. The editing, by Luke Ciarrochi, goes hand-in-hand with that, not just in the showy cross-cutting, but in the little moments when scenes are divided by which of the five characters is favored at any point - and make no mistake, every one of the five is the "lead" for at least a single scene, which is pretty bravura on its own.

It helps Split that its two most important roles are filled by two great performances. Taylor-Joy is fantastic, projecting both fear and the cast-iron will she uses to (sometimes) tamp that fear back down, and coming just a year on the heels of her phenomenal lead turn in The Witch, I think we can safely declare the 20-year-old a Young Actress To Watch. McAvoy, for his part, gets a freebie: Kevin/Dennis/Patricia/Hedwig/Barry is the kind of part that exists to allow an actor to whirligig all around, and it would be a shoddy performer indeed who hadn't thought extensively about the differences between e.g. Barry, Dennis pretending to be Barry, and Dennis, and how he can encode those in his body language, voice, and facial expressions. Still, just because a role is gift-wrapped doesn't mean that we can't be very impressed by the results, and this is genuinely as good as any other screen acting in the robust, often tacky "split personality" subgenre.

Split does not, itself, avoid tackiness, and I don't think it wants to. The very serious artiste Shyamalan responsible for all of his major movies through at least The Happening has at least temporarily stepped down, for a new Shyamalan who just wants to use his skills to make really effective genre shockers. We saw it in 2015's The Visit, his first good film in over a decade; it's even more prominent here. I think what's at play is what we could call the Blumhouse Effect: low budgets, limited resources, and a very clearly-defined marketing sector he needs to reach. All of these restrictions have been a godsend for Shyamalan's art, and Split, in particular, showcases the most intentional, effective, disciplined craftsmanship of anything he's made since The Sixth Sense (in fact, I think Split might be the better-directed of the two films, though The Sixth Sense has the better screenplay).

The result is a shabby little shocker, as they say, although one with a final gambit that, for all its corniness, effectively redefines the ambition of everything we've just seen (while setting up a sequel that, I am flabbergasted to discover, I really want to see). Still, ambition isn't on the table for nearly any of Split: it's a movie that is content - eager, really - to offer up a bunch of thrills based in two wonderful performances, but without demanding much more of us than that. The craftsmanship is there if you want it, and we all should (the craftsmanship is certainly why it's a good suspense film: hell, just look at the piecemeal way information is doled out in the initial kidnapping scene), but the pleasures of Split are ultimately just those of an enormously satisfying B-movie, and God bless it.