[SDL] Max number of simultaneous keypresses
Patrice Mandin
mandin.patrice at wanadoo.fr
Thu Feb 24 13:26:09 PST 2005
Le Thu, 24 Feb 2005 22:14:48 +0100
blurgk <blurgk at gmail.com> a écrit:
> I have often encountered a problem in various games : when about 3
> keyboard keys are keeped pressed, it is impossible to press more keys
> (the presses are ignored). I was wondering where this problem come
> from (hardware limitation ?), and if there could be a means to work
> around it with SDL. It can be used to cheat in games in which several
> people play on the same keyboard (frozen-bubble, jumpnbump... ;) and
> I'd like to prevent that.
It is mainly a hardware problem. Keyboards are wired like a big array,
and pressing a key gives a row and a column (approximately). So if you
press more than 2-3 keys, you have many more connections done, and the
hardware don't send all the keys pressed.
Solution: Use a joystick! This is what they are for. And SDL support
both analog and digital joysticks. Only force feedback (and maybe rumble
?) is missing.
--
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux
More information about the SDL
mailing list