What happened

Shares of online video game maker Zynga (ZNGA) rose 21.8% in May 2017, according to data from S&P Global Market Intelligence.

So what

Zynga delivered a solid first-quarter earnings report right at the start of May, beating analyst estimates with a net loss of $0.01 per share on sales of $194 million. The maker of popular game titles such as Farmville and Words With Friends followed up with better-than-expected guidance for the next quarter, as rapid growth of Zynga Poker revenues is making up for lower advertising sales.

A pair of aces on a computer keyboard

Image source: Getty Images.

Now what

The company is doubling down on online multiplayer games and other real-time services, which also helps Zynga control its operating costs -- developing new titles can be expensive, compared to simply pushing harder to promote the existing catalog.

Piper Jaffray analyst Mike Olson upgraded Zynga to a buy near the end of May, noting that most of the company's current management team came in with turnaround experience from their days at Electronic Arts (EA -0.19%). They are using similar business-improvement tactics for Zynga right now, and you could certainly find worse role models to emulate:

EA Chart

EA data by YCharts.

Zynga investors have not needed a poker face in 2017, keeping pace with EA's 44% year-to-date gains. And it's starting to look like the good luck is here to stay. One of these days, Zynga might even start turning a sustainable profit.