This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Are there any decent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Are there any decent "live" keyboard input classes out there?" Watch "Are there any decent "live" keyboard input classes out there?" New topic
Author

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

Robel Bayisa
Greenhorn

Joined: Dec 16, 2012
Posts: 6
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

Joined: May 03, 2008
Posts: 4571
    
    5

Will your game have a GUI or is it console based?


luck, db
There are no new questions, but there may be new answers.
Robel Bayisa
Greenhorn

Joined: Dec 16, 2012
Posts: 6
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

Joined: May 03, 2008
Posts: 4571
    
    5

For a Swing GUI, the recommended way is to use Key Bindings.
 
GeeCON Prague 2014
 
subject: Are there any decent "live" keyboard input classes out there?