can the joystick send events to a C# app?

  • Thread starter Vicente Nicolau
  • Start date
V

Vicente Nicolau

All example codes I found with DirectX or XNA access the joystick by
pulling... ?? is there anybody who has been able to use the joystick with
events (with C#)?? Is it possible?

If it is not possible, I only want to know it. In that way I would tell it
inmediately to my boss...

thank you
 
D

DeveloperX

All example codes I found with DirectX or XNA access the joystick by
pulling... ?? is there anybody who has been able to use the joystick with
events (with C#)?? Is it possible?

If it is not possible, I only want to know it. In that way I would tell it
inmediately to my boss...

thank you

When you think about it, polling is more natural for game development
as games are basically a loop which goes, calculate stuff, draw stuff,
calculate stuff, draw stuff. You would not want an event being raised
during the redraw, and you only need to know the joystick status when
you're about to calculate any changes. As games are generally about
performance, which is more performant checking the joystick status
once or having it raise half a dozen events between uses of that data?
Taking that a step forward, when would you have the event fired? If
you think about say the 360 controller being used to drive a car, the
joystick is going to be moving constantly.
So you can wrap the joystick code up in a class that will fire events,
I just don't think you'll find it very useful unless you're just
interested in digital movements, ie stick goes left, stick now right
or button down button up.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top