Archived

This topic is now archived and is closed to further replies.

sumcorp

Trouble with DirectInput

Recommended Posts

I write a 4 player bomberman-like game, and all key control we''re crazy when we try to play with more than 2 players (very boring). I use DirectInput6 and GetDeviceState(256, (LPVOID)array256byte); for read the keyboard... Please Help me !!!! Thank you.

Share this post


Link to post
Share on other sites
Than you boss,

To dodge this problem, Can I use an other DirectInput function,
??? Like GetDeviceData, or do I must change the configuration of my
keys...

Thank you for the reply...

Share this post


Link to post
Share on other sites
Unfortunately most keyboards only support a few keys pressed at the same time as BASSOFeeSH wrote. This has nothing to do with DirectInput, the keyboards simply don''t report any more keypresses to the computer.

You can try to find combinations that will work by testing them in the DirectInput samples that come with the SDK, but the safest way to go is to allow the users to use different devices, for example one uses the keyboard while another uses a gamepad or joystick. (Or you can use networking)

Share this post


Link to post
Share on other sites
Thank you SpellBound,

I think that my "Bomberman-like" project is in hot-water !!
But why games like "Micro-Machines 2" run well with four players ??? It''s dark side of DOS programming ??? The networking solution is a good choice, but I search good network library that use (and hide!) DirectPlay... Or a good book on DirectPlay.

Do you have some advice ???
Thanks.

Share this post


Link to post
Share on other sites
For a bomberman like game you should be able to use the code from the DirectPlay samples, you don''t need the state of the art networking code that other games like Quake, Everquest etc needs. Other than that I cannot help you, I haven''t begun experimenting with my networking yet.

Share this post


Link to post
Share on other sites