By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

can the joystick send events to a C# app?

P: n/a
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
Feb 2 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 2 Feb, 11:19, "Vicente Nicolau" <vini...@eui.upv.eswrote:
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.


Feb 2 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.