BBC BASIC for Windows
« inkey »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:11pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: inkey  (Read 479 times)
leslie griffin
Guest
xx inkey
« Thread started 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
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: inkey
« Reply #1 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.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls