Relative Content

Tag Archive for c#console-applicationgame-development

Is there a way for my C# Cosnole App to skip an input (ReadKey) by the user after a certain amount of time?

I’m working on a C# console game for a school project and I’m wondering if there is a way to basically just skip a Console.ReadKey() after some time?
I want to make a prescission minigame where you have to press the correct key in a small time frame after it pops up somewhere on the screen. If the key hit is correct, points will increase, but if the key press is incorrect or not pressed in the time frame, then the points will not be increased, and the next key would pop up. I know how to make the score counter, I just don’t know how I could maybe make the ReadKey return null or just literally skip it after a custom time frame if it hasn’t received input, for example for 800 miliseconds.