Quote:
Originally Posted by ryder911
Sorry If this is the wrong forum.. please move if it is
Ok, I am in a computer science class, In the beginning of the year we made a maze. We just got an assignment now, were we have to make a marble move the the maze. It is for extra credit. I want to do somethign different then that. I want to make the marble move by using the arrow keys. I have an idea on how to do it, but Im not sure what ACSII ( i think thats what it would be ) character code, represents a up / down, left / right arrow. Please any help withthis would be appreciated!
|
The easiest thing to do is write a program to capture the scan codes from the keyboard. Then set those to the default and reuse that code to make them user-definable from an options menu within the program (allowing people to rebind them to WASD if the want, etc).
I did a similar program in high school, tron/snake-style game in QBasic and that's what I did to handle the key bindings.