BBC BASIC for Windows
Programming >> BBC BASIC language >> inkey
http://bb4w.conforums.com/index.cgi?board=language&action=display&num=1262043535

inkey
Post by leslie griffin on Dec 28th, 2009, 10:38pm

hi..still a newbie..
if I was controlling a paddle in a breakout type of game and using inkey$(0) to read the keyboard......it does slow the whole programm down to a fraction of what is possible .
is there a better way of getting a directional input...thx
Re: inkey
Post by admin on Dec 29th, 2009, 09:11am

Quote:
using inkey$(0) to read the keyboard......it does slow the whole programm down to a fraction of what is possible.

INKEY$0 isn't all that slow, I measured it on my PC at just under 400 ns (so you could execute more than 2,500,000 of them in a second!).

If something is slowing "the whole program down to a fraction of what is possible" I don't see how it can be INKEY$(0)! Perhaps you should list the code in question.

Richard.