It's normal for phone to heat up during fast charging, but while playing games it should warm a bit, not heat up. Provided with proper ventilation it should be working cool. Do you use cover while playing games or charging? If so, try removing your back cover while charging and playing heavy games.
Which game you play? I play PUBG at smooth and high fps settings, it'll never reach 42°C max 40°C playing like 2hrs, i didn't notice any overheating issues from day of purchase. I also play Asphalt 8 it even runs cool like 39°C after 1hr of gameplay
I play wold cricket 2 and 8 ball pool. just for like 45-50 min and it heats up like hell. before writing this comment I was playing world cricket for 40 min and it was 48 degrees. Not just that but the battery also drains out rapidly.