One Saturday evening last fall, some 180 Goldman Sachs employees assembled at a dock along the East River of Manhattan, divided into 20 teams. Standing on a platform overlooking the crowd was Mat Laibowitz, an impresario-mad-scientist-type dressed in a red t-shirt printed with the words Game Master. Laibowitz handed each team captain a white, semi-opaque plastic cube the size of a tissue box and a blue plastic bag containing the following items: a sealed pack of Wacky-Packages-brand bubble gum cards, a glossy foldout with the heading "Seating chart for Kevin Bacon's wedding," a slip of paper with a three-stanza poem, and a note that read:

Thus began Midnight Madness, a geeky, over-the-top scavenger hunt played by a group of Goldman's New York City financiers and some of their friends with expenses totaling roughly $270,000 for a single evening of play. It raised $1.4 million for charity. The game, which Laibowitz originally co-founded in 1996 with Columbia University buddy Dan Michaelson, requires teams to solve a series of mind-bending puzzles placed around New York City. Deciphering one puzzle points players to the location of the next puzzle, and so on.

Midnight Madness is part performance art, part nerd Olympics, and part urban scavenger hunt, executed in ambitious complexity thanks to resources and access. Before the night was through, the participants played laser mini golf, a game invented for this event, in an abandoned palace at 5 Beekman Street. Tri-colored lasers bouncing over the ruins made the place look as if the set of the Titanic had crashed into the set of Blade Runner. In another ambitious puzzle, players used an iPhone app to actually change the color of the lights atop the tower at One Bryant Park, a major New York skyscraper.

The game's uniqueness lies partly in the participants' interactions with New York as a play space. The Midnight Madness experience is overlaid on the experience of the city, without the abstraction of a fantasy world or sterile digital interfaces. Players can use computers, bicycles, reach out to friends for help--in essence, be themselves as they tackle the challenges. "As soon as you enter the game zone, the texture of the city changes for a few hours," says Michaelson.

In its most recent running, Midnight Madness play lasted 15 hours, beginning on Saturday, Oct. 6 at 7:45 pm and ending after 10 am the following day. The teams represented all of Goldman's divisions pitted against each other, from compliance to core strategies (plus some 20 outside ringers). A Quartz reporter was allowed to embed with the players from the commodities desk, who called their team Black Gold (as in oil).

Before Midnight Madness was a real event, it was an over-acted 1980 Disney movie about an all-night puzzle contest-and a favorite film of Laibowitz's roommate at Columbia. Laibowitz (an engineering major) recalls, "One day I thought, that has to be done."

In 1996, as a senior, Laibowitz tapped classmate Michaelson to help put on the first Midnight Madness. There were only about 20 players and six puzzles, which were written on pieces of paper sealed in envelopes that were hidden all over the city. The two staged nine more Midnight Madness events, ending in 2007. The cost was minimal, they never charged an entry fee, and they never got any permits from the city, recalls Laibowitz.

The latter is surprising, given how alarming game play can look to the innocent bystander. In the year before Sept. 11, 2001, the whole game was based on the conceit that players had to defuse a bomb. Laibowitz and Michaelson decided to call it quits after Midnight Madness X because, as Michaelson put it, "Opportunity costs were too big. It was almost interfering with our careers." Michaelson and his partner Tamara Maletic had founded Linked by Air, a graphic design studio specializing in the production of public spaces. Laibowitz, meanwhile, was getting his PhD at the Massachusetts Institute of Technology's Media Lab.

One of Midnight Madness' players, Goldman Sachs partner Elisha Wiesel, mourned the game, describing its demise as "a void that needed to be filled." He explained his devotion: "There aren't too many things out there that stimulate multiple-percent life-quality boosts just by encountering them once." In Spring 2012, he put feelers out to Michaelson about resurrecting Midnight Madness. The latter's initial response was reserved, explaining in an email to Wiesel that his design firm couldn't do the work for free. On the other hand, if an entry fee were assessed to cover expenses, players might expect too a flawless experience. "Some of the fun of the game was its glitchiness," Michaelson wrote.

Wiesel came up with a solution: He would charge no entry fee, and he would launch the event as a non-profit fundraiser for Good Shepherd Services, where he is a board member. The roughly $270,000 of operating expenses were covered by Goldman Sachs Gives, a philanthropic fund financed by the firm and directed by its partners, through a grant made at his recommendation. "I wanted to be able to tell donors that every dollar they donated would go to the charity and not to operating costs," he said. He appealed to his Goldman colleagues' competitive spirit by asking them to support one or more teams with their own grant recommendation or donation to Good Shepherd Services, a New York-based non-profit that provides support for over 25,000 at-risk youth and their families every year. The event netted $1.4 million for the organization, the bulk of which executive director Sister Paulette LoMonaco said would go toward giving high school dropouts the training needed to finish school.

The abandoned palace at 5 Beekman St.: the set of the Titanic crashes into the set of Blade Runner.Jason Fulford

A lot of player behavior is driven by mistrust of the 34 people running the game, who are collectively known as Game Control. The parsimony with which Game Control dispenses information had historically been merciless, and the latest Midnight Madness was similar. Players were not informed of the location of the starting line until the day of the event. They were not told where the finish line was (a Ukrainian diner in Manhattan's East Village neighborhood called Veselka) until they had solved the final puzzle. Nor were they told how many puzzles remained in the game (there were about 18 in total, depending on how one counted).

Most players' default assumption was that Game Control was trying to double-cross them. That came to the fore as some of the teams confronted a mysterious luminous cube puzzle. Game Control said not to open the cubes, so some players decided that was definitely what to do. Consequently, many of the cubes broke.

Given the difficulty of the puzzles, it was an open secret that strats (what Goldman staff call their front-office quants, or math and statistics specialists who work with clients) were highly desired team members. But that might have ultimately been a double-edged sword. Commodities vice president Nancy Twine later observed, "Sometimes, one of the things that may have set Black Gold back is that we were overthinking. Because we had so many quantitative minds together, we lost sight of the big picture." Black Gold came in seventh out of the 20. Core Strategies, comprised entirely of strats (team name: Mr. Pink, a Reservoir Dogs reference), placed in the bottom half. At least four teams did not finish at all.

Overthinking was a problem across the teams. Many were suspicious as to why the packing list they received a few days ahead of the event included toothpaste. One team reportedly put toothpaste on one of the clues. On the other hand, some puzzles seemingly required a high level of conspiracy-mindedness in order to solve them. One such puzzle was the thermal board / travelling salesman puzzle. Here's what the electronics board supplied to players looked like and how the puzzle worked:

Circuit-Board-Puzzle-3-typo-fixed One of the most ambitious puzzles was the one that involved changing the color of the lights on One Bryant Park. The original plan was highly complex, involving using the luminous cubes to decode and control the colors of the spire. The cubes in fact had accelerometers and wireless transmitters in them that would have made this possible. But, because of unanticipated technical challenges, players wound up instead changing the colors via an iPhone app as a reward for completing the first zone of puzzles. The organizers set this up through Spireworks, which had an interactive lighting interface for the spire of One Bryant Park.

The laser mini golf at 5 Beekman was also visually elaborate. The organizers had set up red, green and blue laser emitters and receptors on three floors. The laser emitter cabinets were locked with combination locks, with the combinations found by solving other clues in the game zone. Once a laser was emitted, players needed to use hand-held mirrors to bounce the beam around and through walls, corners, and windows to hit the receptor. Teams discovered where the finish line was when they finished all three levels.

Advance preparation for Midnight Madness was futile. Doing a bunch of Sudoku for practice wouldn't help anyone when they were standing in the lobby of the New York Daily News building at 4 in the morning, and were supposed to be figuring out that a city's position on a compass and the second hand on a clock form certain angles, which then have to be translated into semaphore, which in turn have to be translated into plain English to spell out "Third and Long," the name of the bar that contains the next puzzle.

The first place team, which arrived at the finishing line at 10:20 am, was 0xFFFFoo (from the Global Securities Services division, which helps clients set up hedge funds.) The name comes from the hexadecimal code for yellow. Why yellow? Team co-captain Igor Modlin explained, "In the Midnight Madness movie, the yellow team wins. They're the good guys." oxFFFFoo's win came as a surprise, especially since it had the triple handicaps of having only one laptop between the 10 of them, no bicycles, and no previous Midnight Madness players. Modlin said his team's victory lay in the skill sets of their division. "We are in a customer-facing business-our job is to help clients solve complex problems. The key is we work well together. During Midnight Madness, the goal wasn't to have the single smartest guy in the room. You don't have time to have the smartest guy in the room."

Dr. Ewan Kirk, a Goldman alum and CEO of Cantab Capital Partners in Cambridge, UK, flew from England to New York just to play Midnight Madness on team oxFFFFoo. "It was one of the most enjoyable experiences of my life," he said.

Laibowitz was his own harshest critic. After the event, he dwelled obsessively on the aspects of the game that did not go as planned, such as the broken cubes and occasional software mishaps. "I put in so many risky elements that some of them would work," Laibowitz mused afterward. "The whole thing is resilient to individual screw-ups, because the overall thing is to get people to see and do things and have fun. That can't be ruined." The group plans to stage Midnight Madness again on October 5, and is accepting participants from outside Goldman.