Green and Larson cemented their friendship during a 2011 game jam Larson organized to promote the development of what he called “meaningful games.” At Amy’s suggestion, Ryan created Giga Wife, a simple, Tamagotchi-like game in which players pushed buttons to deliver romantic gestures to their virtual spouses. In an explanatory essay, he underscored the importance of marital mindfulness, confessing that he too frequently took Amy for granted. “Most of my life has been spent taking and pursuing my desires, in contrast to giving and seeking hers,” he wrote. “I tell her I love her every day. But I’m not sure I always do it for her. Sometimes I do it out of duty.” For his part, Larson made a game based on the philosophy of Molinism, which theorizes that God accounts for free will by knowing how we will respond to certain conditions, then reverse-engineering the world to create those conditions. In Larson’s game, players had to design an environment that compelled an onscreen character to trip over a log and land next to a butterfly, thereby sparking a lifelong passion for lepidopterology.

Soon the duo began talking about working together. After tossing around a few ideas, Green suggested making a game about Joel. Larson was instantly enthusiastic. “We both felt compelled to do it,” Green says now. In fall 2012, Larson announced to Green that he would forgo all of his contract work and live off his savings for a year to work on the game.

“He said, ‘I feel an urgency in my spirit. I think you’re supposed to do this and do this now, and I want to help you,'” Amy says. “Who does that? They knew each other and worked together, but it wasn’t like they were best friends. It was just unbelievable.”

The videogame became Green’s primary method of dealing with Joel’s illness, as well as his connection to a son he struggled to understand.

The Greens took a hard look at their own finances and decided they could afford for Ryan to set aside his contract work as well and spend three months working on That Dragon, Cancer. But when that time was up, Amy couldn’t bring herself to ask him to return to work. “I remember thinking, ‘This is the most foolish thing I’ve ever done,'” she says. “Living off our savings until we have nothing left—you can’t do that with a kid who’s dying. You can’t do that in general! But I had that conviction that I needed to let him do this.”

By early 2013, Green and Larson began showing scenes from the game to potential funders—an urgent need, as by this point the Greens had burned through their savings and were living off donations and loans from friends. One of their first meetings was with Kellee Santiago, an old acquaintance of Larson’s who was leading developer outreach for the Kickstarter-funded Ouya console. Santiago had previously cofounded Thatgamecompany, creator of the art-house crossover hits Flower and Journey, and she was immediately drawn to Green and Larson’s project. “Five minutes into it, in my mind I was canceling all my meetings, because I wanted to spend as much time as I needed to talk them through this,” she says. Santiago eventually agreed to fund the project, giving Green and Larson enough money not only to support themselves but to hire three more developers to work on it with them. (The money, along with some other grants, lasted through November 2014, at which point the team raised more than $100,000 on Kickstarter to complete the game.)

Green was accustomed to transmogrifying his life into art. He and Amy had already made a short film based on their experiences with Joel and had self-published a children’s book titled He’s Not Dead Yet. Now he channeled his frustration, fear, love, and hope into designing a series of interactive challenges. One preliminary idea had players struggling to insert a feeding tube into Joel’s nose. Another, called “Auto-Tune the Noise,” poked fun at the barrage of well-meaning advice—Have you tried oxygen therapy? Have you tried cutting out sugar?—that they’d received over the years. Green wrote a minigame in which players could shoot at targets that represented the terrible decisions he and Amy were forced to make—whether to undergo another round of radiation despite the damage it might do to Joel’s spinal column, whether to give Joel antiseizure medicine that might cause peripheral blindness.

Over time, That Dragon, Cancer became Green’s primary method of dealing with Joel’s illness, as well as a way for him to preserve a connection to his son, whom he struggled to get to know. In real life, Joel couldn’t talk about his feelings, leaving Green to guess at his thoughts and emotions. Joel’s reaction to radiation therapy was particularly puzzling. Children usually hated being placed on the gurney inside the giant linear accelerator, resisted the anesthetic, fought and clawed at their parents and doctors every time they entered the room. But Joel loved it. He grew impatient in the waiting room, and his face lit up when the doctors came to get him, more excited than his parents had ever seen him. Green couldn’t know just why Joel was so enthusiastic about undergoing the anesthesia, but he wrote a scene imagining the adventures Joel might be experiencing in his mind—riding animals made of stars, giggling and tearing across the cosmos.

According to Green’s original design, the game would end with you, the player, facing an array of dozens of levers. For a while you would yank and tug at them, trying to discern the pattern that would unlock the game’s conclusion. After a few minutes, the camera would pan up to reveal the back of the console, its wires frayed and disconnected. The levers were false, the game’s designer was in charge, and you were forced to acknowledge that you were powerless to control the outcome.

That conclusion arose directly from the Greens’ religion, their belief that God’s will was beyond human comprehension, that we are operating within a divine plan that we may or may not have the power to influence. Even as they pursued every medical option, their agony was somewhat relieved by the conviction that Joel’s fate was ultimately in God’s hands. “With God we don’t have to do the right things or say the right things to somehow ‘earn’ his healing,” Amy wrote in an online diary soon after Joel’s first biopsy. As Ryan worked on his game, the Greens continued to believe they were on the cusp of a miracle: Joel’s survival and recuperation in spite of all medical science.

But then, toward the end of 2013, Joel developed a new tumor near his brain stem, and his health began deteriorating quickly. He struggled to maintain his balance. His right eye turned more noticeably inward. He began experiencing seizures and difficulty swallowing. In January 2014, Joel’s oncologists told his parents that the tumor was untreatable. The Greens traveled to San Francisco to take part in a Phase I experimental trial of a new drug, but it was unsuccessful. On March 12, 2014, on the recommendation of their hospice nurse, the Greens took out the feeding tube that was Joel’s only source of sustenance. That night, they hosted an evening of prayer and song at their home. At 1:52 am on March 13, Joel died in his parents’ bed, with Ryan and Amy by his side.