I spent most of my youth being told to get a haircut. As a boy of slight build who usually had hair down around my shoulders, I looked a bit too much like a girl for the comfort of the home counties. Society gets angry when gender roles are blurred, precisely because those roles are a fragile act put on with clothes, hairstyles and makeup. If they weren't enforced, clearly defined gender roles would not exist.

I take comfort in the idea that most of the young men telling others to get a haircut today are rushing home to play at being buxom dark elf warrior maidens in World of Warcraft. Gamer culture has gained a bad reputation for misogyny, but it seems male gamers are more than a little curious about playing out female gender roles. It makes perfect sense. The real world enforces gender roles, but virtual worlds let gamers express the feminine parts of themselves that don't fit in with their masculine identity.

The kind of virtual worlds that video games allow us to enter have been commonplace in science fiction for decades. But the way that the virtual inevitably blurs the representation of sex and gender is never explicitly dealt with. Science fiction is torn between its higher mission to explore the future, and its lower function as mass entertainment. Deep Space Nine may be the gayest Star Trek, but in common with most of sci-fi's major franchises, it still keeps homosexuality and queerness of all kinds off screen.

Science fiction novels have gone much further in exploring queer futures. From the 1960s onwards New Wave authors like Joanna Russ, Samuel Delany, Ursula Le Guin and Thomas Disch began to push forward the representation of LGBT themes in science fiction. Russ's 1975 novel The Female Man used the tool of alternative universes to explore how gender roles are socially constructed. As liberal democracies like Britain welcome their first gay marriages, queer visions of the future look prescient. But despite the success of these authors, SF still clings to an unrealistically straight vision of the future.

When author and historian Alex Dally Macfarlane made a call earlier this year for a vision of post-binary gender in SF, her intelligent argument was met with predictably intractable ignorance from conservative sci-fi fans. For writers and fans like Larry Correia, whose virulent attack on MacFarlane was excellently dissected by Jim C Hines, sex is a biological imperative and the idea of gender as a social construct is a damn liberal lie! But Correia boils it down to a much simpler argument. However accurate a queer future might be, SF authors must continue to pander to the bigotry of conservative readers if they want to be "commercial".

Which is of course nonsense. The science fiction novels of Iain M Banks were bestsellers many times over, in part because the future they explored was openly queer. Citizens of Banks' future society the Culture have the ability to change their sex at will, and frequently shift between sexes and gender roles. Kim Stanley Robinson's 2312 became both a bestseller and multiple award winner with a vision of the future that included fluid non-binary gender. And Nicola Griffith's historical epic Hild, nominated for this year's Nebula awards by members of the SFWA, is built around a bisexual protagonist.

The best science fiction literature explores a future of fluid gender identity that is much closer than many imagine. Genetic researchers have already discovered the two genes that battle to determine the sex of every human, opening the possibility of biological sex change in adult humans at the genetic level. Combine these scientific advances with the changing structure of our society and the gender shifts of virtual worlds and, far from being the lifestyle of a minority, queerness looks very much like the mainstream culture of the future. If science fiction has a role at all, it's to reflect that reality, not deny it.