The polyp, visible under the fleshy tissue of the intestine, needs to be removed. You grasp the clump of cells with a glinting metal forceps and pull. Red liquid gushes from the area, flowing outward and collecting in a shallow pool. A blood vessel has burst. Flustered, you cauterize the wound, but cause unnecessary damage to the surrounding tissue.

Your score dips. The case is real, but the blood is virtual. The above scenario was designed by a company that creates mobile games in which doctors can diagnose conditions and “perform” a variety of surgical procedures on digital patients.

“We’re using video game design and psychology to improve physician decision-making and enhance critical thinking,” says Sam Glassenberg, founder and CEO of Level Ex, a medical tech company creating professional video games for doctors.

Before founding Level Ex in 2015, Glassenberg worked at LucasArts and led Microsoft’s advanced graphics team. Not surprisingly, he runs Level Ex like a gaming studio. Cases are designed to get harder over time, users unlock new equipment as they progress, and games are A/B tested to achieve the perfect balance of reward and frustration.

See also: Diabetes marketers turn to big data, gaming to improve outcomes

Dr. Jonathan Cohen, a gastroenterologist and a clinical professor of medicine at New York University’s Langone School of Medicine, sees the promise of using such gaming to teach clinicians. Cohen took the above simulation, dubbed Gastro Ex, on a test run (Level Ex, he says, isn’t well known in the gastrointestinal community). He was impressed by its ability to present complex situations in which users must weigh multiple options and make decisions in real time.

While human interaction remains the core of medical training, there’s room to improve its support system, Cohen says. Traditional simulators, which can cost upwards of $100,000, are good tools for practicing mechanical skills. But games, which are cheap, engaging, and easy to disseminate, might do a better job teaching cognitive ones. When well designed, they can better equip doctors to identify abnormalities, respond to unexpected problems, and work more efficiently with team members.

Engaging with Providers

Where doctors see an opportunity to improve training, pharma companies see a potential entrée with providers. Level Ex’s Airway Ex app, which features mobile games for anesthesiologists, has more than 35,000 registered users. Both Gastro Ex and Airway Ex are free to download and are built around real medical cases. Drug companies eager to expose physicians to new treatments and medical devices pay Level Ex to insert ads into existing games or to develop custom ones.

For Baxter, Level Ex created a mini game that instructs anesthesiologists how to properly dose the inhaled anesthetic Suprane. For Medtronic, it built an AR simulator that teaches doctors how to use its updated version of the laryngoscope.

“Doctors are avid learners who want to learn about new devices and treatments,” Glassenberg says.

See also: Cigna partners with Microsoft HoloLens on biometric game

He speaks from experience: The son of two physicians, his wife is a pediatrician. “I’m the black sheep of my family that never went to medical school,” he jokes. Level Ex informally started in 2012, when Glassenberg designed a training app for his dad. When the app blew up, he realized how starved physicians were for digital tools.

Level Ex isn’t the only company helping pharma engage with providers through games. Klick Health built an interactive experience in VR that teaches physicians about the bonding mechanisms of a neurotransmitter receptor (users must fend off molecules by blocking them). BioLucid, which was recently acquired by Sharecare, creates interactive VR videos that help doctors teach patients about a range of conditions. Pharma companies can pay to sponsor the videos or run ads inside them. Sharecare’s series on diabetes and psoriasis were sponsored by Eli Lilly brands Trulicity and Taltz, respectively.

Like Level Ex, both companies are steeped in video game culture, with developers coming from Electronic Arts, Blizzard Entertainment, and Microsoft.

Cohen believes these game-like experiences can be effective in teaching doctors how to perform rare procedures. While most gastrointestinal fellows will perform more supervised colonoscopies than required to meet competency standards, there are many opportunities for dynamic practice for less-routine surgeries.

“A machine can tell a trainee, ‘You didn’t see that area very well. Go back again,’” he explains.

See also: How Can Marketers Best Unleash the Potential of Virtual Reality?

Despite the promise of these platforms as learning tools, Cohen says their job is to enhance, not replace. Medical training continues to rest on a foundation of human interaction, such as the back and forth between an experienced doctor and a trainee operating together.

Marketers’ Golden Hour

Glassenberg aims for his games to mirror this exchange and provide many of the basic functions as a mentor does — for example, detailed monitoring and real-time feedback. Games are about “driving user behavior,” making them useful tools for learning and marketing.

“When you talk about the psychology of advertising, you think about the anchoring sunk-cost fallacy and using users’ known cognitive biases. These principles are employed by video games,” Glassenberg notes.

He has found most Level Ex users play the game at night, when they have time to engage with the content. For marketers, this could be the golden hour, provided they find a way to slip their messages in.