Skip to main content
gamedev.net
🔒 Locked

[java] my 2 player java game

Started by EGD Eric 10 replies 3.1k views
Original Post
EGD Eric
EGD Eric
You need a buddy to try it. Its right here Both players play with opposite sides of the keyboard. If you've got a buddy to play with, you'll probably notice a bug where the controls kind of lock up, one ship might start rotating non-stop. The reason is because the input system can only handle so many keypresses at once. Does anyone have any suggestions as to how I could make it so that the game could handle more keypresses? DirectInput for Java (if that exists)was my guess, but what would Mac users use?
Metorical
Metorical
Pretty neat, the whole keypress thing is a hardware thing - you can solve using USB only keyboard I think (no ps-2 connector plugged in) or at least that's how I've done it in the past for things like MAME. Rate++ :)
EGD Eric
EGD Eric
you can solve using USB only keyboard I think
so there's nothing I can do on my end other than require the user have a USB only keyboard? I want to be able to show this to potential employers, and I know they won't be impressed if they see a bug.
EGD Eric
EGD Eric
I think I'll go for the redesign. Maybe that little 'boost' ability can be done by just double-tapping forward.
The network idea is interesting though. I've never done that before.
Styflin
Styflin
I am after the same information that EGD Eric was. I don't believe that it's a hardware issue because I am making a JAVA version of one of my C++ games. In the C++ version, I used on many differant computers and keyboards, none of which were USB, the keyboard worked perfectly. It may be that JAVA is not as good at keyboard detection as C++, but it's not a hardware issue.

Anyway I'm using a USB keyboard and I still get the same problems with Erics game.

Does anyone know how to do key detection in JAVA so that it will pick up 6+ keys at a time?
EGD Eric
EGD Eric
I remember reading this in a DirectX book: Something about DirectInput being the solution to LOTS of keypresses. I dunno if they have DirectInput for Java, and even then, it'd only be usefull to windows users.
Swattkidd
Swattkidd
Can you post the Code you used to network the game?
EGD Eric
EGD Eric
its not networked (I wish!) Its just two players on the same keyboard.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.