Zynga and its fans are in the giving spirit this holiday. The social-gaming developer revealed that its players raised $1 million for charity in 20 days, and all of that money will help combat hunger in the U.S.

A few weeks ago, Zynga introduced the Holiday Lights expansion in its popular Facebook game, FarmVille. This adds holiday-themed trees, decorations, and animals. As gamers spend money on those items, Zynga holds the funds and then gives 100 percent of its share of the revenue to Feed America, which is one of the largest U.S. charities working to feed the hungry. Facebook will still take 30 cents out of every dollar spent on its platform.

“We originally set what we believed was a lofty goal: raise $500,000 one dollar at a time,” FarmVille lead experience designer Meredith McNeil wrote on Zynga’s blog. “Within a week, we were on track to reach the $500,000 goal. To keep the giving going, we decided to raise the goal to $1 million and within just 20 days, FarmVille players collectively generated $1 million to help fight hunger.”

Those donations will pay for 9 million meals this holiday season.

Zynga also released an infographic that further illustrates the charity of FarmVille fans. In a survey of 10,000 current players, 60 percent have previously made donations through FarmVille. Prior to this Holiday Lights event, Zynga has enabled gamers to contribute to other organizations. Nearly one in three FarmVillers claim they learned more about special causes thanks to the agricultural-management game. You can check the full infographic below for more:

Zynga