Gandhi is one of the most unique figure in history. His adherence to non-violence, his establishment of a full-fledged philosophy behind it and, above all, his success, are practically without precedent. Kings, empires and leaders can often blur into each other. The locations change, the dates are different and the numbers differ, but the essence remains the same. Gandhi was something completely different, and yet games try to represent him with the same pieces they use for everyone else - and so they always make him something far less than he was.
Gandhi has long appeared as a leader in the long-running strategy series Civilization, although they're by no means his only video game credit (take, for example, the 80s Amiga game Nuclear War). They treat his pacifism as a handicap, which is understandable given how focused they are on war, but blinkered nonetheless. Gandhi's pacifism wasn't a restriction, nor is it defined by what it is not.
It was a system unto itself and one that proved effective. During the Dandi Salt March of 1930, an Indian civil servant told his superior that his policy of burning the huts and sheds of villagers who made salt would provoke people into violence. The District Manager replied, "That's what I want. As long as they remain non-violent it is very difficult for us. If they become violent, we can crush it in a day."
The thing is that war is fundamental to these games, and more simply, war is fun in these games. The systems not only allow for warfare, but push the player towards it. Various incarnations of the Civilization games try to disincentivise war against Gandhi by doubling war weariness or combat actions, but they always find that they cannot move the needle enough. The game may tell you that you are a pacifist, but the systems do not allow you to leave your army neglected. Not even Gandhi himself can escape the arms race.
When dealing with the abstracts of countries, games just don't worry as much about things like public opinion or social power, both of which are much less overt than military power and much less fun to represent. In real life, Gandhi's non-violence highlighted the immorality of British colonial rule. But when history is presented as a game that only one player can win, ethics fall to the wayside. In a world so zero-sum, so fixated on a goal as the world of Civilization, Gandhi would have just been shot.
This leads into the second way that games fail Gandhi. A game where you play a single country and try to make that country win is inherently nationalistic. If something would benefit you, but would benefit your rivals more, Civilization would tell you not to do it. But Gandhi described passive resistance as an "all sided sword; it can be used anyhow; it blesses him who uses it and him against whom it is used." There's no doubt that the U.K. saw massive economic benefits from colonialism, but Gandhi's point here is that the damage to the soul of the people far outweighed the monetary gain. It is inherently dehumanising to see another race as lesser, and colonialism requires that belief for the sake of the colonists. Gandhi's point was that with the freedom of India would come the lifting of the sins of colonisation, and so both countries could begin to heal.
Similarly, positioning the player as a country takes away the scope for Gandhi's greatest achievement: the building of a national consciousness. He grew the Indian National Congress from a club for elite, well-educated, higher-case Hindus to an actual pan-Indian movement. In these sweep-of-history video games, there's only one real political desire, and it's whatever the player happens to want at that moment. The idea of a modern Indian state, which is so easily taken for granted now, took a lot of building. There are deep-rooted differences between Indian groups, then as now. If you don't allow for significant differences in people, then you can't represent a system that depends on maintaining differences between people. Colonialism doesn't really make sense in this context, just annexation.
In this though, we also see Gandhi's greatest failure. He fully believed that he could build a new national consciousness from scratch and that this would transcend old divisions of caste and religion. He resolutely believed that the people of a new India would leave behind their differences and so resisted minority protections as divisive. It was this that caused his rift with the Dalit activist B.R. Ambedkar. It was this that pushed the Muslim League away and eventually caused the Partition of India and all of the horrors that came with that. It would, of course, be ridiculous to put all, or even much, of the blame for Partition on Gandhi given all the British did, but between that and how bad modern India is with minorities, it's hard not to wish that he had done much more.
Of course, it was not really possible for Gandhi to shape modern India given his assassination soon after Independence. This is the other thing that games can't really capture about him. Gandhi's entire political career was a force against existing authority, not an authority in himself, and it's hard to make the player anti-authority when the player is that same authority. Gandhi arguably didn't even believe in structured government. He was fully ready for anarchy in India if it meant the British leaving sooner. Positioning him as a leader in the same vein as a Caesar or even an Ashoka just does not make sense.
This is probably the crux of the issue. If a game is to represent Gandhi, it cannot be as a potential player character. It has to be as a force to resist the players instead. He was never a ruler, he never ran the country. If, like Louis XIV, the player is to be the state, then Gandhi can only ever be positioned against them. If a game is to include him, it would have to be leading populist movements against the player. You would see him protest your war-mongering or call for the boycott of your industrial goods. You would see him fast for the independence of the nation you conquered 30 turns ago.
There are some things, though, that we accept these games skipping over. Gandhi as an individual was definitely singular. Orwell said of Gandhi that "Saints should always be judged guilty until they are proved innocent," and there's a lot to Gandhi to take away from that innocence. Things like the questions surrounding the death of his wife Kasturba, the now notorious incidents of sharing his bed with his grand-niece as a test of celibacy, his relationship with his son, or his racism in South Africa are all important when talking about Gandhi. But they are as out of scope for these games as Churchill's support of eugenics or Washington keeping slaves. Games like Civilization are unconcerned with leaders as people. Rather, they want to evoke the feeling of historic figures doing historic things - not them coming home and mistreating their son.
There is one aspect of Gandhi's personality that Civilization in particular loves to focus on, albeit a fictional one. I couldn't finish this article without talking about Gandhi and his love of nukes. I actually think that the joke is still pretty funny. It's a classic video game bug joke, where separate systems combine to form something both incredibly incongruous and yet completely explicable, and the Civ series has really doubled down on it. I just think that it's a shame that once you've gotten past this and a shallow version of pacifism, games have nothing more to say about Gandhi.