Source: Zynga

June 10 was a great day to own shares of Zynga (NASDAQ:ZNGA). After news broke that UBS AG reiterated its buy recommendation with a price target of $6 per share, Zynga's stock soared nearly 7% to close at $3.20.

Although such a high share price appreciation might encourage shareholders to take what gains they can, the fact that its stock is trading 46% below its 52-week high, and just 28% above its 52-week low, suggests that there's still plenty of room to run. Moving forward, is this truly the case, or would the Foolish investor be better off looking into shares of King Digital (UNKNOWN:KING.DL) instead?

UBS is confident, but Zynga is deteriorating rapidly
In its report, UBS claims that Zynga's upside is high and that, in spite of problems associated with revenue and earnings, the company's future is as bright as ever. While it's possible that UBS' assessment of the business is right, Zynga's recent performance has been anything but encouraging.

Over the past three years, Zynga's revenue fell 23%, from $1.1 billion to $873.3 million. According to the company's financial statements, this decline in revenue took place between 2012-2013, when the business' top line dropped by 32% because its monthly active user base fell 62%, from 298 million to 112 million. Most of this contraction took place in the company's online game operations, which saw sales plummet 34%, from $1.1 billion to $759.6 million.

ZNGA Revenue (Annual) Chart

Source: ZNGA Revenue (Annual) data by YCharts

Fortunately, the same kind of performance did not show itself in the company's bottom line. During the past three years, Zynga's net loss of $404.3 million narrowed to a net loss of just $37 million, as management was able to reduce the business' research and development expenditures from 63.8% of sales to 47.3%.

At first glance, this looks appealing, but considering that essentially all of the company's cost-savings have been because of reduced employee compensation, it becomes evident that its reduced bottom line is nothing more than an accounting convention.

Is King Digital much better?
While Zynga has been taking a beatdown, King Digital has flourished. Over the same three-year period, the social gaming developer saw revenue skyrocket nearly 2,900%, from $63.9 million to $1.88 billion. The main driver behind its success has been Candy Crush Saga, which accounted for 78% of the company's total gross bookings of roughly $2 billion.

KING Revenue (Annual) Chart

Source: KING Revenue (Annual) data by YCharts

In addition to crushing Zynga's sales performance, King Digital managed to outperform the company on the bottom line as well. Over the past three years, the company saw its net loss of $1.3 million transform into a net gain of $567.6 million. Most of this upside took place during the business' 2013 fiscal year and can be, for the most part, attributed to the popularity of its Candy Crush Saga, which spurred the company's MAU count 509%, from 67 million users to 408 million.

Foolish takeaway
Based on the data provided, it seems as though Mr. Market is somewhat encouraged by UBS' assessment of Zynga, but the fact is that the company's performance in recent years has been anything but impressive. Yes, management did mitigate the developer's losses, but the fact that it only did so through cutting stock-based compensation for employees takes the "wow" factor out of it.

Moving forward, it will be interesting to see what happens with Zynga. It is possible that UBS is correct about the enterprise, but investing in a turnaround is risky business. To avoid this downside, the Foolish investor could consider a stake in King Digital, but it's important to keep in mind that any significant shift away from its flagship product could leave the company in the same boat as Zynga.