Zynga and SoftBank are preparing to announce an alliance to take the social gaming company into the Japanese market. The alliance, which comes at a crucial time for the young company, is part of Zynga’s plan to expand internationally, further diversify its business, and position itself for an initial public offering.

Investors have been nervous about a recent slide in the company’s traffic. To counter that nervousness, Zynga needs an international business to diversify its user base. It also needs to expand beyond Facebook. It has done that recently through deals with MSN and Yahoo, as well as its own FarmVille.com website. But the SoftBank deal could be the most dramatic stroke to reassure investors.

Zynga, a private San Francisco-based social gaming company, has drawn enormous investor interest, with various estimates putting the secondary market value of the company, which is the largest maker of social games on Facebook, at $4 billion to $5 billion.

But there are a lot of risks to Zynga’s business, including the fact that traffic for Zynga’s games has fallen 10 percent in recent weeks, according to SecondShares, which estimates the value of private companies. Zynga’s monthly active users are 219.2 million today, compared to 252 million monthly active users on April 20, according to AppData. FarmVille, Zynga’s biggest game, has 68 million monthly active users, down from a peak of around 83 million.

The SoftBank deal (which we reported earlier) is critical to turning that slide around. Zynga and SoftBank want to create a business with SoftBank’s financial muscle behind it. That venture will take Zynga’s popular Facebook games and turn them into mobile games on Japan’s social networks. Japan’s mobile social networks, while not familiar names to most Americans, have huge audiences, and there is less direct competition for Zynga on those networks than in the hotly comptitive U.S. market.

In the hit-driven game business, nothing is guaranteed. Competitors such as EA Playfish and Crowdstar could always steal away Zynga’s users by coming up with better games. If Zynga can establish itself in Japan and then expand throughout Asia, it will have a new growth engine. A plausible international expansion story could calm jittery investors who worry Zynga is too dependent on Facebook and the U.S. market.

The company recently bought XPD Media, a 40-person game development studio in Beijing. That studio could figure prominently in Zynga’s Asian expansion.

Despite its recent troubles, Zynga has had a winning formula in social games. Zynga remains profitable despite its rapid expansion. It has more users than the top 10 Facebook game companies combined and may generate $500 million in revenues in 2010. Its designers can whip up new games in a matter of weeks and Zynga can cross-sell them to all of its users. Most users play for free, but a sufficient number pay real money for virtual goods to make the games profitable. Zynga can also use the profits from its games to advertise heavily on Facebook, spreading the word about new games. That’s a cost Zynga did not bear when Facebook made it easier for app developers to spread the word virally on the social network — but it also represents a barrier to competitors who can’t afford to spend as much as Zynga.

It has also raised a considerable about of money, including $180 million in December from Russia’s DST, to buy game studios. It’s getting harder for rivals to dislodge it.

Lastly, to protect its core business,  it needs to have a good relationship with Facebook. Even though the companies share a common investor in Russia’s DST, and even though Zynga chief executive Mark Pincus was an angel investor in Facebook, the two companies came to loggerheads over Facebook Credits, which is Facebook’s new virtual currency. That currency is meant to grease transactions on Facebook, improving monetization for apps such as Zynga’s. But Facebook is charging a 30 percent fee on any transactions involving Facebook Credits. That’s a lot more than other virtual currency services charge, and that had Zynga in an uproar.

After considerable acrimony, Zynga resolved its problems with Facebook by announcing a five-year alliance in which Zynga agreed to adopt Facebook Credits in exchange for some undisclosed consideration from Facebook. (Speculation was that Zynga might get a discount on the 30 percent fee based on its advertising spending with Facebook.) The tension over this issue brought Zynga and Facebook to the brink of war, even though Zynga is the maker of the most popular apps on the social network. The resolution of this problem removed one of the big questions marks about Zynga’s future.

But the slide in traffic has forced Zynga to come up with contingency plans. It might, in theory, have to lay off a lot of employees if the slide continues. But for now, Zynga still has 200 job openings and it has been steadily acquiring new game development studios. That’s because the company has grown to around 875 employees extremely quickly. (Last week, it bought Challenge Games for $20.5 million). If traffic dries up, though, so do revenues and then Zynga would have to cut.

For now, it looks like that is not happening. In general, the news is starting to turn positive for Zynga. With an ally like SoftBank, lots of things are possible. Yahoo, for instance, managed to grow significantly in Japan through a joint venture with SoftBank. Zynga may or may not be getting a direct investment from SoftBank as part of the deal — it filed papers recently which would allow it to issue warrants to a corporate partner — but according to our sources, Softbank is essentially bankrolling Zynga’s expansion into Japan.

And if Zynga can make it big in Japan, that will make it far easier for it to be a hit on Wall Street. Please take our poll on Zynga’s prospects below:

Will Zynga’s deal with Softbank position it for an IPO?survey software