Computer shutting down/going to sleep mode while gaming?

So, I should say everything.
My PC before, well, was a really good 'gaming' PC. It ran Minecraft, AC, Devil May Cry 4, Boderlands, etc, pretty smooth. Then I tried Far Cry 3… It ran… Bad, so I tweaked a lot of things (i don't remember) And it ran, smooth on low. After I got tired of it, I didn't play for a while. Then I tried going back to Minecraft, and first thing was that, it ran Really BAD. Everything on low, giving 3gb of memory to it, it still runs bad. And after a few minutes-hours(Minimum 2) it shuts off/goes to idle, and it doesn't turn back on, my monitor just stays black.
So now, I can't even play minecraft for 3 minutes without it shutting off and stuff, it's annoying.
That's the problem basically. Please I need help, I mean, it doesn't even run minecraft! MINECRAFT!

"so I tweaked a lot of things (i don't remember)" - then set everything back to default settings again.
Try a system restore to a time when it did run the way you wanted.

Hmm. It almost sounds like over-heating… Unplug your computer and open the case, and clean out any dust and debris. Be sure to clean out the power supply as well. Used canned air to remove the dust. You can use a vacuum as well but don't let it touch any components and restrict the air flow.

Make a list of your individual components and go to the websites of the mfgs and download the latest version of all the drivers, and software updates, and the latest version of the BIOS.

I urge you as well to use a boot-able AV to scan for malware. Doing this from a boot-able device instead of your hard drive prevents any malware from loading which is in your Windows installation. Just make the disk on a different (clean) computer. Here are 4, but most AV companies have one and many of them for free. They usually are called a "Rescue Disk."

http://support.kaspersky.com/us/viruses/rescuedisk/
http://www.bitdefender.com/support/how-to-create-a-bitdefender-rescue-cd-627.html
https://www.zonealarm.com/forums/showthread.php/72117-boot-disc-zone-alarm-scan
http://www.lavasoft.com/mylavasoft/support/supportcenter/how-to-create-a-rescue-cd

Another reason why pc gaming becomes bs…
all pc's have to be tuned for certain games.
My alienware pc fu**** up on me while playing MOH, and I sold it the next day to gamestop, just get a system. Or keep buying graphic cards every 3-8 months just to catch up with updates ugh…

I hate pc gaming, so costy on wallet, please just get a 360, xbox1, ps3, ps4, or Wii U.