All perfect praise be to Allah the Lord of the Worlds. May His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
In general, electronic games are a permissible form of entertainment and Islamic law (Sharia) does not prohibit entertainment. The Prophet Muhammad (peace be upon him) used to say to Aisha (may Allah be pleased with her) during times of celebration: "Have you no amusement? The Ansar are delighted by amusement." [Bukhari].
However, some forms of entertainment, including electronic games, have become associated with certain Islamic and educational concerns in this age. These concerns have transformed entertainment from its permissible, general, and innocent form into harmful behaviors that damage both the individual and society.
Among the clear violations of Islamic law that some games may contain are: encouraging gambling as well as drinking alcohol, as if they were normal activities in real life, depicting nudity and illicit sexual relations, as if they were part of the culture of the youth and their generation, promoting racism, sectarianism, and tribalism, or raising religious slogans that contradict Islamic creed, or distorting the luminous image of Islam and Muslims.
Among the educational concerns that experts, scholars, and guides have warned about is the severe addiction experienced by many young people. This addiction results in significant health problems, psychological harm, mental exhaustion, and a neglect of many important duties and achievements.
In conclusion, it is forbidden to sell, buy, or distribute electronic games that contain violations of Islamic law or that lead to the harms and negative consequences identified by experts in their scientific studies and technical reports. This is because it constitutes aiding in sin and this is forbidden. Allah the Almighty Says (What means) And cooperate in righteousness and piety, but do not cooperate in sin and aggression. And fear Allah; indeed, Allah is severe in penalty." [Al-Ma'idah/2]. However, if these games are free from such violations and harms, and return to their pure form and permissible purposes, then it is permissible to sell and play them. And Allah The Almighty Knows Best.