A university study has found that girls are better than boys at making computer games based on stories.

They use their skills in literacy and storytelling to write more complex programs in their games than boys, and learnt more about coding, according to the University of Sussex study, which will be published in the January issue of the journal Computers & Education.

Researchers Dr Kate Howland and Dr Judith Good, from the university’s Informatics department, asked pupils at a secondary school to design and program their own computer game using a new visual programming language that shows pupils the computer programs they have written in plain English.

Dr Good said: “Given that girls’ attainment in literacy is higher than boys across all stages of the primary and secondary school curriculum, it may be that explicitly tying programming to an activity that they tend to do well in leads to a commensurate gain in their programming skills.

“In other words, if girls’ stories are typically more complex and well developed, then when creating stories in games, their stories will also require more sophisticated programs in order for their games to work.”

For the research, which was funded by the Engineering and Physical Sciences Research Council, the youngsters, aged 12-13, spent eight weeks developing their own 3D role-playing games, using software made available with the medieval fantasy game Neverwinter Nights 2, which is based on Dungeons & Dragons. Dr Howland and Dr Good developed a new programming language called Flip, which allows users to create scripts by connecting graphical blocks together. It also translates these scripts into plain English to help pupils understand the scripts they have created.

A range of different events were used by the pupils to trigger their scripts, with the girls using almost twice as triggers as the boys.

In 2012, only 17% of the UK’s computer science graduates in 2012 were female, and it’s thought girls may be put off computing in their teenage years by the portrayal of the ‘nerdy boy’ in TV and film.