Hi Richard,
In my opinion it isn't hard to include joysticks. It is more a matter of 
finding out the procedures and methods that DirectX DirectInput offers 
in dinput8.lib.
Most of them are as simple as GetJoystickState and GetButtons. Once you 
have captured the state you check to see where the stick is and which 
buttons are down. here is a simple C++ example. You will need speak all 
punctuation on to read this, but this should be easy to understand.

                // Capture the state of
                // the player's joystick.
g_jsState = g_joystick->CurrentJoystickState;

                // Check buttons.
byte[] buttons = g_jsState->GetButtons();

// Check button 1.
// Note, since this is a byte array the numbers
// actually begin with 0 and not 1.
                if(0 != buttons[0])
                {
                PlayerFire();   
                }

// Check the state of button 2.
                if(0 != buttons[1])
                {
SpeakPlayerHealth();                   
                }

                // Player left right motion.
                if(g_jsState->X == -5000)
                {
                    PlayerLeft();
                }
                if(g_jsState->X == 5000)
                {
                    PlayerRight();
                }

// Player forward and backward
                // motion.
                if(g_jsState->Y == 5000)
                {
                    PlayerStepBackward();
                }
                if(g_jsState->Y == -5000)
                {
                    PlayerStepForward();
                }


So you see it isn't as bad as it sounds. Just knowing what  functions do 
what is the biggist issue.



Richard Bennett wrote:
> so is it very difficult to write the code to use the joysticks, or game
> pads? Because I want the people to be able to use the gamepad or 
> joystick to
> play these games that I plan to create. Also, ever thought about being a
> game programming teacher? You seem to be very good and know your 
> stuff, like
> the back of your hand.



to leave send a blank Email to: [EMAIL PROTECTED]
You can contact the list owners/moderators by Emailing [EMAIL PROTECTED]
to go nomail send a blank message to: [EMAIL PROTECTED]
change "nomail" to "normal" to resume messages. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/blindgamers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to