Trouble with DirectInput

Started by
4 comments, last by sumcorp 24 years ago
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.
OOO O O O O OOO OOO OO OOO O O OO OO O O O O 0 0 0OOO O O O O O O O O OO OO O O O O O OOOO O O O
Advertisement
Not sure, but there are usually key combinations which cannot be used together. I don''t know if they differ from keyboard to keyboard or what, but an example would be: you can''t press , , and at the same time. If you do, will not be recognized as being pressed. Again, this was JUST and example that I made up, but similar things have been known to happen....at least I think....


"Why am I the only one on the away team with a red shirt!?"

BASSOFeeSH
><>
-- What would Sweetness do?
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...
OOO O O O O OOO OOO OO OOO O O OO OO O O O O 0 0 0OOO O O O O O O O O OO OO O O O O O OOOO O O O
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)

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.
OOO O O O O OOO OOO OO OOO O O OO OO O O O O 0 0 0OOO O O O O O O O O OO OO O O O O O OOOO O O O
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.

This topic is closed to new replies.

Advertisement