• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are there any decent "live" keyboard input classes out there?

 
Robel Bayisa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey everyone,

So for our final exams in my school's computer/digital science class, we've been tasked with creating something ambitious and interesting using only Java and our Eclipse tool.

My partner and I thus decided to design a simple 2D game, and for it to be actually playable, we wanted our program to be able to pick up "live" keyboard inputs (using the WASD keys to move in-game -- or the up, down, left, right keys).

Of course there's the typical java.util.scanner which we could use but we were thinking that it would be really hectic to use for the game, considering that we're planning on putting menus and all that interface stuff inside our program.

Are there any "live" keyboard input classes out there that anyone knows about, that we could use? Also, any advice on game-making with java would be deeply appreciated!
Thanks in advance for your reply!
 
Darryl Burke
Bartender
Posts: 5131
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will your game have a GUI or is it console based?
 
Robel Bayisa
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:Will your game have a GUI or is it console based?


We actually are still discussing on that, but it will most probably have it's own little GUI... but it will be very minimalistic (just a menu to play or to quit... and then game stats during each round)

And I forgot to mention this but we're trying to create a similar but original version of Space Invaders
 
Darryl Burke
Bartender
Posts: 5131
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a Swing GUI, the recommended way is to use Key Bindings.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic