A little girl, Vanellope Von Schweetz, steals Ralph's medal to buy her way into the daily races to determine which characters players can choose as their avatar. King Candy, the ruler of Sugar Rush, forbids her from racing because she has glitches. Ralph and Vanellope agree to work together to retrieve his medal and help her win her a race. They build a kart and hide out at Diet Cola Mountain, an unfinished race track, where Ralph teaches her to drive. King Candy hacks the game's code, obtaining Ralph's medal, which he offers to Ralph in exchange for preventing Vanellope from racing. He claims that if Vanellope wins and becomes playable, her glitches will be brought to the attention of players, Sugar Rush will be unplugged and Vanellope will die, unable to leave the game because she is a glitch. Ralph reluctantly agrees and destroys Vanellope's kart. On returning to his own game, which has been evacuated, he notices Vanellope's image on the side of the Sugar Rush cabinet and realizes she was meant to be a playable character.
Wreck-It Ralph premiered at the El Capitan Theatre on October 29, 2012,  and went into general release on November 2. The film has earned $471 million in worldwide box office revenue, $189 million of which was earned in the United States and Canada; it was met with critical and commercial success, winning the Annie Award for Best Animated Feature and receiving nominations for the Golden Globe Award for Best Animated Feature Film and the Academy Award for Best Animated Feature .    The film was released on Blu-ray and DVD on March 5, 2013.