Huddled in front of a computer screen, a group of teenagers at a state school are engrossed in a video game - and their teacher encourages them to continue to the very end.
The game, where a rubbish collector has to empty bins by navigating a maze while avoiding infection from insects, is the brainchild of Hamdan Mohammed, 15.
Hamdan devised it in a gaming laboratory at Al Marwah School in Abu Dhabi.
"I have played a lot of games but I am creating one for the first time," he said.
It was part of Changing the Game, an initiative introduced this summer by the Advanced Micro Devices (AMD) Foundation and the Abu Dhabi Education Council (Adec) to turn young gamers into socially aware designers.
The hope is the pupils will pay greater heed at school to science, technology, engineering and maths.
A group of 77 Emirati pupils have been taking game-design workshops and digital literacy lessons at the AMD lab. Ten teachers are being trained to introduce game creation and use across the curriculum from next year.
The scheme is part of Abu Dhabi's effort to prepare its economy beyond reliance on oil, said Allyson Peerman, the president of the AMD Foundation.
Science and technology skills are essential, Ms Peerman said, "especially to the semiconductor industry that Abu Dhabi wants to invest in".
"Pupils need to learn teamwork, problem solving and critical thinking skills and this programme introduces all of that in an exciting way."
Mark Hale, the associate dean of the Centre of Excellence for Engineering at the Dubai Men's College, said a workforce that was literate in technology was an indicator of a country's ability to sustain itself.
"The complexity of today's technology-driven global economy presents a significant challenge for governments to educate students and prepare them for the future," Mr Dean said.
The Abu Dhabi schools project is designed to keep the students involved, said Lisa Stark, of Parsons the New School for Design, who drew up the curriculum.
"We start them off with physical play where they have to act like the objects of the game," said Ms Stark. "They then have to write up the instruction sets and this allows them to think logically about the game."
In five days, pupils are taught gaming terminology and the various stages of game development. Finally they produce their own game based around an environmental issue.
"The children were really motivated and some even went beyond the classroom discussion to using online tutorials for issues they had while designing the games," said Ms Stark.
Benjamin Stokes, the head of assessments for the project, said that as the organisers were drawing up the programme many teachers had expressed a desire to move away from rote learning, which often made science and maths lessons boring for pupils.
"There is a move to go beyond memorisation of the textbook, and with game making they have to play with cause and effect, understand the scientific process and work with hypotheses," Mr Stokes said. "This makes them ask good questions."
Introducing such concepts in early school years makes it easier to ignite a passion for careers in science and technology, he said.
The focus now is on ensuring the programme is not a one-off.
"We are working with the teachers to get this incorporated into the curricula," said Ms Peerman.
Omar Al Saadi, a technology teacher at the Ghantoot School and one of the 10 being trained, welcomed the approach.
"Right now, there is very little activity and pupils get bored easily," Mr Al Saadi said. "If we can introduce this it will be a big step."
He plans to train teachers in other subjects to make simple games for complicated topics.
"Every teacher wants to make their class easy and games is a good way to do so," Mr Al Saadi said.
Dana Jumaa, a Grade 11 pupil at the Salamah Bint Butti school in Baniyas, said she would want such activities to be a part of the curriculum.
"It would have taken me so long to understand a circuit or how to programme, if I had to just read it," Dana said. "This is a better way of teaching it."