John C. Reilly is quite fruitful as the voice of the title character (left) in the Disney 3-D animated feature “Wreck-It Ralph.” Photo: Photo courtesy of Magnolia Pictures

When the hero says, “I wreck things. Professionally,” I thought I had wandered into “The Barack Obama Story,” but the speaker in Disney’s visually dazzling, intermittently funny “Wreck-It Ralph” is a depressed video-game villain who yearns to be the good guy. As in, good enough to make this movie an arcade version of “Toy Story.”

Despite a promising start, the movie doesn’t rise that high. After work, when the kids have gone home, Ralph (voiced by the brilliant John C. Reilly), the designated destroyer in a retro ’80s-style video game similar to Donkey Kong, sleeps in a dump — literally — and resents the penthouse partiers led by the game’s hero, Felix (Jack McBrayer), who won’t even invite him to a 30th- anniversary celebration of their electronic universe. Ralph resorts to hanging out in glum support groups with other villains such as the ghost from Pac-Man (possibly in the same therapist’s office frequented by the Incredibles).

Ralph is funny and endearing, and the film’s 3-D animation is spectacular, but the movie goes wrong when Ralph jumps into another game, Sugar Rush, a Willy Wonka-fied Oz that gives us a lot of candy puns — and a saccharine heroine, Vanellope von Schweetz. She’s voiced in a gratingly cutesy style by Sarah Silverman, who never notices that Reilly does far better by giving a grown-up comedy reading to his lines.

Vanellope is a fellow outcast handicapped by an e-birth defect: She’s a “glitch,” meaning her avatar fades in and out, and from here on in the script flickers, too. The story line, initially about Ralph’s quest for a medal (which wouldn’t seem to reverse his pariah status anyway), gets clouded as Vanellope prepares for a race in a homemade car fashioned out of candy.

Moreover, her character is irritating — an unattractive combo of pandering and political correctness. In other words, she has to be “empowering to little girls” to maximize toy sales, but the four screenwriters become prisoners of feminism. Buzz Lightyear didn’t need to carry a message. He was just funny.

Vanellope’s condition reminds us that we’re all special, and nothing can ever stand in our way: Candyland meets Clich♥éville. Lots of other stale treats are on offer, too: Jane Lynch does her standard tough-talk shtick as a character from a military shoot-’em-up game, the big race looks like a girlied-up “Cars” and McBrayer’s lines sound like they’re straight out of “30 Rock”: “I don’t have to do boo for you, forgive my potty mouth.” Jane, Jack: Time to freshen up the act a little.

Still: If you’re 6 or under, I suppose this will all seem new. And amid all the boring crashing and chasing and slapstick, there are some brilliant flashes of wit (particularly a reference to the guards in the Wizard of Oz).

Vanellope — with her feisty one-liners (“stinkbrain,” she calls Ralph, which doesn’t even make sense), her hoodie, miniskirt and striped tights — reminds me of Poochie, the surfing dog “with attitude” on “The Simpsons” who wickedly illustrated corporate pandering to kids.

Ralph has a line whose self-evident lameness would have been mocked on “The Simpsons,” but here it’s actually delivered in earnest to cheer up Vanellope: “You’re a winner! And you’re adorable! And everybody loves an adorable winner!” Yes, and let’s not keep score and give everyone who plays the game the same prize afterward. Starting with this movie, which gets a big blue ribbon labeled, “Enthusiastic participant.”