Film about WW2 codebreaker Alan Turing is attacked by biographer for exaggerating love affair with woman because he was gay and says Keira Knightley is 'too glamorous' Turing played a key role in breaking the German Enigma code during WWII He is credited with saving thousands of lives during the conflict An American funded film is soon to be filmed about the gay codebreaker Will star Benedict Cumberbatch as Turing and Keira Knightley as girlfriend But it has been slated by his autobiographer, who has called it ludicrous A film about homosexual wartime codebreaker and father of modern computing Alan Turing has been attacked by his biographer. Enigma hero Turing played a key role in breaking the German Enigma code during the Second World War while working at Bletchley Park. He is credited with saving thousands of lives during the conflict. But a new American funded film about his life has been lambasted for exaggerating a love affair with a woman, played by Keira Knightley, and making a fictional connection to a notorious spy. Turing was a well known homosexual. Enigma hero Turing (left) played a key role in breaking the German Enigma code during the Second World War while working at Bletchley Park. Benedict Cumberbatch (right) is set to play him in an American funded film The Imitation Game is based on a biography by Andrew Hodges, an Oxford maths academic. It is set to star Benedict Cumberbatch as Turing and fellow Bletchley codebreaker Joan Clarke will be played by Keira Knightley as Turing's girlfriend - despite the fact that he was gay. The Sunday Times reports that Mr Hodges has been sent a script of the film and is 'alarmed by the inaccuracies it'. He said: 'They have built up the relationship with Joan much more than it actually was.' He said while the couple had been 'briefly engaged', it was said that he liked her because he could talk to her as if she were really another man' and there had never been much physical contact. He said the casting of Keira Knightley in the role, did not 'strike him as right.' Fellow Bletchley codebreaker Joan Clarke (left) is set to be played by Keira Knightley (right) as Turing's girlfriend - despite the fact that he was gay He said: 'I'm not being rude about her, but Joan Clarke was no glamourpuss.' The film follows the break-up of their relationship, which happened because Turing was unable to live a lie by marrying her. But Hodges is said to be more concerned about the main story line, which invents a fictional relationship between Turing and John Cairncross, who was later identified as the fifth man in the British spy ring that included Kim Philby and Guy Burgess. People who worked on separate projects at Bletchley were kept apart and Hodges labeled the scenario 'ludicrous' adding that Turing and Cairncross would never have met. He said: 'Their relationship is invented.' The paper reports that a line in the script, which sees Turing confronted by a colleague who tells him 'No wonder they think you are a spy', has now been removed. The film was written by Graham Moore and is to be directed by the Norwegian Morten Tyldum whose last production was the violent thriller Headhunters, and produced by Teddy Schwarzmann. Enigma hero Turing played a key role in breaking the German Enigma code during the Second World War while working at Bletchley Park (pictured). Turing led the team at Bletchley Park that cracked the World War II Nazi Enigma code, allowing the Allies to anticipate every move the Germans made Hodges is said to have written to Mr Moore about his concerns about the script, including criticisms that it showed nothing of Turing's 'extraordinary skills as a scientist and computer designer'. He said he was told they were going to make more of his marathon running and see him having more interaction with colleagues to make him look less wimpish. Turing led the team at Bletchley Park that cracked the World War II Nazi Enigma code, allowing the Allies to anticipate every move the Germans made. He is now widely recognised as a computing pioneer. They were tasked with breaking the German codes, transmitted on complex devices called Enigma machines, which encrypted words into as many as 15 million million possible combinations. He also deciphered the codes that ensured the D-Day invasion could go ahead as planned. But his work was ill-rewarded after the war. Forbidden to talk about his secret activities, he took a teaching post at Manchester University, where he became involved with a 19-year-old youth called Arnold Murray. Turing turned a blind eye to Murray pilfering petty cash from him, but when a sentimentally valuable watch went missing, he unwisely reported the crime to the police. The police investigating the robbery turned their attentions to Turing's private life and he was convicted of gross indecency and given the choice by the court of going to jail or accepting "chemical castration" - a course of the female hormone oestrogen to lower his libido. The persecution and police surveillance Turing found himself under (there were fears that, at the height of the Cold War, his homosexuality would make him a target for blackmail by Soviet spies) wore him down. In June 1954, he decided to imitate his favourite film, Walt Disney's Snow White - which he had watched seven times - and fatally bit into an apple coated with cyanide. Mr Schwarzmann said the film was a drama, not a piece of entertainment and added while they do not want to invent events, there are some 'creative liberties'. He added: 'When we come over, we are also going to get in touch with some other experts on that period. We know how very important Turing is to you over there. Turing led the team at Bletchley Park that cracked the World War II Nazi Enigma code, allowing the Allies to anticipate every move the Germans made.He is now widely recognised as a computing pioneer. His outstanding talents were recognised at the outbreak of war, when he was plucked from academic life at Cambridge to head the team at Bletchley Park, codenamed Station X. Apple founders Steve Jobs and Steve Wozniak were said to have based their famous logo on Turing's deadly apple - a proud legacy that will continue regardless of how the establishment views him.