EnableDirectInput ?

Blitz3D Forums/Blitz3D Beginners Area/EnableDirectInput ?

keyboard(Posted 2003) [#1]
My game uses the arrow keys to direct the player.

so if KeyDown(LeftArrow) and KeyDown(UpArrow) are detected at the same time, the player sprite will move at a diagonal.

One friend reports that the horizontal and vertical sprite movement is fine, but the diagonal movement is sporadic, and I suspect it is something to do with his keyboard, as I could find no way of reproducing the glitch. I searched the forum for keyboard related issues and found a thread about "EnableDirectInput", but have been unable to find any documentation in BB2D, so I'm not sure if it is relevant to this problem. Can anyone tell me more about this command?

thanks in advance...


JaviCervera(Posted 2003) [#2]
Until version 1.79 of Blitz, it was using DirectInput for keyboard handling. Mark changed that to use the Windows API to manage the keyboard, and the EnableDirectInput commands sets Blitz to use DirectInput again, just like pre-1.79 versions.


keyboard(Posted 2003) [#3]
Mark changed that to use the Windows API to manage the keyboard, and the EnableDirectInput commands sets Blitz to use DirectInput again

Can I assume that it was changed to make it better, and that if DirectInput was enabled, I might create more problems than I solved? I mean, the fact that it is not in the help files seems to indicate that is not for novices to play around with?


Rottbott(Posted 2003) [#4]
Try it and see what happens.


keyboard(Posted 2003) [#5]
@Rottbott:

yeah, ok :)


SSS(Posted 2003) [#6]
something that i have learnt is that most things that you can do in programming will NOT break your computer, there are a few exeptions to this, but none apply to blitz


FlameDuck(Posted 2003) [#7]
It's probably a keyboard related issue, and usually when default behaviour is changed it's to the better.

Anyway, try finding out which keyboard he has. I have a Logitech, and it works like a charm!


keyboard(Posted 2003) [#8]
I have asked what sort of keyboard he has, I am picturing him picking it up and peering helplessly at the writing, meanwhile a giant box on top of the cupboard says "MicroSoft Internet Keyboard". :)

thanks for the tips