Thread: game controlls?
View Single Post
Old 05-12-2004, 03:23 AM   #5 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,161
Belisarius is on a distinguished road
Here's the problem you face; you can grab the input stream through System.in, but putting together the input can be tricky, as I'm not sure what bytes correspond to "left" and "right". If I were you, I'd put the whole program in a while loop and wrap System.in with BufferedInputStream. Every iteration, check to see if left or right has been pressed and do stuff accordingly.

I haven't tried this, but it's where I would start if I were doing the same project as you are.
__________________
GitS
Belisarius is offline   Reply With Quote