More keys hold down at once problem

I’ve been using SDL for some time now, and I like it alot. A few weeks back
I stared building a game. I’m using both SDL and OpenGL.

It’s a 2D spacefighter game, windows users can checkout the latest build
here: http://daid.mine.nu/pub/SpaceFight.rar

For linux users, I think it will compile in linux just fine, the source can
be found here: http://daid.mine.nu/pub/SpaceFight_Src.rar (done in VC6, so
you need to make a makefile yourself)

It looks and runs great, but I’m having problems with multiple players, when
there are 4 players pushing down keys all at once. If there are more then 3
to 5 keys down or something like that then the rest of the keypresses aren’t
recieved by the game. This is a real big hit on the playablity and I hoped
someone knows how to solve this. (easiest way to test this is holding down
UHJK keys and then try to play with the WASD keys)

It looks and runs great, but I’m having problems with multiple players,
when there are 4 players pushing down keys all at once. If there are
more then 3 to 5 keys down or something like that then the rest of the
keypresses aren’t recieved by the game. This is a real big hit on the
playablity and I hoped someone knows how to solve this. (easiest way to
test this is holding down UHJK keys and then try to play with the WASD
keys)

This isn’t an SDL bug, it’s a hardware issue; most keyboards don’t let
you hold down more than X keys at once without losing some of the input.

–ryan.

Hello,

Selon Sneakeye - <sneakeye_ at hotmail.com>:

It looks and runs great, but I’m having problems with multiple players, when
there are 4 players pushing down keys all at once. If there are more then 3
to 5 keys down or something like that then the rest of the keypresses aren’t
recieved by the game. This is a real big hit on the playablity and I hoped

PC keyboards are not able to handle so much keys pressed at once.

There was a thread on this subjet last month. Search for “Max number of
simultaneous keypresses” on
http://www.devolution.com/pipermail/sdl/2005-February/thread.html .

Regards,

Xavier

OSneakeye - <sneakeye_ hotmail.com> writes:

I’ve been using SDL for some time now, and I like it alot. A few weeks back
I stared building a game. I’m using both SDL and OpenGL.

It’s a 2D spacefighter game, windows users can checkout the latest build
here: http://daid.mine.nu/pub/SpaceFight.rar

nice litle game you are forging!

Keyjamming, as it is called, is plaguing multiplayer-on-single-computer games
since ever. The best way to deal with it is to let players choose their own
keys(*): keyjamming depends on which key are used and that varies from keyboard
to keyboard. I for one, cannont play your game even in single palyer mode
because my spacebar (fire) jams with my left arrow (left). This is not uncommon.
Maybe this is why most games don’t use space for fire, but rather right-Ctrl or
something. Control, alt, shift keys tend to be more keyjammig-free, probly
because they are supposed to be pressed in combination (unlike space, letters,
etc). Beside, space bar is so clusmy to press!

As mentioned, this is not an SDL issue and I understand I’m going off topic in
this board.

But, nice game. Funny how I happen to be everybody favourite target! what did I
do to them all? :wink:

(*) Star Control II, a classic game that may-be inspired your game, and was an
absoultely great 2players-1computer rotate-thruster-fire space-fighting game
just like your is, even had a special stand-alone anti-key-jammer, an utility
that let you manually search for good keyjam-free key setting. Things did not
change much since then, only now networg gaming are more common and multiple
keypress usually spread across multiple keyboards.

Hope this helps!