keyboard input
I''d like to know a method of detecting if a player has a key held down (and which key), without having to download and use the directx api, for direct input. Is there a simpler way to do it in c++/openGL ?
The reason I ask is that currently to when the player presses and holds a key down to move a sprite, it moves once then pauses for a second before continuing to move. I beleive that this is a feature carried over from windows.....but its obviously not much good for my game...
cheers.
That''s weird, why don''t you have a look at nehe''s site and look at the blending tutorial (10 or 12 or something like that). It uses a cube and then accelerates while you press the up-key. Otherwise you can always use glut, that works.
Keyboard input has nothing to do with OpenGL whatsoever, as it''s just a graphics library.
There is loads of info about DirectInput in MSDN and on the web so that should be able to sort the problem out.
- Pete
There is loads of info about DirectInput in MSDN and on the web so that should be able to sort the problem out.
- Pete
u can disable key repeats in glut (if youre using glut that is)
sdl handles input (including joysticks) on various platforms
http://uk.geocities.com/sloppyturds/gotterdammerung.html
sdl handles input (including joysticks) on various platforms
http://uk.geocities.com/sloppyturds/gotterdammerung.html
whats the differnce between GetAsyncKeyState and GetKeyState? i have never heard of the async one. just wondering
Edited by - prod on February 22, 2002 5:59:22 PM
Edited by - prod on February 22, 2002 5:59:22 PM
If you want DirectX 8 SKD and dont want to download 150 Mb the go here:
http://therabbithole.redback.inficad.com/tricks/downloads/directx8.zip
(4042 Kb)
http://therabbithole.redback.inficad.com/tricks/downloads/directx8.zip
(4042 Kb)
Hi!
I read in Nehe Tuts that we can use keyboard in a few ways:
-Using the message received WM_KEY..
-Using DirectInput (he says that it''s the best in games)
I tried both, and i don''t know why using DirectInput is better..
Because both of them work very well.
If someone can tell me the difference
Bye!
I read in Nehe Tuts that we can use keyboard in a few ways:
-Using the message received WM_KEY..
-Using DirectInput (he says that it''s the best in games)
I tried both, and i don''t know why using DirectInput is better..
Because both of them work very well.
If someone can tell me the difference
Bye!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement