LOS ANGELES - Tom Byron used to spend a couple of hours each day playing games on Facebook, attending to his virtual diners in "Restaurant City" and waging war against the Raven in "Empires & Allies."

"I'd check into these games every chance I got," said the 50-year-old marketing executive in San Rafael, Calif., who played four or more Facebook games at a time. "Now I spend most of my game time on my iPhone. It's just more convenient to be able to grab my phone."

It's not just players such as Byron who have wandered away from Facebook. Game developers have also migrated to other platforms such as Apple Inc.'s iOS and Google Inc.'s Android largely because it has become so expensive to do business on Facebook. Zynga Inc., for example, the largest developer of Facebook social games, in July blamed a downturn in its finances on a "challenging" environment in the world's largest social network.

Although Facebook is the world's largest social network, it still needs fresh content to keep its 900 million users engaged on its site and to reel in new users. As a result, an exodus of developers and their games would be disastrous to Facebook Inc.

"Facebook is still a viable platform for independent developers looking to make money on a game," said Mitch Lasky, a venture investor at Benchmark Capital who specializes in game companies. "However, companies with aspirations to be larger publishers - Kabam, Kixeye, even Zynga - are moving aggressively off the Facebook platform to mobile and the open Web. Publishers aren't convinced that the costs of being on Facebook are worth it."

One such publisher is CrowdStar Inc., a Silicon Valley social games developer whose titles once dominated the top charts for Facebook applications. Last year, CrowdStar introduced its games to iPhones and iPads. Since then, the company has gone from getting 90 percent of its revenue from Facebook users in 2010 to 50 percent in 2011. This year, it expects only 10 percent of its revenue from Facebook players; the rest will come from people who play on smartphones and tablets.

"Facebook is no longer the viral platform it used to be for games," CrowdStar chief executive Peter Relan said.

Lasky said developers such as CrowdStar are turned off by the high cost of acquiring new players through advertising on Facebook. Add to marketing expenses the 30 percent fee that Facebook charges for revenue generated on its site, and costs can add up to 50 percent of revenue or more.

Facebook, however, isn't ready to declare game over. In recent months, the Menlo Park, Calif., company has labored to address the complaints of developers and players, lest it lose the most important driver of its early and meteoric rise in popularity.

Fueled by the surprise popularity of "Mob Wars" and "Scrabulous," Facebook began attracting independent game developers in early 2007.

Last year, Zynga paid Facebook $444 million in fees, 12 percent of Facebook's total annual revenue. At the same time, Facebook players accounted for 90 percent of Zynga's sales.

Zynga became the largest game publisher on Facebook, regularly accounting for four of the top five games on the platform. Its monthly player numbers, which for the last year have been consistently above 200 million, are routinely four to five times those of its nearest competitor.

Its overwhelming dominance, however, discouraged smaller developers, who thought it impossible to compete with Zynga's well-financed marketing machine.

"Zynga will always outspend you," Relan said.

Until recently, Facebook has maintained a hands-off policy toward its applications. That changed after Zynga in March 2011 announced that it would launch its own platform, Zynga.com. Although Zynga would continue to pay Facebook 30 percent of its sales on Zynga.com, as well, that agreement would have to be renegotiated in 2015.

That meant Facebook needed to cultivate other game developers, many of which, such as CrowdStar, had already started leaving the social network as the cost of luring players away from Zynga became prohibitive.

"Every time marketing costs go up, another handful of aspiring developers bite the dust," said Brandon Barber, senior vice president of marketing at Kixeye. "Facebook is very aware of this now."