Given that “Kiss Kiss, Bang Bang” is divided into segments titled after books by Raymond Chandler, a little story about that author might be in order. When Chandler’s convoluted mystery “The Big Sleep” was being converted into a film script (it was eventually made by Howard Hawks in 1946, and has justly become a classic), it’s reported that the writers–who included William Faulkner–contacted Chandler for enlightenment about certain twists of the plot that they didn’t understand. They couldn’t tell, in particular, whether one character’s death was a suicide, an accident, or a murder–and if the latter, who the killer was. Chandler thought the matter over and replied that he had no idea. Shane Black might have to respond the same way if he were asked to explain some of the turns of this writing-directing debut, a picture that’s essentially an updated takeoff on 1940s film noir classics like “Sleep.” The movie is an elaborate conceit that buffs will have fun deconstructing. But ultimately it’s just too clever for its own good–so knowing, so self-satisfied, that by the end the smug artificiality of it all has become well-nigh intolerable. The actors seem to be winking at the audience every thirty seconds or so, and eventually you feel that you’ve been nudged in the ribs so relentlessly that your bones are beginning to ache–and not from laughter.

The underlying premise here is that Harry Lockhart (Robert Downey, Jr.), a petty thief, escapes the police one December night by stumbling into an audition for a Hollywood movie role and proving so convincing playing his weepy scene that he’s at once whisked off to California for a screen test. Since he’s up for the part of a pulp private eye, the studio assigns him a teacher–a real P.I. named Perry (Val Kilmer), who just happens to be gay. Harry, though, takes his would-be shamus screen persona too seriously when he gets involved with Harmony Faith Lane (Michelle Monaghan), an old childhood sweetheart whom he convinces that he actually is a gumshoe. She pushes him to disentangle the connections that link several dead women, one of whom turns out to be her sister. Also involved in the convoluted goings-on are a rich heiress and her father Harlan Dexter (Corbin Bernsen), a former actor still involved in the movie biz. But what the movie is mostly about is overripe dialogue, especially that delivered by Downey in the smart-aleck narration that runs through the picture; outrageous plots twists involving misidentified bodies and wild motivations; lots of slapstick violence, including one “Trouble With Harry” sequence about a clumsy attempt to dispose of an inconvenient corpse and another elaborate gag in which a severed digit plays a prominent role; plenty of gay-themed banter between Downey and Kilmer; and a big finale–or really, series of climaxes–which include fistfights, car chases and some gunfire, too. Though there’s an effort at the close to explain everything, it’s a pretty perfunctory effort with tongue firmly in cheek (apart from a misguided bit of business about child molestation).

There’s little question that Black is a canny wordsmith, or that he’s peppered his script with an abundance of amusing lines. And the virtual incomprehensibility of the plot is part of the joke. Downey certainly holds up his end of the equation–even though Harry is pretty much an insufferable smart-ass, he delivers the character’s voiceovers with the proper combination of sass and whimsy–and Kilmer seems to be having enormous fun playing a smooth, slick pro who just happens to be unabashedly gay. And while the rest of the cast doesn’t match them–Monaghan is particularly disappointing, never generating the Bacall-like heat Holly demands–the picture has been stylishly made in all the technical departments, with a slick production design by Aaron Osborne and elegant widescreen camerawork by Michael Barrett.

But in the final analysis “Kiss Kiss, Bang Bang” is all affectation and no affect. You can easily admire the skill with which Black has constructed this elaborate joke, but rather like Steve Martin’s “Dead Men Don’t Wear Plaid” (1982), an even more extravagant riff on this genre, ultimately it runs out of gas and becomes a rather exhausting jape.