When game developer Zynga, Inc. launched its $1 billion initial public offering in December, the company could cite the stunning success of its Facebook social networking game FarmVille as a reason investors should sink money into the company.

But a decision issued on Monday raises the possibility that the company may owe some of its success–not to mention a fair bit of cash–to a rival game creator. On Monday, Oakland, Calif. federal district court judge Yvonne Gonzales Rogers largely denied Zynga’s motion to dismiss a suit brought by Facebook game developer SocialApps LLC, which accuses Zynga of violating a contract and making use of the confidential source code underlying its own farm game, myFarm.

SocialApps, represented by Girardi Keese and Milord & Associates, released myFarm in November 2008, making it the first farming social network game on Facebook, according to the complaint. In May 2009, Zynga approached SocialApps about buying the intellectual property rights and code for myFarm.

The companies entered into a letter agreement in May 2009 and SocialApps began sharing due diligence material. But Zynga suddenly stopped talking, SocialApps claims. SocialApps claims that it later learned that Zynga took its source code and used it in FarmVille, which was released in June 2009.

SocialApps filed its suit in July 2011–two weeks before Zynga filed its IPO prospectus–claiming misappropriation of trade secrets and breach of contract. Zynga’s lawyers at Quinn Emanuel Urquhart & Sullivan moved in October to dismiss the trade secrets and breach of implied contract claims in the suit, which they noted came “amidst rampant rumors” of Zynga’s IPO.

Judge Rogers granted Zynga a partial win on Monday, dismissing theft of trade secrets claims related to images and various features of myFarm but allowing others to move forward. The judge ruled that since myFarm was online six months before the May 2009 letter agreement, the images and features were already public. “Publicly available information, by definition, cannot be protected as a trade secret,” she wrote. The judge granted SmartApps leave to amend on that issue.

The bigger loss for Zynga, though, was the judge’s decision not to dismiss three claims for breach of implied contract, confidence, and implied covenant related to the myFarm source code. “The allegations here are sufficient to allege conduct beyond a mere breach of the terms of the agreement which would support a claim for tort damages,” Judge Rogers wrote. Zynga has yet to seek dismissal of SocialApps’s claims for copyright infringement and breach of written contract.

SocialApps counsel Graham LippSmith of Girardi Keese said the decision “does not affect the lawsuit at all.” To the extent it does, he said, SocialApps will file an amended complaint. Damages will be “astronomical” given the success of FarmVille, LippSmith said.

Zynga counsel Claude Stern of Quinn Emanuel and a spokesperson for the company declined to comment.