Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Input nowadays

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
6 replies to this topic

#1 gnomgrol   Members   

699
Like
0Likes
Like

Posted 17 September 2012 - 05:16 AM

Hey,
I am wondering what is the best way to get the input for a directx-game. There is directinput, but MS told us to use the windowsmessages as far as I know. Is there any other way to do it, and how do you do it in your own games/stuff?

Ty

#2 mrheisenberg   Members   

360
Like
0Likes
Like

Posted 17 September 2012 - 05:20 AM

Microsoft says we should use RawInput,but I found it to be really troublesome + DirectInput has everything you would ever need and it doesn't seem to cause any noticeable increase in my CPU usage,so I'm sticking to DirectInput :D

#3 Gavin Williams   Members   

974
Like
0Likes
Like

Posted 17 September 2012 - 05:26 AM

I use raw input now. So I register the mouse for instance and subscribe to the MouseInput event and also use windows to get the client position of the mouse.

edit. DirectInput gave me serious problems in fullscreen, i had a thread about the issue on these forums. And since it's not supported anymore and not recommended i ditched it for raw input.

Edited by Gavin Williams, 17 September 2012 - 05:33 AM.


#4 Ashaman73   Members   

13714
Like
0Likes
Like

Posted 17 September 2012 - 05:29 AM

An other vote for raw :-)

Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#5 d k h   Members   

439
Like
0Likes
Like

Posted 17 September 2012 - 05:45 AM

I use SDL with Direct3D 9 (or OpenGL if necessary). It creates my window and handles my input, so I don't have to mess with ugly, scary windows code as much! :) Been using this for, I believe, five years now and it's always been a good choice in my book, I'm fairly confident this is one good way of doing it.

#6 mrheisenberg   Members   

360
Like
0Likes
Like

Posted 17 September 2012 - 07:09 AM

I use raw input now. So I register the mouse for instance and subscribe to the MouseInput event and also use windows to get the client position of the mouse.

edit. DirectInput gave me serious problems in fullscreen, i had a thread about the issue on these forums. And since it's not supported anymore and not recommended i ditched it for raw input.


by not supported do you mean that they just don't update it or do you mean that it actualy doesn't run on windows8?

#7 Tom KQT   Members   

1704
Like
2Likes
Like

Posted 17 September 2012 - 07:40 AM

Keyboard & mouse - Windows messages.
Xbox360 compatible gamepads - XInput.
All joysticks, gamepads, wheels etc - DirectInput.

That's how I'm typically doing it and if I'm not wrong, that's also the Microsoft's recommendatio (DirectInput only if XInput cannot be used).

Edited by Tom KQT, 17 September 2012 - 07:44 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.