Thank you for using Apple Support Communities!
I understand from your post that your iPhone heats up when playing a game. Some activities can cause your iPhone to get warm like game playing and charging. The following article has information about keeping your iPhone within acceptable temperatures you may find helpful:
Keeping iPhone, iPad, and iPod touch within acceptable operating temperatures - Apple Support
Best Regards.