All those misspent hours of youth, spending quarters on mindless video games, are finally put to use in “Pixels” (Columbia), a manic comedy about an alien invasion of Earth by 3-D characters from the arcade.

This inane mash-up of “Revenge of the Nerds” and “Wreck-It Ralph” envisions former players, now grown up, drafted by the government to defeat the enemy at their own games (literally).

The trouble starts in 1982, when NASA sends a probe into outer space, containing samples of human culture. Why include “Pride and Prejudice” when you can send “Pac-Man,” you may wonder?

Alien baddies intercept, misinterpret the video games as attack plans, and decide to turn the tables, using monster (and mean-spirited) interpretations of the day-glo characters.

Thirty years later, after Guam is attacked by a swarm of cartoons, U.S. President Will Cooper (Kevin James) must come up with a plan to rescue the planet. Who better to vanquish evil than his boyhood nerdy pals: Sam (Adam Sandler), Ludlow (Josh Gad), and Eddie (Peter Dinklage)?

As kids in the 1980s, this quartet saved the world thousands of times — at 25 cents a game in the arcade. Now rebranded as the “Arcaders,” they face their pixelated friends in real time, with a few modifications.

“Pac-Man’s a bad guy?” Sam asks in amazement. And even the cuddly Smurfs are suspect.

Game on, big time, and Donkey Kong, Galaga, Centipede and Space Invaders lay waste to much of London, Washington and New York. The president calls in backup, in the guise of a comely weapons specialist, Violet (Michelle Monaghan).

Director Chris Columbus, famous for “Home Alone” and two Harry Potter films, juggles an uneasy mix of shtick and schlock. Regrettably, “Pixels” is short on fun and long on tasteless humor, making what should be a wholesome kids’ movie questionable for even mature teens.

By the time tennis star Serena Williams and domestic diva Martha Stewart make their appearance, viewers will wish for “Game Over.”

The film contains bawdy humor, some sexual innuendo, and a few mild oaths. (A-III, PG-13)