Joel Green is hysterical and there's nothing I can do about it. I try bouncing him on my knee, but whenever I stop the giggles make way for fresh anguish. I try offering him a carton of apple juice, but what little fluid he manages to swallow soon comes back up, chased by curdling screams. Many video games are power fantasies. This video game is something else. It's a puzzle without a solution. It's a game about pain, loss, fear and, ultimately, surrender. In many ways it's a disempowerment fantasy. Except, Joel Green's story is no fantasy.

"That's how it really happened," says Ryan Green, Joel's father and the co-creator of That Dragon, Cancer. "We were in the hospital. Joel had acute stomach pains. It was right after the doctors declared him terminally ill." In just two hours Joel became severely dehydrated and, because of the stomach bug, was unable to keep any fluids down. "For six hours I couldn't comfort him," says Green. "It was a window into hell. I felt overwhelmed. I called my wife and said: 'You need to come. I can't do this any more.'"

Joel is four years old and currently fighting his third year of terminal cancer. His young body has already endured a life's worth of surgery, of chemotherapy, of prayer. The tumours have left him partially deaf and blind and, at one point, forced him to relearn how to walk. Yet he remains a survivor, confounding his medical team's expectations with a resolute determination to stick with life, with his brothers, with his lot. But while the family remain in the eye of this storm - next week Joel has an MRI scan to check whether the skewered tumours have returned - they've chosen this moment to express their story through a video game. Why now?

That Dragon Cancer's low polygon look is in keeping with the minimal, muted tone.

"It's important to me that, when I'm speaking about my journey that I'm doing it from a 'now' perspective," says Green. "You get a lot of wisdom in the pressure cooker. I like to think of this as a cup of water. I want to scoop it up and hand it down to someone to drink. I think I can do that more effectively in the middle of this thing than afterwards." That's not to say that Green views the game as providing any sort of moral instruction. "I'm not trying to create rules for people to follow when dealing with cancer, or some potentially damaging platitude. This game is just a reflection of how I see the world, of my story."

Back in the hospital room I lay Joel in his narrow cot, the air thick with imagined smells of antiseptic and laundry. It's the middle of the night and there are no nurses in the corridors. Joel's screams are inescapable and distressing. This is a video game but the real effect of a baby's suffering on the human instinct is no less diminished in this un-reality: everything in me longs to settle him, to meet whatever essential need he has in this moment, to complete this most urgent of quests. Joel lies quietly on the bed for a moment. Then he smashes his head against the railings. I hunt for an 'undo' button, some floating prompt to click that will reverse the action, lift him from the crib and stop this self-harm. But the only prompt I find reads simply, unhelpfully: 'Pray'.

Green began working on That Dragon, Cancer in November last year with his friend Josh Larson. The pair met at the 'Meaningful Gameplay Jam' an event organised by Larson to encourage games that, in his words, have the power to "cause someone to live differently". In Larson, Green found an ideal teammate for this difficult project. "Josh and I share a perspective on both games and life," says Green. "We are interested in telling stories that speak to the deepest things that people have to deal with. The medium is pregnant with potential to do this. Games exist at that nexus where film meets programing. Instead of passive viewing you invite people in, to actively walk with you. They can see what you saw or feel what you felt."

Click 'Pray' and your character, voiced by Green himself, utters a desperate, gutsy plea for divine intervention, something, anything to ease the child's pain. The words are a far cry from the primary colour pleasantries of the Sunday school teacher; rather it's a longing from the deepest place, a Gethsemane appeal, spat out in desperation on sore knees. As the prayer continues Joel's cries settle into sniffles and, finally, into mute, peaceful sleep. The relief is palpable. In that moment the player fully feels the release and freedom Green must have encountered in that room.

Green is unsure on whether the metaphorical dragon will feature in actuality in the game. The team continue to experiment.

It's ostensibly a novel moment in a video game, but is the underlying experience that different to so many virtual problems that need solving? In this early scene (just one of the many vignettes that will comprise the full game) the player is presented with a problem and, by investigating their environment, must uncover the solution, - in this case, a literal Deus Ex Machina. In life, I put it to Green, even for people of faith, God does not always offer such a practical aid to tribulations. How then will the pair avoid making 'pray' the solution to each of the game's terminal problems?

"That is the great mystery," says Green. "Joel has seizures because of the chemotherapy. They are serious seizures, but he doesn't shake and drool or convulse. It's more of a head nod; his head falls forward. We pray for this to stop and you know, the most frustrating, confusing, helpless thing for any parent is to pray and for nothing to happen. I think that's another aspect of faith: perseverance in the face of this storm that won't go away."

I wonder whether this experience is incompatible with the video game, a medium that many engage with specifically because of the reliability and justice it offers in contrast to life's manifold injustices. Doesn't cancer, with its capriciousness invite unsatisfying game mechanics? "We're trying to transcend the narrow view of expressing things through mechanics," says Larson. "One of the primary goals of our game is to inspire conversation outside of the game. As a result the mechanics are subservient to that goal; we don't always have to make them the number one problem. For example, we might try to discuss something like 'justice' in a thematic way."

For Green, video games do provide a powerful way to explore one aspect of the Christian faith through mechanics: grace. "Whenever game designers attempt to insert morality in a game they usually arrive at some variation of a karma mechanic," he says. "So the more bad things you do the worse things go for you and vice versa. There's an innate feeling of justice in these types of game: I got what I deserved. By contrast, the idea of grace is this uneven equation - I don't get what I deserve - and expressing that in a video game could be powerful. The player has good things happen to them despite having done something bad. That's such an effective demonstration of my understanding of grace."

Joel does not feature in the game as a physical asset. He is invisible, interactions instead revealed through audio.

I wonder aloud whether Bioware, with their karma meters and dependable rules are the Pharisees of game development and we laugh a much-needed laugh. Despite the significance of faith to Green and Larson's development (and the experience upon which it's based) there's no sense that That Dragon, Cancer is a proselytising work. "I am trying to come from an honest place," says Green. "I am not trying to tell you how it should be. I am just trying to show you my perspective. Maybe it has value. I hope it does. I hope people see the world and God in a different way perhaps. But I am not out to make converts. There are universal things here that we can all understand.

"In that hospital, at two in the morning, I remember crying out. I remember my prayer changing from pleading 'stop this' to becoming more of a thankful thing. Joel may have been declared terminal but he wasn't dead. That's when there was peace and he fell asleep. It's not about saying this is how it must be for everyone. It is a case of saying: this how it happened for me."

Nevertheless, the experience is incomplete for Green and his young family. I ask him whether not knowing how the story ends in life makes it harder to consider an ending for his game. "That is the great risk," he says. "At any point the medical team could tell us to prepare for death. I am living in the shadow of that possibility. I'm wrestling with having an ending where Joel lives or an ending where he dies. We wrote a book and our ending was: maybe he'll live to 80. It's such a huge risk to say something like that: the reality might not match the hope. I am coming to terms with maybe being OK with that. But I am still contending for the greatest thing... I don't know the answer. I don't know if he dies or lives or both. Maybe we end the game before we know?"

Then I ask Green the hardest question: will the game's message remain the same whether Joel - the real Joel - lives or dies?

There's a painful pause. "I hope the message doesn't change," he says. We sit in silence for a while.

Then: "Maybe it will change for a while, you know? But that's the thing with life. You go through these hard things and sometimes you deal with anger. Sometimes you deal with a feeling of injustice. Sometimes euphoria. My hope is that eventually I can step back and trust that it's going to be a good story in the end. A lot of players don't want to enter our story. Because he could die, right? And who want to play a game about that? But I want people to trust that I am going to tell a good story regardless. Because, as difficult as it is, I am living in a good story."

The child's cries featured in the game are not Joel's own. Instead Jon Hillman provided samples and sound design.

In video games there are few tragic stories in the classical sense. By virtue of making it to the end of the game, the player must have triumphed. Victory is a prerequisite of a video game's conclusion. But there does seem to be a greater willingness in literature and cinema for creators, readers and viewers alike to approach more troubling thematic subject matter. I wonder why Green and Larson believe people would want to play their game, to choose to experience such devastation, even second hand. "Hope," says Larson. "People search for hope in things. This is a game filled with hope. And for me personally, as a video game player: I want to taste the full range of human experience. In books or film you get to have those experiences, to explore what it means to live. But in games we typically focus on small subsets of life. To be immersed in other situations. There's value in that."

"People reject thinking about cancer because they are ultimately afraid it's going to happen to them," says Green. "Nobody has a problem watching a zombie horror film because, on some level they know that this is fantasy. But cancer is a real and present enemy to humans in this life. And it's everywhere. My journey has been characterised by coming out from under that fear. There's this scene in the movie Rise of the Guardians when one of the characters looks fear in the face and says: 'I know who you are but I'm not afraid of you.' I've feared cancer for my entire life. Then it happens. And life goes on. You learn this when you go through a great struggle. I hope people can somehow overcome their fear through this game."

That Dragon, Cancer is still at an early stage of development. Neither Green nor Larson know its full shape or scope yet, how many scenes it will feature, how long the game will last or, of course, how it will end. But there's a sense that this will be a celebration of all the good things within and surrounding Joel, as well as the tragedy. I ask Green which of those good memories he plans to include in the game.

He is quiet for a long while. Then, with a smile says: "The way Joel dances. The way he laughs. The way his brothers treat one another. The affection they have. I want to put those things in the game.

"He is the sweetest kid. I can't really articulate...I hope to capture some of that, some of who he is. You know when a father pulls out the photos of his children from his wallet and continues to show them to you way past your interest level? I have an opportunity here to create the ultimate photo album. In the end, I guess my greatest hope is pretty simple: that players might care about my son the way that I do."