Praise be to Allah.
Islam is a balanced religion that pays attention to the human inclination towards leisure and fun, and strives to direct it in a correct manner that will be beneficial and not harmful, that is moderate and not extreme. This is one of the secrets of its perfection and its suitability to all times and places.
Hence there are proven exceptions for three-dimensional toys in the hadiths that prohibit image making. That is in the hadith of ‘Aa’ishah (may Allah be pleased with her) who said: I used to play with dolls in the house of the Prophet (blessings and peace of Allah be upon him), and I had friends who would play with me. When the Messenger of Allah (blessings and peace of Allah be upon him) came in they would hide from him (behind a curtain), but he would send them to play with me.
Narrated by al-Bukhaari (6130) and Muslim (2440)
She (may Allah have mercy on her) also said: The Messenger of Allah (blessings and peace of Allah be upon him) came back from the campaign to Tabook or Khaybar and there was a curtain over her niche. The wind lifted the edge of the curtain and uncovered ‘Aa’ishah’s toy dolls. He said: “What is this, O ‘Aa’ishah?” She said: My dolls. He saw among them a horse with two wings made of cloth and he said: “What is this that I see in the midst of them?” She said: A horse. He said: “What is this that I see on it?” I said: Two wings. He said: “A horse with wings?” She said: Have you not heard that Sulaymaan had horses with wings? She said: And the Messenger of Allah (blessings and peace of Allah be upon him) smiled so broadly that I saw his eyeteeth..
Classed as saheeh by al-‘Iraaqi in Takhreej al-Ihya’ (2/344) and by al-Albaani.
Ibn Hajar (may Allah have mercy on him) said:
It is permissible to make images such as toy dolls, because ‘Aa’ishah (may Allah be pleased with her) used to play with them in the house of the Prophet (blessings and peace of Allah be upon him). Narrated by Muslim. The wisdom behind that is to train girls to in childrearing.
End quote from Tuhfat al-Muhtaaj (7/434)
The well-known view concerning the concession in this case is that it is for children, as was stated by more than one of the scholars, such as Ibn Battaal in Sharh Saheeh al-Bukhaari (9/304), and Badr ad-Deen al-‘Ayni in ‘Umdat al-Qaari (22/170)
It may be said that the concession was only granted to girls in this case because there was a need for it, so if an adult needs such a thing, it is not far-fetched to suggest that a concession may be granted for him, as in the case of one who uses it to keep him away from things that are obviously haraam, and he finds it very difficult to do without it, as the questioner mentioned in his question. Thus he may be distracted by permissible kinds of entertainment from being tempted to sin and getting into trouble, and he may dispel boredom, and be content with that in order to keep away from an environment that is infested with sin. The smart person is the one who knows how to take care of himself and keep away from that which is haraam, and take a gradual approach until he reaches a point where he is completely safe, even if that leads to falling into some makrooh matters along the way.
Imam an-Nasaa’i wrote a chapter in as-Sunan al-Kubra (8/179), in which he narrated that hadith of ‘Aa’ishah (may Allah be pleased with her), and called this chapter: “A man allowing his wife to play with dolls.” It appears like this, in general terms, without any limits based on the wife being young. Moreover, the incident in which the Prophet (blessings and peace of Allah be upon him) saw a toy horse that had two wings happened after the campaign to Khaybar or Tabook – the narrator was uncertain. Al-Haafiz Ibn Hajar (may Allah have mercy on him) said: At the time of the Khaybar campaign, ‘Aa’ishah was fourteen years old; she had either completed fourteen years, or passed that age, or was close to it. At the time of the Tabook campaign, she had definitely reached that age.
End quote from Fath al-Baari (10/527)
The point of mentioning that is to highlight that there is some degree of textual and rational evidence for lenience for grown-ups with regard to electronic games that do not contain any objectionable material, on condition that the grown-up who plays such games does not spend all his time playing them for the purpose of avoiding committing evil. Rather he should be involved in some useful activities, such as taking useful courses, joining study circles, participating in various Muslim community activities, and even working to create a Muslim community in an environment that is far removed from religion. Many people have succeeded in such efforts, praise be to Allah, and non-Muslims have even succeeded in achieving that in Muslim countries, so the Muslim is more deserving of reaching this goal than others.
Shaykh Ibn Baaz (may Allah have mercy on him) said:
With regard to cartoon images that appear on television, if they are in the form of a human being, then the ruling on looking at them is ambiguous: should they be regarded like real pictures or not? The view that is most likely to be correct is that they are not to be regarded like real pictures.
End quote from Majmoo‘ al-Fataawa (2/no. 333)
We hope that there will be nothing wrong with you playing this game, but that is on condition that this should not become a constant habit. Rather it should be like any other kind of game or leisure activity that is done from time to time. So try hard to do without it and fill your time with things that will benefit you, such as seeking beneficial knowledge and doing righteous deeds. If you can find a suitable place to do exercise by yourself, that will be more beneficial for you and better.
And Allah knows best.