Well, you say that it keeps on heating when you're not in a room with a/c so it sounds like maybe it is overheating & shutting down to prevent damage. Do you have your screen brightness set to full brightness or is it set to automatic brightness?
Settings > My device tab > Display > Brightness
Keeping it set to automatic brightness will adjust the brightness according to the brightness of your surroundings and rarely go to fully bright unless you are outside in tons of sunlight. If you have the display set to full brightness all the time then yes, your phone will get very hot with prolonged screen on time.