The 1999 Electronic Entertainment Expo, or E3, a video-game conference held in Los Angeles, California, was a typically lavish, if bawdy, affair. Here, for three days, the world’s video-game publishers gathered to show off their forthcoming titles to press and to purchasers in an overstimulating marketing circus. David Bowie performed at one of the conference’s orbiting parties that week, and Bill Goldberg and some other glistening-skinned wrestlers grappled one another in a custom-built ring on the publisher E.A.’s gargantuan booth. Away from the action of its main stage, E.A. had stationed a humble area advertising The Sims, an ambitious social-simulation project that almost nobody outside of its development team believed in.

For E.A., The Sims, the latest from Will Wright, the celebrated designer of 1989’s city-planning game SimCity, was a legacy project, inherited when the company purchased its development studio, Maxis. The game had been in stammering development since 1993, when Wright first had the idea for a simulation that would model human behavior, not from the bird’s-eye viewpoint of his earlier game but from the ground zero of domesticity. But replicating the mundane dramas of the living room in game form had proven to be a tall challenge: The Sims was almost abandoned numerous times. “We all knew that if we couldn’t generate any interest at E3 that year, then the game would be cancelled for good,” Patrick J. Barrett III, one of the game’s programmers, told me. “E.A. did nothing to help us. They hid us away. The game wasn’t even displayed on the large screen with the other title’s trailers.” But, within hours, an unplanned, illicit kiss between two of the game’s background characters made The Sims the talk of the show.

During The Sims’s protracted development, the team had debated whether to permit same-sex relationships in the game. If this digital petri dish was to accurately model all aspects of human life, from work to play and love, it was natural that it would facilitate gay relationships. But there was also fear about how such a feature might adversely affect the game. “No other game had facilitated same-sex relationships before—at least, to this extent—and some people figured that maybe we weren’t the ideal ones to be first, as this was a game that E.A. really didn’t want to begin with,” Barret told me. “It felt to me like a fear thing.” After going back and forth for several months, the team finally decided to leave same-sex relationships out of the game code.

When Barrett joined the company, in October, 1998, he was unaware of the decision. A fortnight into his new job, he found himself with nothing to do when his supervisor, the game’s lead programmer, Jamie Doornbos, took a short vacation. Jim Mackraz, Barrett’s boss, needed a task to occupy his new employee, and he handed Barrett a document that outlined how social interactions in the game would work; the underlying rules for the game’s A.I. that would dictate how the characters would dynamically interact with one another. “He didn’t think I could handle it with Jamie off on vacation, but he figured that at least I’d be out of his hair,” Barrett told me. “Neither he nor I realized that he’d given me an old design document to work from.”

That design document predated the decision to exclude gay relationships in the game. Its pages described a web of social interactions, in which every kind of romantic relationship was permitted. That week, Barrett confounded the expectations of his disbelieving boss. He successfully wrote the basic code for social interactions, including same-sex relationships. “In hindsight, I probably should have questioned the design,” Barrett, who is gay, said. “But the design felt right, so I just implemented it. Later, Will Wright stopped by my desk,” Barrett said. “He told me that liked the social interactions, and that he was glad to see that same-sex support was back in the game.” Nobody on the team questioned Barrett’s work. “They just pretty much ignored it,” he said. “After a while, everyone was just used to the design being there. It was widely expected that E.A. would just kill it, anyway.”

In early 1999, before E.A. had a chance to kill the design, Barrett was asked to create a demo of the game to be shown at E3. The demo would consist of three scenes from the game. These were to be so-called on-rails scenes—not a true, live simulation but one that was preplanned, and which would shake out the same way each time it was played, in order to show the game in its best light. One of the scenes was a wedding between two Sims characters. “I had run out of time before E3, and there were so many Sims attending the wedding that I didn’t have time to put them all on rails,” Barrett said.

On the first day of the show, the game’s producers, Kana Ryan and Chris Trottier, watched in disbelief as two of the female Sims attending the virtual wedding leaned in and began to passionately kiss. They had, during the live simulation, fallen in love. Moreover, they had chosen this moment to express their affection, in front of a live audience of assorted press. Following the kiss, talk of The Sims dominated E3. “You might say that they stole the show,” Barrett said. “I guess straight guys that make sports games loved the idea of controlling two lesbians.”

After The Sims’s successful E3 showing, the game’s future seemed secure. But Barrett and his teammates had a new problem to solve: how to decide the sexual orientation of individual Sims. “If you created a household with two same-sex Sims, they would always become gay just from the fact they were around each other the most,” recalled Barrett. “That’s when I came up with the system that determined a Sim’s sexuality through user-directed actions.”

In the game, players were able to interact with Sims in different ways, inspiring them to take a bath, eat food, go outside, and perform other actions. “Certain social interactions were tagged as romantic,” Barrett said. “The game kept track of whether these were performed by same-sex or opposite-sex Sims. The formula was a little more complicated, but, over time, as a Sim developed a relationship, his or her preference was set.” If the player was careful, a Sim could even become bisexual. “The system worked so well that the same-sex support was invisible and seamless. It is rare that something works exactly as you intend it to. A lot of my other simulations in the game fell apart. This one worked perfectly. Once the team saw it in action, they decided I could keep same-sex support, and the topic didn’t come up again.”

The ostensibly controversial design was, to a certain extent, protected by greater concerns about the project. “E.A. was more worried that The Sims would flop and hurt the SimCity franchise,” said Barrett. “It was also a different time; people weren’t so violently for or against same-sex relationships. They didn’t go out of the way to find it and react to it. The right-wing press didn’t have the platform they have today to scream. There was no Twitter, no Facebook, no blogs. I kinda hoped people would come at night with pitchforks and torches. But it never happened.”