473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

can the joystick send events to a C# app?

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
1 3201
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bleedledeep | last post by:
I am new to C#/.NET/DirectX, and could not find a simple example of how to read the X/Y location of the joystick. < YIKES!!! The DirectX.DirectInput is one serious pile of API! > After some...
2
by: PawelR | last post by:
Hello group, My English is very little. I want same samples about programming joysticks connected to USB port. If you can help me please send same adresses or samples. Thx PawelR
0
by: CForrester | last post by:
Hey there, I'm trying to emulate a joystick throttle using keyboard keys. For example: ` = 0%, 1 = 10%, 2 = 20%, 3 = 30%, 4 = 40%, 5 = 50%, 6 = 60%, 7 = 70%, 8 = 80%, 9 = 90%, 0 = 100% My...
1
by: Hermanutz | last post by:
Hello, I'm look after a commercial joystick driver controlled by my application (determine the number of axis, determine the number of buttons, transmit axis values and button values). I thing,...
2
by: bryan rasmussen | last post by:
Hi, I've been looking at autohotkey to do some different usability hacks for windows http://www.autohotkey.com/ one of the benefits of this language is it allows one to catch keyboard usage,...
2
by: Vicente Nicolau | last post by:
Hello, I'm implementig a C# app in which I need to access to a Joystick. Nowadays I'm using the DirectInput class for getting the actual joystick position, but trhough polling. I would like...
2
by: Vicente Nicolau | last post by:
Is there any way to recieve events from a joystick and to hadle them using C#??? Without using pulling.... Thanks.
0
by: Vicente Nicolau | last post by:
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...
2
by: Vicente Nicolau | last post by:
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.