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
Lordofsizz
Newbie
Posts: 1
Joined: Mon Apr 30, 2018 4:41 am

Input Timing

Post by Lordofsizz »

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
burger2227
Veteran
Posts: 2466
Joined: Mon Aug 21, 2006 12:40 am
Location: Pittsburgh, PA

Re: Input Timing

Post by burger2227 »

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 : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
Post Reply