iPhone 3GS suddenly shuts down while playing games I just purchased used iPhone 3GS from a fella, and the phone is running everything perfectly except for games. Whenever I play any game after some minute it suddenly shut down, even battery is fully charge.

It is an iPhone 3GS, 32GB, SU, old BR, 5.1.

What possibly is the cause of this issue?
Usually when an iOS device suddenly powers off, it's a voltage drop in the battery due to a hardware problem. If the device draws more current than the battery can provide, it will shut off.

Are you able to take it in for service to have the device checked out? You could chase a software restore, but those usually leave a log file or the device reboots on its own. Also, over temp could cause the issue, but the device logs that and shows an over temp error on the display rather than just blacking out most of the times heat is a cause.