Zynga put out a nauseating second-quarter report after the bell Wednesday that has sent shares into a tailspin, down 40% as of this writing.

Sales came to $332.5 million, and Zynga suffered a net loss of 1 cent per share excluding one-time items. Both measures came well short of Wall Street estimates for sales of $343.1 million and a 6-cent profit.

Zynga also cut back its 2012 guidance. It forecasts bookings at $1.15 billion to $1.23 billion, down from $1.43 billion to $1.5 billion. As for earnings, they are expected to range from 4 to 9 cents per share, which is a far cry from estimates made in April for 23 to 29 cents per share.

The Problems

Zynga gets most of its revenue from Facebook, but the evidence shows that there is less interest in playing games. For 2012, franchises like FarmVille, CityVille and CastleVille have suffered major drops in users. Meanwhile, Zynga has had a tough time creating breakout hits to reclaim those users.

Another other issue has been a rapid shift to mobile traffic. Zynga has scrambled to catch up, but has come up short so far. Its $180 million acquisition of OMGPOP, the creator of Draw Something, has blown up. When Zynga made the acquisition in March, the game had 14.6 million daily active users. Now it is down to 3.4 million, according to AppData.

Despite all this, could Zynga still be a buy?

At least on a valuation basis, ZNGA doesn’t look bad. If you strip out its $1.6 billion in cash, the company is trading at about 1 times sales, which certainly is reasonable. Then again, much more stable Electronic Arts (NASDAQ:EA) — which is entrenched in traditional gaming and expanding its social offerings — trades at 0.88 sales.

So Zynga’s stock might be at a floor, but that doesn’t necessarily mean it will go up. The pipeline of new games is weak, and Zynga has little credibility with Wall Street right now. The company’s $12-per-share secondary offering in March certainly didn’t help things.

Facebook

Zynga’s results are an ominous sign for Facebook, which reports its second-quarter results after the bell today. About 15% of Facebook’s revenues — one of three things investors will really be looking at in the report — come from Zynga’s games, and FB shares have been off 5% to 7% since ZNGA reported.

The shift in mobile also is troublesome for Facebook and is expected to weigh on revenues. The company recently announced new efforts at monetization, like mobile-only ads and a new app store. But these initiatives will need time to move the needle.

Factor in that Facebook is trading at a hefty price-to-earnings ratio of 60, and FB shares look really vulnerable going into tonight’s report. Investors would be well-advised to stay away for now.

Based in Silicon Valley, Tom Taulli is in the heart of IPO land. On a regular basis, he talks with many of the top tech CEOs and founders trying to find the next hot deals and finding out which start-ups are stinkers.

A long-time follower of the IPO scene, back in 1999 Tom started one of the first sites in the space called WebIPO. It was a place where investors got research as well as access to deals for the dot-com boom. Tom also wrote the top-selling book, Investing in IPOs. In it, he covers all the aspects of analyzing an IPO, such as reading the prospectus, detecting the risk factors and understanding some of the arcane regulations. But don’t worry — if that process is too intimidating for you, thankfully Tom will do the legwork for you right here in the IPO Playbook blog.

Tom is routinely quoted in the media about upcoming deals with his interviews on CNBC and Bloomberg TV, but he is eager to take your questions too. You can message him on Twitter at @ttaulli. And feel free to weigh in via the comments section on any of his IPO Playbook posts.