Jump to content
  • Advertisement
Sign in to follow this  
EGD Eric

[java] my 2 player java game

This topic is 4378 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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++ :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Really nice game, hope i can make something like that soon

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!