WITHIN THE FIRST few minutes of Shane Black's comedy noir The Nice Guys, we witness two things. The first is Los Angeles' Hollywood sign: Ragged in disrepair, its letters teeter, slashed with graffiti wherever they haven't been set on fire. The second—via a house-smashing, hill-tumbling car crash—is the spectacular death of a porn actress named Misty Mountains.

Welcome to 1977 Los Angeles—where they've run out of gasoline, where the government is corrupt, and where sun-baked smog smears everything into a yellow haze. It's kind of a shithole.

Scraping by in this shithole are The Nice Guys' half-assed heroes: There's Jackson Healy (Russell Crowe), a world-weary tough who loves Yoo-hoo and, for a modest fee, will happily beat the hell out of anyone giving you trouble. And there's Holland March (Ryan Gosling), a drunk single dad who calls himself a private eye but who mostly bilks doddering biddies out of their retirement funds. Following the untimely demise of Ms. Mountains (Murielle Telio), the disappearance of a young woman named Amelia (Margaret Qualley), and a spiral fracture of March's right radius (courtesy of Healy), The Nice Guys finds Healy and March, predictably enough, working together. Unpredictably enough, they end up falling off buildings, dumping bodies, crashing cars, dodging bullets, chasing mermaids, discussing life choices ("Marriage," Healy points out, "is buying a house for someone you hate"), and trying to keep March's 13-year-old daughter, Holly (Angourie Rice), away from the bloodier, pornier parts of LA. Holly, to her everlasting credit, doesn't care what she's told to do—in The Nice Guys' two-hour runtime, she becomes the best teen detective since Veronica Mars.

The Nice Guys is only the third feature directed by Shane Black (the previous two were 2005's perfect Kiss Kiss Bang Bang and 2013's superhero high-point Iron Man 3), but it's his eighth as a writer: Black wrote Lethal Weapon, The Last Boy Scout, Last Action Hero, The Long Kiss Goodnight, and more, and during a wildly successful stretch of the '80s and '90s, became as famous for his own persona as those of his fucked-up, trigger-happy characters. (In his script for Lethal Weapon, Black famously described one of the film's settings: "The kind of house that I'll buy if this movie is a huge hit. Chrome. Glass. Carved wood. Plus an outdoor solarium: A glass structure, like a greenhouse only there's a big swimming pool inside. This is a really great place to have sex.")

In one form or another, Black has been trying to make The Nice Guys since 2001, and now that it's finally here—one suspects that maybe the success of Iron Man 3 helped—it doesn't disappoint. The script, by Black and Anthony Bagarozzi, checks off Black's trademarks: There's razor-sharp banter, a Christmas carol or two, and a profound appreciation of the comedic qualities of violence. And in Crowe and Gosling, Black's got a duo who are excited to play along. Crowe, growly and shambly and with a trusty set of brass knuckles, pushes through The Nice Guys' twists with wry determination; Gosling, sporting a cast, a dangling cigarette, and a look of constant confusion, reveals a heretofore unknown talent for ultrasonic shrieks and physical comedy.

Speaking of comedy, that's where The Nice Guys shines brightest: Sure, the mystery is fun, and yeah, it's a goddamn delight to see Healy and March shoot and stumble their way though LA. But unlike just about every other modern American comedy, The Nice Guys is an honest-to-god actual big-screen comedy—with Black taking advantage of cuts, camera moves, sight gags, and framing to deliver both action thrills and unpredictable laughs. Most American comedies—which, with their static setups and half-improvised dialogue, might as well be performed as plays—can't be bothered with any of the cinematic cleverness Black giddily employs here. That's too bad, because as The Nice Guys happily, bloodily, and kind of sweetly shows, it's something we desperately need more of. Which makes it even better that The Nice Guys ends with a promise—or maybe a threat—of future Healy and March misadventures.