So I want to make a graphic game in console. I display graphics simply std::cout
ing array of colored empty string
like this:
while (1 == 1) {
for (int i = 0; i < height * width; i++) {
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), pixels[i]);
cout << pixel;
}
system("CLS");
}
array 'pixels' stores colors of each pixel, and string pixel = " ";
The thing is fps is really low, and You can see pixels 'blinking' and process of drawing is also so slow that you can see how each pixel is drown into the screen. Is there a way to increasy fps, or a better way to draw pixels?