I'm making a game in c# in the console, and I want to make frames, I am trying to alternate between Console.ReadKey()
and Thread.Sleep(100)
, to make at least 5 frames per second, 100 millisecs for thread.Sleep
and another 100 millisecs as a window for the user to press a key like WASD for movements, I want to achieve the frame updates even if the player don't make any input
So, if there's a way to wait only 100 millisecs for the input and the cut the opportunity and continue with the program, it would be awesome if you let me know
I tried to make a game but it the frame only refreshes if the player press a key, so if you don't touch the keyboard, the game will stand still, nothing can move because the program is waiting for a user input and that's not what I want.