Teenage boys are perhaps more known for playing computer games but girls are better at making them, a University of Sussex study has found.
Researchers in 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 Kate Howland and Dr Judith Good found that the girls in the classroom wrote more complex programs 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% 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.
Some believe that girls are put off in their teenage years by the common portrayal of the 'nerdy boy' in TV and film.
This new study, published in the January 2015 issue of the journal Computers & Education, suggests that girls can be motivated to explore programming and create rich gameplay experiences by building on their skills in literacy and storytelling.
Dr Good says: "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."
The young people, aged 12-13, spent eight weeks developing their own 3D, role-playing games, using software made available with the popular medieval fantasy game Neverwinter Nights 2, which is based on the popular Dungeons & Dragons franchise.
Games like these are built on 'scripts', simple programs that describe what happens if or when a particular condition is met - e.g. 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.
So, Dr Howland and Dr 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. As well as generating the code to build the game, Flip 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 - for example, when a character is killed, or says something, or moves into a particular part of the screen.
The girls used seven different triggers - almost twice as many as the boys - and were much more successful at creating complex scripts with two or more parts and conditional clauses.
Boys nearly always chose to trigger their scripts on when a character says something, which is the first and easiest trigger to learn.
Notes for editors
University of Sussex press office contacts: James Hakner and Jacqui Bealing. Tel (+44) 1273 678888 or email firstname.lastname@example.org
Learning to communicate computationally with Flip: a bi-modal programming language for game creation is available online now and will be published in print in the January 2015 issue of the journal Computers & Education.
The research was funded by the Engineering and Physical Sciences Research Council (EPSRC).