samsung phone gets hot I have a Samsung s4 which easily gets hot even when doing light things and being on power saver mode, low brightness etc I've also tried factory reset

I'm on stock android 4.4 

I've installed a temp app and initially the temperature is 26 Celsius and about 29 when browsing internet and about 35 when playing a game it gets hot on top of phone near earpiece

is this normal?
May be this can work for you. Reformat your micro SD card. Some users have reported that media server can cause the phone to overheat. Save a copy of your files in your microSD card to your computer then reformat if.

Go to Menu Select Settings 
 Tap More Select Storage Touch Format SD
 card Review the message and touch Format SD card Tap Delete all
 Remove then reinsert the microSD card afterwards.

If the problem continues, this means that you have a phone defect causing it.For more details you can refer Samsung India site.