Sounds like the games are drawing more power than the charger can give out to run the device and charge the battery. Not shocking. Happens a lot. Short of replacing the charger, which may not even make the problem go away if your device normally is this way (and some are) then you would just have to let it charge only when you aren't playing a game.
Any device can do this. Think of even a cellphone. If you are on it doing things and have it plugged in to charge, it will take ten times longer to charge, if it will at all, until you stop using it. I can't count the number of times I have been just talking to someone and poof they are gone. They were on the charger, trying to charge the phone while making a call, and it couldn't charge as...