Stewart Butterfield stood in front of his team in his company's Vancouver office. He opened his mouth to speak, but couldn't get twenty seconds through the announcement. Tears started streaming down his face.

His staff listened as Butterfield broke the news: He was laying off most of them, men and women he had personally recruited months and years prior for his gaming venture Glitch. "[I] convinced them to leave their jobs which they liked and where they were making good money. They're married and have kids to support," Butterfield tells me. "It [was] horrible. So horrible."

The feeling of failure was familiar to Butterfield. This was the second time he had been forced to abandon his dream of building a gaming company. This time, it would be for good. With years and years of effort under his belt and nothing to show for it but layoffs, the dream had soured and died.

Of course, Silicon Valley knows Butterfield's name less for his failures and more for his successes. He's had an illustrious career in tech, from co-founding Flickr and selling it to Yahoo for reportedly $35 million, to his current venture Slack.

Slack is an enterprise chatting app that's taking off with startups and corporations alike, growing seven and a half times its size in one quarter alone.

But between Butterfield's big triumphs were hard times, namely his attempts and failures -- twice -- to build a "never ending" game. He wanted to create a gaming world where people didn't go to win. They went to play forever. He wanted to build a culture and community online.

Butterfield wanted to create this game so badly that when it failed the first time -- in the early 2000's -- he couldn't let it go and returned to it again in 2009 after his hit with Flickr. Ironically, both Flickr and his current project Slack were pivots spun from infrastructure built to support the game creation process. And both have seen far greater success than his beloved game ever did.

Butterfield's story is one many entrepreneurs can identify with. It's a tale of risk taking, passion, perseverance, and success. But it's also one of fear, failure, and disappointment. It's rare in Silicon Valley that a product could flop so hard -- not once, but twice -- and yet out of that failure could come -- not one, but two -- hits.

Butterfield is a strange choice for a two-time CEO of a gaming company. He's no Mark Pincus -- by his own admission, he's not that into gaming. As a former philosophy student with a master's from Cambridge, he was more interested in play as a framework for social interaction than play for play's sake. "Infinite games are what we collectively do as a species for building culture," Butterfield explains. "It's fundamental for human beings, as deep a desire as hunger and thirst and sex."

From an early age, he was intrigued with how online communities like IRC allowed people to experiment with their identities. His then-wife Caterina Fake found the topic compelling too.

"There are at least two kinds of games," Butterfield says, paraphrasing a favorite scholar of his. "The first type is played for the purpose of winning and the second type you play for the purpose of play."

When they brainstormed a company to start, they settled on building "Game Neverending." Butterfield and Fake spent a year and a half creating it.

But when it came time to raise funding they were fishes in a sea of dirt. The dotcom crash, Enron, and 9/11 had all happened in quick succession, and there was no money out there to fund an unproven gaming venture. "We got to the point where the only person [at the company] who got paid was the one of us who had kids," Butterfield says.

It was time for a pivot, and fast. The company had only a few months left of cash reserves to build a brand new product an investor might want to fund.

Butterfield came up with the idea for Flickr after a food-poisoning induced fever dream. "It was this shitty version of Flickr that didn't make any sense," Butterfield remembers, laughing. Nevertheless, the team built it, using their game technology. Users had shoeboxes of photos they could share with other users, chatting about the images in real time.

Flickr started blowing up, and the team iterated on the product. It soon morphed into the version people would recognize today.

The rest is Silicon Valley legend, with Yahoo snatching up Flickr for a reported $35 million, a mere year after the pivot. Butterfield spent a quiet four years or so at Yahoo, developing Flickr and laying low. By 2009, however, he itched to build something new. He hadn't left Game Neverending behind for good. "It felt unfinished," Butterfield says, shaking his head.

With the reputation of Flickr behind him, raising money in '09 was a breeze. Marc Andreessen came on as an angel in the seed round and later on Andreessen Horowitz committed to the Series A. Jeff Weiner, CEO of LinkedIn, invested, as did Accel Ventures, Google VP of Product Bradley Horowitz, and President of Groupon Rob Solomon. Butterfield raised $17.2 million total.

A second time around, the stakes were high for this to succeed.

Butterfield recruited the best design and engineering talent that money could buy. He even convinced Keita Takahashi, a famous Japanese game designer, to move over from Tokyo with his wife and kids.

The team began working in stealth on Glitch, Game Neverending part two, with major upgrades in technology and user experience. The idea was the same -- that people would enter the Glitch world to explore, not to win anything. They would talk to other users and find characters and build homes and learn weird skills like "transcendental radiation" and "potion making." They could die and go to hell and squish grapes for awhile before being reborn.

"It was super fucking weird," Butterfield remembers.

The team spent months -- then years -- painstakingly designing critically lauded artwork and solving tough engineering challenges. But at some point, it became clear that Glitch did not appeal to the masses. "It was so weird and unfamiliar to people," Butterfield says. "They'd be half an hour into this and they'd still be like, 'What is this game?'"

The Glitch team experimented with different ways to onboard people: Explainer videos, different customer acquisition strategies. Nothing worked. Only five percent of people who tried the game stuck with it.

Then came that fateful day in November 2012, when Butterfield told the team he'd made the tough decision to shut down the company, tears rolling down his face.

"I couldn't see it happening with the amount of money we had left," Butterfield says. He pauses, deep in thought. "Or ever really." He had finally laid his dream to rest. As much as he loved the idea of a never-ending game, it wasn't going to happen.

Fortunately, he had ended the work on Glitch with enough financial run room to help his laid off staffers move on. He ran a website called Hire a Genius to get the word out, made phone calls to friends at other companies, and wrote reference letter after reference letter. In the end, every single member of Glitch found a new job.

Continue? Yes/No

With that trauma behind them, Butterfield, his team of co-founders, and a few of the designers and engineers who stayed on, started brainstorming about what to build next. Much like with Game Neverending and Flickr, the team had a limited amount of money -- and therefore time -- left to attempt a successful pivot.

Before the holidays struck, they had decided to do a complete 180. They'd go from an imaginative and beautiful game to an enterprise communication application. Two ideas that could not be more drastically different.

Why enterprise communication? Well, it was the only product they had up their sleeve that made sense.

The Glitch team had built an internal chat system while they developed the game. Every employee would work on it in their spare time. Although it was clunky, its features were robust.

When it came time for the pivot, Butterfield and his remaining team decided they’d spin out that feature and try to turn it into a company.

Sounds like a big leap, particularly in a space as crowded as enterprise communication. Butterfield would be going up against HipChat, Campfire, and Kato in the direct work chat field alone, let alone Convo, Yammer, Hall, and all the other Facebook-like work messaging systems. But Butterfield had looked at what was out there and determined it not good enough. He was sure they could do better.

And better they did. The team started working on Slack in January 2013, and on boarded their first beta customers by March. Buzz began spreading. This was no buggy Yammer, limited HipChat, or questionable imitator. This was the answer to enterprise communication problems.

I rolled my eyes when I received this pitch two months ago as Slack prepared to launch to the public. How many enterprise communication pitches had I gotten in my time at Pando? Too many to count. I had all but banned myself from covering them. I said as much to Butterfield on the eve of Slack's launch, as he showed me the product via a screenshare. It was pretty but who cared?

It took two months for Slack to prove itself -- to me anyways -- as not just another enterprise app. It was the app that everyone and their mothers were fleeing competitors to use. Companies that have adopted it have publicly admitted they "want to make sweet love" to Slack. Microsoft's former CTO Ray Ozzie is a fan, and Marc Andreessen, an investor, said he has never seen a business app go viral like this. CB Insights studied the growth and determined that all hype aside, the app has "momentum."

I ran into Jeff Atwood, co-founder of Stack Overflow, at a conference. The last we had spoken, he had been an early adopter of chat app Kato -- backed by Brad Feld and the Foundry Group. But a few months later, Slack was all he could talk about.

"We're a remote team and this is essential to our livelihood," Atwood says. "We can't just have a tool we have to have the best possible tool for online chatting." That's what led him to Slack. He says everyone was "so gaga" about it, but he approached the tool with skepticism at first.

"I had been burned so many times with chat software. Like Campfire or HipChat, those things are hideous," Atwood says. "But [with Slack] the hype is mostly warranted."

He loves the whimsical touches of the application. As examples he cited the fact that the program is very visual, automatically pulling in images from tweets or youtube videos when people post them. Emojis and GIFs are supported, as are notifications from services like Salesforce and GitHub. Atwood said the search is far better than any enterprise chat application he's used before, and he loves little features like silly quotes at the top of each page.

"One of the things I love about Slack is you can see the gaming DNA," Atwood says. "There's someone looking at this who really understands the details."

Atwood isn't the only one falling hard for the software. The list of companies already using Slack -- a mere two months after its launch -- is impressive. Butterfield rattled off groups in different sectors. In journalism, teams from Quartz, Buzzfeed, Business Insider, Medium, Wirecutter, Gannett, Slate, The Guardian, The Times of London, Engadget, and NBC Interactive are on Slack. In web audio, Rdio, Pandora, Rhapsody, and Songza have converted. In the payments space Braintree, Venmo, and, as of last week, their competitor Stripe are using it.

Granted some of these companies may only have smaller technical teams on Slack. As for bigger groups, Butterfield cites Foursquare and 99designs with 100 people apiece, Shutterstock with 160 people, and Walmart Labs with a team of 350.

In terms of growth, Slack had 11,200 monthly users at the end of January, 31,000 by the end of February, and 50,000 by the end of March.

With numbers like that, the days of crying in front of his team while laying everyone off are a distant memory for Butterfield. He has put to rest his latent fears that he was only a one hit wonder in Silicon Valley.

"Turning it around at the last second and having it work out perfectly?" Butterfield says. "Definitely a comeback."

[illustration by Brad Jonas for Pando]