Does inclination pre-exist exposure? The Nether at the Royal Court. Photograph: Johan Persson

In Jennifer Haley's play, the internet has evolved into the Nether, a virtual space that incorporates sensation as well as information. Here, stimulation can be simulated and, in a zone of anonymity known as the Hideaway, consenting adults adopt child avatars to enact their fantasies of illicit sexual activity. This is virtual paedophilia, an act of imagination. But, as director Jeremy Herrin puts it: "Just because it's virtual doesn't mean it isn't real."

"If you have a libertarian streak," Haley says, "you'll side with the person fighting for freedom of expression. I can't come down on one side or the other. I don't know if this should be allowed."

Sooner or later, we'll have to decide. Haley, who was born in Texas and now lives in Los Angeles, has "no doubt" that such events will come to pass. "We're already on our way," she says, pointing to the rise in gaming firms creating virtual worlds and singling out a Japanese video game called RapeLay, in which players stalk, kidnap and rape a mother and her two daughters. Second Life has already tackled the issue of virtual child pornography or "age play" – whereby gamers use underage avatars for cybersex – by directly limiting sexual activity to areas that child avatars can't enter.

In the play, Haley explores whether "bizarre sexual fetishes are something you start out with, or something that's brought to the fore by what you look at or what you interact with". Does an inclination pre-exist exposure – or is it that encountering explicit material triggers, warps or worsens our sexual preferences and expectations?

The boundary between reality and imagination fascinates Haley. Her debut, Neighbourhood 3: Requisition of Doom, showed suburban teens hooked on a first-person shooter that let them rampage through their own neighbourhoods, killing friends and family. They Call Her Froggy, in development, charts a woman's obsession with a video game starring her ex-boyfriend.

Even so, Haley is keen to stress the neutrality of technology. The net is not all porn and cybersex and she uses World of Warcraft to stay in touch with far-off friends herself – albeit in the guise of a blue troll hunter. "There are two sides to the coin. You can lose yourself in the internet and your can find yourself in the internet."

Theatremakers have sometimes struggled to place our online lives onstage, the challenge being "to imagine the internet as a three-dimensional space without going to cliched places like internet dating or chatrooms". In that, a lot is being asked of designer Es Devlin: "The Nether is the absolute apogee of coding – as near as damnit real," she says. "Its world needs to be ultra-real, not techy, but we need to see the process that built it." Devlin's design involves projecting the image of an object on to its actual surface, giving the sense of "glitching and fragmentation". It might look like the focus has gone or suddenly flash to reveal the computer-programmed wireframe model beneath.

In other words, every constructed fiction is based on something real and activities taking place in the Hideaway are an actual game of make-believe with consequences in real life. Theatre functions in exactly the same way. "Actors become avatars onstage," explains Haley, "They assume these characters. That's why theatre works particularly well for this story."

• The Nether is at the Royal Court theatre, London, until 9 August. Box office: 020-7565 5000. Jennifer Haley will be in conversation with criminal psychologist Anthony Beech at the Royal Court on Friday 25 July at 6.15pm.