i am an expieranced flash coder. and i have also seen some rpgs made in MSVC++ that the user presses an arror key to chance the x/y position of sosomething, is this possible in like a console based program?
Printable View
i am an expieranced flash coder. and i have also seen some rpgs made in MSVC++ that the user presses an arror key to chance the x/y position of sosomething, is this possible in like a console based program?
yes, this is where a loop with kbhit() comes into play,
int keypress;
while(1){
if(kbhit){
keypress = getch();
switch(keypress){
case //ect.
}
//rest of game code for enemies and stuff
}
I'm attaching a header file that defines all the keys for you: