One day after laying off five percent of its workforce, Zynga announced it sustained a quarterly loss of more than $52 million. Despite the sub-optimal Q3 2012 numbers, the company’s relatively high revenue figures (over $316 million) exceeded analysts’ low expectations (in the neighborhood of $300 million). But overall, the company lost $160 million in the first nine months of 2012.

Zynga's higher revenue number comes after an announced $200 million stock buyback and a new partnership with bwin.party—a UK-based real-money online gambling site. The moves sent the company’s stock soaring in after-hours trading: prices rose 13.67 percent, as of this writing, on its closing price of $2.12 per share.

These are short-term gains however, and Zynga seriously struggled in recent weeks and months. It’s losing millions of players, remains embattled in lawsuits, took a write-down on OMGPOP, and has lost top corporate talent.

"While the last several months have been challenging for us, Zynga remains well positioned to capitalize on the growth of social gaming," Mark Pincus, Zynga’s CEO and founder, said in a statement.

"We're implementing a number of steps to drive long-term growth and profitability. The successful launches of FarmVille 2 and ChefVille in the third quarter demonstrate that when we develop great games, our large player audience engages. It's more clear than ever that along with search, shop, and share, play is a fundamental pillar of the Internet, and Zynga continues to be the leader."

In related news, 24 hours after Facebook’s quarterly earnings report, Facebook’s stock price is up 20 percent. It closed Wednesday at $23.22 per share.