HERAT, Afghanistan (Reuters) - Think Super Mario Bros, but with an Afghan twist. This is how Afghanistan’s first generation of female coders explain their abilities as game-makers after uploading more than 20 games on digital app stores this year.

More than 20 young women in the western city of Herat have established themselves as computer experts, building apps and websites as well as tracking down bugs in computer code.

Like the team of Afghan schoolgirls who rose to fame last year when they competed in a robotics competition in the United States, the coders show what reserves of talent there are to be tapped when Afghan girls are given a chance.

“Coders can work from home and it is in this process women are building a new career path for themselves and for the next generation,” said Hasib Rasa, project manager of Code to Inspire, which teaches female students coding in Herat.

One of the games designed by the all-female team has caught the eye of developers and gamers as it illustrates the scourge of opium cultivation and the challenges the Afghan security forces face as they try to stamp it out.

The 2D game “Fight Against Opium” is an animated interpretation of the missions that Afghan soldiers undertake to destroy opium fields, fight drug lords and help farmers switch to growing saffron.

Afghanistan is the world’s largest source of opium but it also grows saffron - the world’s most expensive spice - which has long been pushed as an alternative to wean farmers off a crop used to make heroin.

Afghan coders practice at the Code to Inspire computer training center in Herat, Afghanistan April 24, 2018. REUTERS/Mohammad Shoib

Despite a ban, opium production hit a record in 2017, up 87 percent over 2016, according to a U.N. study.

Khatira Mohammadi, a student who helped develop the anti-opium game, said she wanted to show the complexities of the drug problem in the simplest way.

“We have illustrated our country’s main problem through a game,” said Mohammadi.

At the institute, more than 90 girls and young women, wearing headscarves and long black coats, are trained in coding and software development, a profession seen by some in conservative Afghanistan as unsuitable for women.

In Afghan society, it is unusual for women to work outside the home. Those who do, are mostly teachers, nurses, doctors, midwives and house helpers.

After the ouster of the Taliban in 2001, women regained freedom to work in offices with male colleagues - but many consider working as a software developer a step too far.

Hasib Rasa said girls are encouraged to design original player characters, goals, and obstacles that reflect Afghanistan’s ethos.

The course is exclusively aimed at females, aged 15-25, who are unable to pursue a four-year degree due to lack of funds or hail from families where they are prevented from enrolling in co-education schools.

“In Afghanistan the ability to work remotely is a key tool in the push for equality,” said Rasa.

(This version of the story was refiled to fix typo in paragraph two)