I want to make a full fledged 2d shooter. But I'm confused on where to start, I mean I have the basics of windows making down, and I've done some directX successfully.
I was thinking of using DirectInput for keyboard and mouse events. So can anyone help me with this?
Actually, Im going with Direct3D
The DirectX SDK says that DirectInput is deprecated and that Raw Input should be used instead (Raw Input is in the Windows SDK). From Windows 2000 to Vista DirectInput does nothing else than wrapping Raw Input and adding overhead.
Have a look at this: http://msdn.microsoft.com/en-us/libr...36(VS.85).aspx
Unfortunately raw input does not fit well with some engine designs. I suppose you could wait on Windows to give you a message and then pump it through but that would seem to me to be slower than just calling Update() on DirectInput. I really don't want to wait for a Windows message to get to my application. I would much rather tell DirectInput when to update inside of my own loop. It really doesn't alter the design of the message loop much to use raw input but it seems to me to be a giant step in the wrong direction.
The end solution is XAct XInput which I'm not sure is available for C++ just yet.
Removing DirectInput and DirectSound from Vista is one of the biggest mistakes ever made which hopefully will be corrected.
On a side note: Moved to game programming.
But what about Direct3D? I mean it looks really good, but can it handle stuff like DirectInput, as in Mouse events, Keyboard, and stuff. And I know in windows, you can just use getasynckeystate for keyboard, and mouse, ;P but I'd like to use D3D if I can.
Well bobbelPop, you can use whatever API you wish to draw to the screen, but your problem sounded more like an issue of problems gaining accurate user input. That has nothing to do with D3D. I know we all love one solution that fits all, but I always start with the basic window messages and see if I am receiving input fast enough, then work my way down from there. Depending on the complexity of your game, you may not need to delve too deep into things such as raw input (though its screwy--yet it is from M$... so what does anyone expect).
Originally Posted by master5001
The problem I'm having at the moment is dealing with repeat strokes (from when you hold down the key).