Researchers at the University of Sussex in UK asked pupils at a secondary school to design and programme their own computer game using a new visual programming language that shows pupils the computer programmes they have written in plain English.
Dr Kate Howland and Dr Judith Good found that girls in the classroom wrote more complex programmes in their games than the boys and also learnt more about coding compared to the boys.
There are persistent concerns about the underrepresentation of women in computing - only 17 per cent of the UK's computer science graduates in 2012 were female, despite a promising reduction of the gender gap in maths-related subjects at school level, researchers said.
This new study suggests that girls can be motivated to explore programming and create rich gameplay experiences by building on their skills in literacy and storytelling.
Also Read
"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," Good said.
"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," Good added.
Games like these are built on 'scripts', simple programmes that describe what happens if or when a particular condition is met - eg if the player kills the dragon, a message is displayed on screen.
However, many young people with no prior programming experience are daunted by the complexity of the coding languages used to build these scripts.
Howland and Good developed a new programming language called Flip that 'scaffolds' pupils as they script events within their game. It uses a simple interface in which users create scripts by connecting graphical blocks together.
Boys nearly always chose to trigger their scripts on when a character says something, which is the first and easiest trigger to learn.
The study was published in the journal Computers and Education.