Input Timing

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Post Reply
Posts: 1
Joined: Mon Apr 30, 2018 4:41 am

Input Timing

Post by Lordofsizz » Mon Apr 30, 2018 4:53 am

Hey guys,

Just wondering how I would go about programming something where the timing of the input mattered.

For example if I were making a baseball game and how far you hit the ball depends on how well timed your input is.

Or if I were making a reflex game where the quicker you pressed the key displayed on the screen results in a better score.

Thanks in advance!

User avatar
Posts: 2416
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Input Timing

Post by burger2227 » Tue May 01, 2018 1:49 am

The TIMER function marks events as 86400 individual seconds with midnight as 0.

Input must be in an INKEY keypress LOOP. INPUT requires the enter key to continue.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX :
Get my Q-Basics demonstrator: ...

Post Reply