Refreshing command prompt screen

Hi there!

I have just made a game to play with the keyboard and using the command prompt (cmd). The thing is that you can move the character (it's an "O") and the environment of the game changes so I need to refresh the screen several times per second.

I make this by using the system("cls") command and the redraw everything again. I have also used the while(clock()<endwait){} function to seize the rate of refreshing.

My problem is that this method gives the screen a "flashy/blinking" effect because the command prompt has to delete everything from the previous screen and redraw everything.

Do you know any solution to avoid this? Another better method to redraw the screen several times?

edit: the faster the game goes, the more it blinks :S
Thanks in advance!
Last edited on
Topic archived. No new replies allowed.