mouse input

Started by
25 comments, last by 21st Century Moose 11 years, 5 months ago
i want to use mouse input for my pong game, should I use direct input?
Advertisement
Use SFML! It's great and you can use it for commercial use if you want to! It also includes sounds and I forget if it includes anything else. It is also free. I also found a pong tutorial with SFML!

Website: http://www.sfml-dev.org/
Licensing: http://www.sfml-dev.org/license.php
Pong Tutorial: http://www.gamefromscratch.com/page/Game-From-Scratch-CPP-Edition.aspx
I am using dx9

I am using dx9

Yes, however normally people who use DirectX or OpenGL use SFML, Allegro, or SDL for input because it's easier. It's really your choice however. I'd recommend either using Allegro or SDL, because with SFML you have to do a lot of extra stuff to capture input with it. You can either use Direct Input or an Input Library, with the latter being easier. If you're main goal is to learn all about DirectX however, you can use Direct Input.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

I am doing my best to learn dx9
Well if you want to learn DirectX strictly then using Direct Input would be your best bet. Later on if it gets too difficult you can progress to an Input Library, but you seem smart enough to be able to handle Direct Input :)!

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

thanks, I am doing all I can to learn dx9, is there any tutorials I can use to help me understand how to incorporate the mouse in my pong game.I am going to use direct input.
I am getitng the following error.
1> c:\program files\microsoft directx sdk (june 2010)\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800
do I need to include an older sdk for dx.
This is a great tutorial. It talks about how to get all types of input and how to apply them to game development.
About the error, you need:

#define DIRECTINPUT_VERSION 0x0900

When it says it's defaulting to 0x0800, it means it's defaulting to DirectX 8 input (Notice the 800 instead of 900).
if the above code doesn't work, then just use this:

#define DIRECTINPUT_VERSION 0x0800

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

I have an error using dx8 and dx9.
c:\program files\microsoft sdks\windows\v7.0a\include\objidl.h(11280): error C2061: syntax error : identifier '__RPC__out_xcount_part'
1>c:\program files\microsoft sdks\windows\v7.0a\include\objidl.h(11281): error C2059: syntax error : ')'
1>c:\program files\microsoft sdks\windows\v7.0a\include\objidl.h(11281): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>
I am really lost on this one.

This topic is closed to new replies.

Advertisement