At times, you watch a bad comedy and see hints of the good comedy it might have been. In the case of “The House,” a crude, slipshod, tonally uneven, once in a while chuckle-worthy farce, you have to look very hard and imagine a great many better jokes — just what the film’s co-writer and director, Andrew Jay Cohen, should have been doing.

“The House” stars Will Ferrell and Amy Poehler, who were last teamed together in “Blades of Glory” (2007), as a stuck-in-a-rut suburban couple who open an illegal casino to pay for their daughter’s college tuition. It’s one of those concept comedies built around a sketchbook frame that asks its stars to do a fair amount of improvising — a technique that turns the shooting of a movie into a glorified pitch meeting, since the whole thing is predicated on the premise of “Will Ferrell and Amy Poehler! Are you kidding me? Just let ’em go, and they’re going to kill it!” Ferrell and Poehler are inspired comic actors, but with rare exceptions that’s not how making a truly funny movie works.

“The House” is a satire of economic desperation, like “Fun with Dick and Jane” updated to the age of the collapse of the middle class. But that’s just the excuse. It’s really a comedy of suburban rage — or would be, if it weren’t so random and contrived. Ferrell and Poehler play Scott and Kate Johansen, whose daughter, the level-headed-beyond-her-years Alex (Ryan Simpkins), has just been accepted to Bucknell University. The family thought they were in line for a scholarship from the Fox Meadow city council, but that money has dried up (the local residents would rather build a swimming pool), and they agree not to reveal their predicament to their beloved daughter.

It’s when Scott and Kate take a trip to Vegas along with their ne’er-do-well best friend, the about-to-be-divorced Frank (Jason Mantzoukas), who’s in the midst of slipping into a sinkhole of his own, that a lightbulb goes off: In gambling, the ultimate cliché — because it happens to be true — is that the house always wins. So what if they became the house?

If you hear that idea and think, “Okay, but that’s not actually very funny,” you’d be right. The film seems aware of this, since the whole setting up of the casino in the basement of Frank’s sparsely furnished bachelor colonial, and the putting of the plan into play, happens virtually overnight. Just like that, they’ve got a blackjack table, a craps tables, a roulette wheel, surveillance cameras, and a flashing neon sign that says “Place Your Bets,” plus a clientele of locals all too eager to get into the action. Scott, Kate, and Frank start raking in the money from day one. So where’s the joke?

The joke is that the casino becomes a place where everyone gives into his or her inner libertine. There is lust, there is greed, there is cocaine, and long-simmering resentments erupt into screaming matches that get organized into extreme-fighting brawls to take betting action on. Martha (Lennon Parham) and Corsica (Andrea Savage), for instance, despise each other — they have a vendetta hinging on a potluck dinner — so they get into the ring for a violent dustup that, it turns out, is merely a warm-up for the bloodshed to come.

That happens when our heroes spot a man counting cards. The scene where Scott, Kate, and Frank drag him into the back room and go all gangster (or, in Poehler’s case, gangsta) on his ass is funny, because these are the least likely kneecap-smashers in history. But then something happens: a moment of Grand Guignol burlesque. Something that makes it look like Andrew Jay Cohen double-checked the marketing metrics and decided that over-the-top gruesome black comedy was in. Suffice to say that Scott, after starting off as a generic Will Ferrell milquetoast, morphs into a fearless badass in shades and a scowl, with the theme from “The Sopranos” playing in the background (in case we didn’t get it).

My objection to this isn’t that it’s a bit much, but that the movie doesn’t push it far enough. It should have run with the opportunity for Will Ferrell to do something different by letting him slide down a rabbit hole of (comic) darkness. Scott becomes known as “The Butcher,” but in “The House” this is just another bit, another half-baked joke to nowhere. Cohen and his writing partner, Brendan O’Brien, penned “Neighbors” and its sequel, and they were much wittier comedies of parental squares gone crazy.

Will Ferrell knows how to use the centrifugal force of his personality to hold a movie together. His suppressed hysteria is a gift that still gives, though it isn’t one that has much surprise left. Amy Poehler syncs up with him well, but there’s got to be something better waiting for her in the movies than the opportunity to pee on a lawn (yes, that’s her big moment here). “The House,” like too many Hollywood comedies of outrage, turns the extreme into the innocuous.

Film Review: ‘The House’

Reviewed at AMC 34th St., New York, June 29, 2017. MPAA Rating: R. Running time: <strong>88 MIN.</strong>

  • Production: A Warner Bros. release of a New Line Cinema, Village Roadshow Pictures, Good Universe, Gary Sanchez Productions prod. Producers: Andrew Jay Cohen, Joseph Drake, Jessica Elbaum, Nathan Kahane, Brendan O’Brien, Will Ferrell, Adam McKay. Executive producers: Bruce Berman, Richard Brener, Michael Disco, Toby Emmerich, Marc S. Fischer, Chris Henchy, Steven Mnuchin, Spencer Wong.
  • Crew: Director: Andrew Jay Cohen. Screenplay: Andrew Jay Cohen, Brendan O’Brien. Camera (color, widescreen): Jas Shelton. Editors: Evan Henke, Michael L. Sale.
  • With: Will Ferrell Amy Poehler, Jeremy Renner, Jason Mantzoukas, Nick Kroll, Ryan Simpkins, Allison Tolman, Michaela Watkins, Cedric Yarbrough, Andy Buckley, Andrea Savage.