This might be a cliché, but the idea to consider video games philosophically came to me through BioShock. I was just two years out of a philosophy degree when BioShock Infinite arrived, and everything I'd learned about personal identity floated to the top of my mind as protagonist Booker DeWitt uttered his final words. BioShock Infinite is a game with problems, particularly around race, but its ability to raise subjects like these fascinated me.

See, academic writing does have practical applications.

Inspired by the likes of The Tao of Pooh, myself and Dan Griliopoulos - an occasional contributor to Eurogamer - have put together a sort of pop philosophy of video games. After all, if we can have books about the philosophy of Harry Potter, Mad Men, and Star Wars, then why not the philosophy of Zelda, Fallout, and Mass Effect? In fact, as we argue in the book, video games may even be better placed than other media to spark philosophical discussion, thanks to their interactivity. In Mass Effect 3, one of Commander Shepard's missions is to fly to Rannoch, the abandoned quarian homeworld, and rescue Admiral Koris from the geth. When you get there, however, Koris begs Shepard to save his small crew of noncombatants instead. Do as he asks, and Koris will die so that his crew can live. Stick to the original plan, and the civilians will die but Koris will go on to save many more lives in the war against the reapers.

The question of whether to sacrifice the few to save the many is such a recognisable trope that you may already know the philosophical archetype: the trolley problem. A runaway train is about to run over five people; do you pull the lever that would divert its path such that it only killed one? Often used in discussions of utilitarianism - briefly, the view that actions are right if they promote the happiness of a majority - the trolley problem is an example of one of philosophy's favourite tools, the thought experiment. Video games are an ideal format for such experiments. They present counterfactual (i.e. "what if") scenarios and allow the player to observe and often affect what would happen next. The overuse of the term "ludonarrative dissonance" may have soured many to the notion of games as "mechanics plus narrative", but it helps when drawing parallels with philosophical practice: the narrative is the thought part, the mechanics the experiment.

Playing through a video game's take on the trolley problem isn't the same as discussing it in a classroom, but that's a good thing. When it comes to thought experiments, video games have several advantages over the traditional spoken or written format. They usually contextualise the philosophical question within a larger narrative, force the player to witness the consequences, and when input is required demand the player actually act.

In the security of the classroom, it's easy to tell your teacher you'd pull the lever to switch the train tracks. It's less easy to actually push the button that makes your personalised Commander Shepard send a group of innocent quarians to their death, and then watch the consequences play out as the rescued Admiral Koris rushes to radio the crew you've doomed: "Hello? This is Zaal'Koris. Does anyone copy? Hello!" The immersion factor in video games the player encourages more careful consideration of the philosophical problem.

The world of the original Mass Effect trilogy is rich enough to provoke philosophical discussion on many topics, not just ethical dilemmas like this one. The shock that kicks off Mass Effect 2, the apparent death of Commander Shepard, raises questions about personal identity. After Cerberus has spent two years bringing Shepard back to life, Miranda wants to make sure their work has paid off. And to determine whether this Shepard is the same person as the one who seemed to die in the destruction of the Normandy, she asks questions meant to test whether their patient's "personality and memories are intact".

The memory criterion is a theory in the philosophy of personal identity, a possible answer to the question, "What enables one person to persist through time, to be the same person from one moment to the next?" This theory is explored by any game that features characters with amnesia, but some games go further. Both BioShock Infinite and Frictional Games' wonderful Soma ask a difficult question in the philosophy of personal identity: if all it takes for one person to be the same as another is that chain of memories (and/or other psychological states), then what happens if two people can both trace their chain back to one?

In Soma, questions of personal identity are tied to questions about the philosophy of mind, since the player character is a robot that has the personality and memories of a human being called Simon. Creative director Thomas Grip uses Soma as one big thought experiment, assuming a premise by which machines can be conscious and allowing players to explore the consequences. When you, the player, switch control to a new copy of Simon's personality and memories in a new robotic body, are you destroying yourself?

Or take Fallout 4, whose biggest game-altering decision is one that directly tests the player's theory on the philosophy of mind. You can go through the beginning of the game doing quests for each of the three rival factions in the Commonwealth, but eventually you have to pledge your loyalty to one over the others, and which you choose will depend on how you feel about the existence of the synths, synthetic beings that appear and act as if they were conscious. According to the functionalist theory of mind, anything that functions like a mind is one. If you agree, you're probably inclined to side with the Railroad and work to free captive synths. Disagree, and you're more likely to help the Institute reclaim their lost "property", or side with the Brotherhood to destroy these "abominations".

The Mass Effect games might be fundamentally about battling intergalactic bogeymen, but they leave space for moments of abstract reflection.

The Mass Effect series too demonstrates an interest in the philosophy of mind, most obviously with the synthetic geth which have shown enough independent thought to rebel against their quarian makers. One thought experiment in Mass Effect 2 tests the player's intuitions about whether or not the geth count as conscious, as Legion offers Shepard the chance to deal with a rebel group by either destroying or rewriting them. While it might seem kinder to kill a conscious being than to wiping its memories, if you view the geth as machines then, as Mass Effect 2 writer Patrick Weekes put it to us, you're "just making the toaster work properly."

Unfortunately, players may also be guided by the game's explicit morality system, whereby the designers were forced to label one choice "paragon" and the other "renegade". It's a reminder that, as well-suited as games are to philosophical inquiry, there's still plenty of work to be done. Video games are sold on the promise of interesting choices, but those are often restricted to black-and-white "good" vs "evil" options, as in the original BioShock. Hopefully more game developers will leave behind simplistic scenarios like whether or not it's okay to kill little girls, and follow in the footsteps of games like Soma.