kant think of a title at this time

Mar 1, 2011 at 11:03pm
ok i want to know if there is a way in a program to do what some games do and say like hit space (or another key) fast and if you dont hit it fast enough then something happens. if there isnt thats fine. it would just be usefull in my program. :)

THANX IN ADVANCE
Mar 1, 2011 at 11:07pm
So, some sort of system where you have a timer running and something reading keypresses?
Mar 1, 2011 at 11:10pm
yup pretty much :)
Mar 1, 2011 at 11:16pm
Reading keypresses and such is platform-specific, so I would recommend looking into SFML for this, if only because it can help you expand into more complex things later and is multi-platform.
http://www.sfml-dev.org/
In this case, you could probably simply start a timer, wait for the space bar, and when you get it, see how long it took an act accordingly.
Mar 1, 2011 at 11:27pm
ya but i have no idea how to run or install or use sfml
Mar 1, 2011 at 11:27pm
They have tutorials on their site on how to install it and use it.
Mar 1, 2011 at 11:28pm
If you have specific problems with the process, you can post here again and we'll see if we can clarify it for you.
Mar 1, 2011 at 11:44pm
its ok. i dont think that you can use it with dev c++ anyway
Mar 2, 2011 at 12:03am
Wait, you're using Dev-C++? If you are, please switch to something still supported, like Code::Blocks.

-Albatross
Topic archived. No new replies allowed.