This is Dr. COM WIZ. I'm in the middle of game development at this time. I have this one well planned (and am still planning), so hopefully I'll finish it this time.
I ran into a problem with control, though. I tested my scrolling engine to see how it works under with delaying. Guess what? It failed. I pasted a delay in the middle of the engine and was digusted with the way it looped even when you stop pressing the button. That was the only problem: It looped even when you stop pressing the deirectional button. That happens if the button is held for a second or two.
So, I visited my library of QBasic tutorials (in my computer, which containe MBs upon MBs of tutorials, 22.1 to be more exact) and went to searching. I wanted to know how to clear the keyboard buffer so that it doesn't repaet without will. Sure enough, there it was, Buff's QBasic Tips that I downloaded months ago. On it "How to clear the Keyboard buffer," which was EXACTLY what I was looking for.
It gave me a line of code to use and I stuck it in the middle of my engine. The only problem is that I have to put a delay right after it so that the engine will allow the user to regain control over the keyboard again. Just a short delay, not too long.
However, looking at games today (and yesterday), the user has better control over the keyboard or control pad in the way that they don't have to wait a whole half second for the button to repeat in order for the game character to go forward. Like in the original Super Mario Bros.(tm), once the forward button is presses, Maro immediately goes and keeps going until the user releases the button. I rarely see a QBasic game that did that without having to wat until the computer processes a repeat.
On the contrary, there are some exceptional games that have this Mario control trait. They are rare, but they are there (hey that ryhmed). So, if any of you programmers out there know how to delete the delay before key repetition, please let us know. Let the world know so that we all can create better games with better control!
Also, if anyone knows a faster way to clear the keyboard buffer than the way below, please let us know that, too.
DEF SEG = 0: POKE &H41A, PEEK(&H41C)
FOR delay! = 1 TO 4000 'The delay it takes to
NEXT 'regain control over the
'Change the delay according to your computer's charecteristics.
If any of you want to see the unfinished engine that I was talking about, find it here: http://www.programmersheaven.com/msgboard/read.asp?Board=15&MsgID=100456&Setting=A9999F0001
It would be best to read the messages around and in the coding. It will help you to understand why the engine is the way it is, what is going to become of it, and what you can do about it.
To get that page of very useful QBasic tips I was talking about, go here, which contains over 50 tips in four levels from beginner to advanced.
(Buff's Tip Page)
As surprised as I was, there was a tip in the Beginner's level that I didn't even know! There was, as well, a few Advanced tips (just a few, like, 3 or so) didn't even understand. Check it out and tell you friends.
This has been,
Dr. COM WIZ
PS Thank you and goodnight!