Praise be to Allah.
With regard to Google ads on the games, most of these games – as seems to be the case from their ads on many websites – contains some seriously objectionable factors and many things that are contrary to Islamic teachings, and that have a negative educational impact on Muslim children. Therefore it is not permissible to host ads for such games without first checking them, unless one verifies the nature of each game and its contents, and makes sure that there is nothing in it that is contrary to Islamic teachings.
It is narrated in sound reports that music is forbidden and prohibited.
The Prophet (blessings and peace of Allah be upon him) said: “There will surely be among my ummah people who regard as permissible zina, silk, alcohol and musical instruments. There will be some people who will halt near the side of a mountain, and in the evening their shepherd will bring their sheep to them. He – meaning the poor man – will come to them and ask for something that he needs, and they will say: Come back to us tomorrow. Then Allah will destroy them and cause the mountain to fall on them, and He will transform others into monkeys and pigs, and they will remain like that until the Day of Resurrection. Narrated by al-Bukhaari (5590).
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: This hadith indicates that musical instruments are prohibited. That includes all types of instruments. End quote from Majmoo‘ al-Fataawa (11/535).
For more information, please see question no. 5000.
Based on that, it is not permissible to use music as an audio background, especially since there is no need for it and it is not necessary, and it is possible to do without it by using appropriate and permissible kinds of audio backgrounds.
It should be noted that your work could lead to a great deal of goodness for you and for Muslim children, and that the opposite could also be the case.
It was narrated that Jareer ibn ‘Abdillah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever sets a good precedent in Islam, which people act upon after he is gone, there will be written for him a reward like that of those who do it after him, without that detracting from their reward in the slightest. And whoever sets a bad precedent in Islam, which people act upon after he is gone, there will be recorded for him a burden like that of those who do it after him, without that detracting from their burden in the slightest”. Narrated by Muslim (1017).
It was narrated from Abu Hurayrah that the Messenger of Allah (blessings and peace of Allah be upon him) said: “Whoever calls others to guidance will have a reward like that of those who follow it, without that detracting from their reward in the slightest. And whoever calls others to misguidance will have a burden of sin like that of those who follow it, without it detracting from their burden in the slightest.” Narrated by Muslim (2674).
Imam an-Nawawi (may Allah have mercy on him) said:
These two hadiths clearly indicate that it is encouraged to set good precedents and it is prohibited to set bad precedents. Whoever sets a good precedent will have a reward like that of each person who acts upon it until the Day of Resurrection, and whoever sets a bad precedent will have a burden of sin like that of each person who follows it until the Day of Resurrection. Whoever calls people to guidance will have a reward like that of those who follow it, and whoever calls to misguidance will have a burden of sin like that of those who follow it, whether he is the one who started that guidance on misguidance, or someone else started it before him, and whether that is teaching knowledge, or an act of worship, or teaching etiquette, or anything else.
End quote from Sharh Saheeh Muslim (16/226-227).
What you and those who are with you, who are in charge of your website, and the like, must do is try hard to make sure that your work comes under the heading of setting good precedents, of which the reward and a reward like that of those who follow it will reach you. That can be attained by making these games that you want to produce useful and educational games, that will teach Muslim children what is in harmony with their religion, etiquette and morals, free of anything that is contrary to Islamic teachings, whilst always having a sound intention when doing all of that.
We ask Allah, may He be exalted, to enable you to do that in which there is goodness.
And Allah knows best.