Other possible input devices
Author |
Message |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Tue May 31, 2011 5:50 pm Post subject: Other possible input devices |
|
|
Is it possible to use other devices other than the keyboard to get an input in Turing? Like for instance, if I had a USB controller, is that allowed? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
goroyoshi
![](http://compsci.ca/v3/uploads/user_avatars/13875868514dae1bcc8da17.png)
|
Posted: Tue May 31, 2011 6:41 pm Post subject: RE:Other possible input devices |
|
|
i doubt that beause usb controlers are usually set to key input, unless when used in certain pc games
EX: Borderlands PC supports the Xbox 360 controller just plugged in nothing else |
|
|
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: Tue May 31, 2011 7:08 pm Post subject: RE:Other possible input devices |
|
|
No, there's no easy way to make that happen. Games like Borderlands contain code that (usually) interfaces with something called DirectInput that can accept input from all kinds of controllers -- everything from an xbox360 controller to the old Sidewinders and game pads. Turing has no way to interface with DirectInput, and no way to read from a USB port. Even when you're using Input.KeyDown, you're dealing with an interface made available in Turing, because Turing knows how to request that information from the O/S.
Turing doesn't know how to talk to USB interfaces, DirectInput or even OpenIL (the OpenGL/AL/IL version of DirectInput, roughly). Worse, you can't link Turing against any other language that can do those things, because Turing doesn't support that. |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Tue May 31, 2011 8:41 pm Post subject: RE:Other possible input devices |
|
|
Ok, thanks, just a thought. So then there's other languages that can do that? |
|
|
|
|
![](images/spacer.gif) |
DemonWasp
|
Posted: Tue May 31, 2011 11:36 pm Post subject: RE:Other possible input devices |
|
|
Any language that can talk to DirectInput or OpenIL, no matter how many layers you have to go through, can do it. This includes, but is not limited to: C, C++, Java, C#, Python, Lua, ...
If you really really wanted to, you could write code that talks to a generic USB device using your own protocol. I really don't recommend it if you want to develop a game, but if you want to learn all about USB and talking to separate hardware, then it might be good learning material. |
|
|
|
|
![](images/spacer.gif) |
chrisbrown
![](http://compsci.ca/v3/uploads/user_avatars/18814724584bcbb8192aae8.png)
|
Posted: Wed Jun 01, 2011 2:06 am Post subject: RE:Other possible input devices |
|
|
There's always Turing's Joystick module for basic functionality. Joystick.GetInfo can be used in the same fashion as Mouse.Where and should work with most game controllers configured in windows. You're limited to two axes and buttons though. |
|
|
|
|
![](images/spacer.gif) |
2F_Zelda
|
Posted: Thu Jun 09, 2011 2:42 am Post subject: Re: Other possible input devices |
|
|
If your computer has one, a parallel port can easily be used to get inputs. Pins 10-13 and 15 can be read with parallelget. The help file has a nice little section on it. |
|
|
|
|
![](images/spacer.gif) |
Raknarg
![](http://compsci.ca/v3/uploads/user_avatars/3745510004d8be6689b92f.jpg)
|
Posted: Thu Jun 09, 2011 9:38 am Post subject: RE:Other possible input devices |
|
|
Lol, it's fine, I don't intend on trying it soon, I was just wondering if it was possible. Thank you, though. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: Thu Jun 09, 2011 4:14 pm Post subject: Re: Other possible input devices |
|
|
I know it's possible to use usb controllers in turing because I made the tutorial and module |
|
|
|
|
![](images/spacer.gif) |
|
|