One Big Bowl of Spaghetti

By September of 2001, the Sims team inside of Maxis had worked past many design hurdles. In fact, the design progressed faster than usual because the online game took the core technology used in The Sims and added online functionality to it. "At first, we really just took the original Sims code and connected it where necessary to let Will and Chris test out their design ideas," explains development director Eric Todd. The advantage to this methodology was a chance for the team to see the game up and running at an early date. But there was also a disadvantage: The engineering team was modifying the code in an ad hoc fashion. "We were working off game technology that had been written over five to seven years ago for the original Sims," says Todd. "It was never designed to be used online." And now, the team was beginning to pay the price.

screenshot
Luc Barthelet, Maxis' general manager.
In September, most of the key team members realized that the technology behind the game was fundamentally broken. Worse, no one knew quite how to fix it. "There were a lot of engineers walking around the building last fall with no sense of ownership," explains Luc Barthelet, the laconic French programmer and executive who serves as the general manager of Maxis. "When I'd ask them why a certain part of the game wasn't working, they'd say to me, 'But Luc, the old Sims 1.0 code made me do it!'"

 
"The general sense inside the company was that the game couldn't be made within two years."
-Luc Barthelet on the mood inside Maxis last fall.
Barthelet, who had come to Maxis back in 1997, is largely credited with turning the studio around after the EA acquisition. He completely revamped the dismal SimCity 3D project (which turned into SimCity 3000) and heavily invested in Wright's idea for The Sims. While he had spent most of 2001 working on projects with EA's other PC studios, Barthelet came back onto The Sims Online in September of last year. "When I arrived, the general sense inside the company was that this game couldn't be made within two years. Let me put it this way: The game wasn't tracking to ship anytime in the near future," he suggests. That was heartbreaking news. The most important project in the history of Electronic Arts was deep in turmoil, and Barthelet needed to figure out how to fix it...and fast. The Sims was still at the top of the charts, but like with any phenomenon, each passing day meant that The Sims Online had a higher risk of missing its window to capture the mass market.

The bottleneck wasn't in the design. The problem was the engineering and the architecture. "The code was like a big bowl of spaghetti that was all tangled up," Barthelet explains. "I looked at the way this game was going and said, 'Listen, we have to stop this right away. We have to cut all the code apart and figure out how to connect all the parts of the game again.'" While everyone on the team realized that the core game technology wasn't stable, Barthelet's insistence on completely reengineering the game's infrastructure was a devastating decision. "It was a difficult decision to make," he admits. "I had to look people in the eyes and say, 'Listen, we're going to stop development and begin a process called refactoring.'"

screenshot
A programmer is perplexed by some of the 3 million lines of code in the game.
Refactoring, a programming term, refers to the process of pulling the game's underlying architecture apart and figuring out the most efficient way to reconnect each individual part. For a programming project with 3 million lines of code twisted together, the task was not going to be easy. "Some engineers quit over it," Barthelet says with characteristic matter-of-factness. "But there wasn't a lot of discussion. That's what had to be done."

On September 20, 2001, the refactoring of The Sims Online began. While the design for the game built by Wright and Trottier would survive the technical retrofit, the underlying guts of the game had to be completely reorganized. And with the game due to ship in 2002, Barthelet knew the 50-person engineering team had only a matter of months to get the game in fighting shape. Therefore, a milestone was set: The first phase of refactoring needed to be done by Thanksgiving. "And I have to tell you, most of the time refactoring doesn't work," Barthelet warns. The odds weren't in the team's favor.

Sculpting the Technology »