At a cocktail party on the second floor of the expensive Bowery Hotel in Manhattan on Thursday night, as trays of stuffed mushrooms and thinly sliced filet mignon circulated, Charles Forman was marveling at how quickly things can change.

“I had $1,700 in my bank account yesterday, and now I have a whole lot more,” Mr. Forman said.

The party was in celebration of Zynga’s purchase of Omgpop, a New York-based game maker founded by Mr. Forman, and it was extravagant to an extent that Omgpop’s employees could only have dreamed of until recently.

Omgpop had been limping along until Draw Something, a smartphone game it introduced just seven weeks ago, became a breakout hit. That drew the attention of Zynga, the maker of FarmVille and the current king of social games, which last week bought Omgpop for $180 million.

Draw Something transformed Omgpop from a little-known, nearly broke start-up into a must-have for an industry giant. The Zynga deal shows how companies are moving at Internet speed to stay on top of online trends, generating quick reversals of fortune.