Roland Emmerich and Channing Tatum channel Die Hard and Lethal Weapon in the year’s second film about terrorists invading the White House.

At the heart of director Roland Emmerich’s (Anonymous) latest action film is an idea so breathtakingly simple and utterly deranged that I’m at once amazed no one’s done this before and wondering what kind of pharmaceuticals the filmmakers were huffing during the brainstorm.

White House Down is a presidential buddy-cop movie. Yes, this movie’s vaguely President Obama-esque President Sawyer (Jamie Foxx, Django Unchained) shoots bad guys and exchanges witty banter with main character John Cale (Channing Tatum, This Is the End) while perhaps learning a thing or two about friendship or duty or whatever.

The premise and the madcap conspiracy yarn encapsulating it makes it feel like an ironic suggestion from a weary Reagan-era film critic — something a wannabe Shane Black (Iron Man 3) hack would’ve scribbled down to get attention.

And yet the idea is kind of awesome, isn’t it?

Cale is a down-on-his-luck member of the Capitol police with an interview for a presidential Secret Service position. He decides to bring his political-nerd daughter (Joey King, The Conjuring) with him on a tour of the White House.

The interview, with former flame and deputy head honcho Maggie Gyllenhaal (Won’t Back Down), doesn’t go so well. Luckily in the long run, terrorists show up and take his daughter hostage. It’s now up to Cale and his new buddy, the president, to save his little girl and thwart some high-concept global war scheme or something.

The plot ends up getting a little too complicated for its own good, padding out a rather exhausting flick. The screenplay by James Vanderbilt (The Amazing Spider-Man) also suffers from some patchy writing and underwhelming direction.

The first act largely comprises characters telling other characters their big personality flaws, characters telling other characters how various systems and MacGuffins work and characters being obviously sketchy for the camera.

Emmerich, a master at composing scenes filled with destruction and lavish set pieces, is out of his depth when working with the actors. There is something incredibly off about the way he cuts together these talky stretches of character building, letting his talented cast hit some false notes in the process.

Perhaps the biggest failing of White House Down lays in its timing. While the entire hubbub about nuclear arms, hacking and Middle Eastern politicking is still relevant, we’ve already lived through Obama’s 2008 election and subsequent re-election.

Pop culture has long since moved on from the idea of the president as an icon of hope and regressed into full-on cynicism, making Foxx’s turn as an young, “academic” badass president feel a little regressive.

But, to the immense credit of everyone involved, White House Down hits long, sustained stretches of cool when the film starts playing to its strengths. Tatum and Foxx develop a wicked funny rapport, and Emmerich’s fight sequences are visceral and thrilling.

Some dodgy VFX work does compromise the picture at times, but it’s never awful enough to be a deal breaker and surprisingly fits the dumb B-movie vibe quite well. White House Down fumbles the ending a little bit by introducing a last-minute plot twist just for the hell of it, but it’s hard to stay mad at the movie for long.

At the very least, White House Down provides a good 40 to 60 minutes of Lethal Weapon/Die Hard-like fun, a welcome palette cleanser from the endless summer superhero and sci-fi franchises clogging cinemas.

diversionsdbk@gmail.com