If I’ve got it straight, here’s what happens in “Shooter.” The government asks an expert marksman to come up with a what-if scenario for shooting the president from more than a mile away. Then someone tries to do just that, and they pin it on the marksman. After all, he was just seen in that area a few days earlier, scouting out locations! He’s the perfect patsy.

Except that he’s played by Mark Wahlberg, and his name is Bob Lee Swagger, and NOBODY MAKES A PATSY OUT OF MARK WAHLBERG AND/OR SOMEONE NAMED BOB LEE SWAGGER!!

Based on the novel “Point of Impact” by Washington Post film critic Stephen Hunter, “Shooter” involves elaborate conspiracies and highly improbable scenarios. Yet it does so with just enough straight-faced bravado that you can sort of buy it, the same way you swallow the addictive preposterousness of “24” every week.

Bob Lee Swagger is a retired Marine sharpshooter who lives with his guns and his dog in an isolated mountain cabin. He’s visited by Col. Isaac Johnson (Danny Glover, whispering everything for some reason) and persuaded to serve his country by coming up with an assassination scenario. Sources suggest someone is planning to do it for real at an upcoming presidential appearance in Philadelphia, and if Swagger can determine how it’s most likely to go down, the feds can stop the guy before he pulls the trigger.

When the assassination does happen, Johnson’s men try to kill Swagger, too, because dead scapegoats are more pliable than live ones. But Swagger escapes and goes on the lam like “The Fugitive,” trying to hide from the cops while finding proof of his innocence. Swagger is a resourceful, MacGyver-type man, making his way to Kentucky and the home of Sarah (Kate Mara), the widow of Swagger’s old Marine buddy. She has some nursing experience and can help Swagger lie low for a while.

Meanwhile, a rookie FBI agent named Nick Memphis (Michael Peña) looks carefully at the facts of the assassination and instantly determines Swagger is innocent. This involves finding some clues as the result of sheer luck or extreme coincidence. In other words, the movie helps him cheat a little.

The plan to kill someone and pin it on Swagger runs into the high branches of government, including an energetically wicked Southern senator played by Ned Beatty.

Director Antoine Fuqua has looked at crooked authority figures before, of course, in “Training Day,” and he has grown no less cynical in the meantime. The film’s politics are a weird jumble, though. There’s right-wingism: Swagger is a reclusive gun nut who lives in the woods, and Big Government is the bad guy. But there are also left-wing sentiments: Nick Memphis wears a Che Guevara T-shirt, and it’s hard not to take all the anti-government talk as being anti-the-current-administration. What does that make the movie? Libertarian?

But hey, who cares? The movie gets less plausible as it goes, but Wahlberg’s good as a tough, stoic type, the supporting cast is colorful (love Elias Koteas as a particularly nasty federal agent), and it’s an acceptable two hours of political-thriller fluff. Jack Bauer would probably get things done a little faster, but Bob Lee Swagger has the better name.

B- (2 hrs., 4 min.; R, scattered harsh profanity, some fairly strong violence.)