In the old days, you couldn't combat global hunger just by buying an imaginary vegetable. Back then, if you wanted to make a trivial but virtuous gesture of pop-culture consumerism you had to make a trip to Tower Records and purchase a copy of "Do They Know It's Christmas?" or "We Are the World." Casual philanthropy required at least some effort.

Today, it's a different story. Log in to FarmVille, shell out $5 for some cartoon corn seeds that you can plant in your virtual field, and a genuine 3D family in Haiti may get a chicken, goat, or micro-loan from one of several nonprofit organizations that are partnering with FarmVille developer Zynga.

Zynga, the San Francisco-based game developer that popularized social gaming on Facebook in 2007 with Texas Hold 'Em Poker, introduced its first in-game charitable campaign in FarmVille in 2009. Since then, the company has run nearly 150 of the fundraisers in such games as FarmVille 2, ChefVille, and Half the Sky: The Game. Some of the campaigns have been organized around events, such as World Water Day. Others arose in response to natural disasters, such as the earthquakes in Haiti and Japan.

Over the course of five years, Zynga players have contributed more than $18 million to approximately 50 nonprofit organizations around the world. The company established an independent nonprofit called Zynga.org in 2012 to further promote its altruistic endeavors.

Zynga's players aren't exactly close to knocking Bill Gates or Larry Ellison from The Chronicle of Philanthropy's top 50 donors list yet, but $18 million is still around $18 million more than anyone ever suspected gamers might give to charity in the course of their play. And what makes this kind of philanthropy worth watching isn't the amounts being raised: It's the way video games are repositioning philanthropy into an extremely casual, extremely public consumer habit.

In recent years, a number of writers have provided a persuasive counternarrative to the idea that video games are little more than operant conditioning for future mass murderers. In his 2006 book Everything Bad Is Good for You, Steven Johnson points out that many games are incredibly demanding endeavors that promote problem-solving, decision making, persistence, empiricism, and other desirable traits and habits of mind.

GamerBr3nda / FoterIn her 2011 book Reality Is Broken, Jane McGonigal argues that hardcore gamers invest so much time into their alternate environments not because they are disaffected slackers filled with ennui but because they want more purpose and challenges than they are offered in the real world.

Because video games are so good at providing clear-cut challenges, outcomes, and rules for engaging in their realms, they create remarkable engagement in users, especially at a time when media choices are proliferating and attention spans are supposedly shortening. A wide range of consultants have noticed this fact and hope to apply the techniques and dynamics of games to business organizations, educational institutions, education, news consumption, and so on.

Others hope to make games themselves more socially productive. In a 2011 TED Talk, McGonigal estimated that gamers worldwide invested around 3 billion hours a week in their toils. Like solar power before the emergence of photovoltaic cells, they exist as a kind of untapped resource. With the right mechanisms in play, McGonigal and other advocates have argued, their energy could be applied toward tangible, real-world efforts to make the world a better place.

Infusing games with philanthropic elements is one obvious way to do this. Precisely because games often require so much effort from their players-compared to, say, watching The Bachelor or even reading Proust-they can lead to what critic Clive Thompson has called "gamer regret," the idea that you should be doing more with your life than spending 20 hours a week playing World of Warcraft. But blending opportunities for philanthropy into games with heroic themes and a grand sense of purpose, or even more casual games like FarmVille, can effectively deepen the meaning of the experience. You didn't just waste two hours tending virtual crops. You also sent a Haitian family a goat!

Zynga is not the only company trying to align games with philanthropy. Events such as Desert Bus for Hope and Extra Life allow participants to engage in marathon bouts of gaming to raise money for various organizations. And Gramble World, an emerging mobile social gaming network, makes in-game payments to charities an ongoing feature of its platform. In other words, the network is betting that persistent philanthropic activity-rather than just launching the occasional campaign, as Zynga does-will prove an attractive lure to customers.

Traditionally, low-stakes philanthropy has been a fairly opaque activity. If people don't bother to declare their charitable donations on their tax forms, it often doesn't get tracked. And while many forms of low-impact philanthropy have a public component-buying tickets to pancake breakfasts, wearing cause bracelets or benefit T-shirts-a lot of small-dollar philanthropy flies under the radar. The Chronicle of Philanthropy doesn't run an annual list of the most generous low-income philanthropists. People who donate $25 to support their local high school band do not get auditoriums named after them. Even getting a line on the Thank You page of the local theater group usually takes a contribution of $500 or more.

At Zynga, however, when you make a $5 donation to buy sweet corn for Haiti or candy canes for a San Francisco children's hospital, you generally get a donor flag or some other kind of reward. Sometimes even your game neighbors get flags, so they know you made the donation.

"Communities of participation," researchers have shown, are an important predictor of charitable giving. If you're a member of a church or a civic organization where philanthropy is a common endeavor, your own philanthropic efforts are likely to increase. Now platforms like Zynga are emerging as virtual communities of participation. And because the signals of participation are so apparent and so persistent in such realms-everyone who sees your farm after you've made a donation will see your flag-they may prove especially effective at creating cultural norms that encourage philanthropic behavior.

How far might developers take game-based philanthropy? Imagine a game that promises to unlock some new level or facet of game-play to users if they collectively donate $1 million to a particular cause. For players who can't afford to donate money in these instances, they could complete real-world actions to earn powers that might otherwise only be for sale.

For example, if you spent 10 hours working at a local branch of Habitat for Humanity, you might get a new virtual tool. If you donated blood at the Red Cross, you could earn virtual blood transfusions that would keep you going even as you get torn apart by alien zombies. Because heroic quests and the cultivation of community are both core elements in gaming environments, the opportunities to integrate philanthropic components are vast.

So are the opportunities to use gaming platforms to generate insight into charitable trends and behavior. Zynga knows which cities give the most through its games. (In the U.S., it's Los Angeles, Houston, and Phoenix.) It knows which types of charities receive the most support (kids and animals). Presumably, over time, gaming platforms will develop Amazon-like abilities to know exactly how to present increasingly relevant philanthropic opportunities to players. They'll know precisely when players are most likely to respond to such offers. If your past behavior shows that you tend to purchase philanthropic items during extended bouts of game-play, for example, you may not actually see such offers until you've been playing for five consecutive hours.

Game developers, in short, have an opportunity to make philanthropy more contextual, more efficient, and ultimately more productive. In time, even the bloodiest crime sprees in Grand Theft Auto may be spattered with faint halos of altruism. For diehard sociopaths, the future is looking darker every day.