[java] my 2 player java game

Started by
10 comments, last by EGD Eric 17 years, 6 months ago
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?
Advertisement
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++ :)
"Sorry, this GeoCities site is currently unavailable."... :(
it's working now...it's pretty nice, I like how the ships have acceleration
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.
its not really a bug,
there are only 4 solutions:
1. redesign the game to work with fewer keypresses,
2. use an alternative form of input, such as gamepad, mouse, etc.
3. force the users to use a usb keyboard that can support more simultanious keypresses.
4. only do multiplayer by network.
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.
Really nice game, hope i can make something like that soon
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?
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.

This topic is closed to new replies.

Advertisement