Monitor blackouts in middle of the gaming

Hekus

Reputable
Nov 11, 2014
1
0
4,510
PC Specs

OS: Windows 8.1 pro 64-bit
Motherboard: ASRock z77 performance
CPU: i5 3570K 3.4 - 3.8 Ghz
GPU: Asus GTX 770 DirectCU II 4gb
RAM: G.skill 4gb dual channel DDR3
SSD: Samsung 840 120Gb
HDD: 2Tb Western digital
PSU: Corsair 600W

So here's the problem. I bought the GTX 770 week ago and now when im playing games with my friends after like 5 to 10 minutes my both computer monitors suddenly black out but my computer stays on. I can hear the sounds of the game and my friends but my monitors are black and i can't do anything.
I have installed all the latest drivers for the GPU and tried to install windows 8.1 again but nothing works.

Sometimes when I exit battlefield 4 colors like red, green, blue and gray flashes for 5 seconds and after that both monitors say no singal

Also this only happens when i'm playing. My computer works fine when i'm not playing any games.