12th September 2006, 11:31 AM
Just to go even further from there, yes, if you are able to assign a single bit of that to a specific different function, yes you can assign any value or value range in that range to any function you can otherwise accomplish, and you can have some overlap so that when you hit that part of the range both functions happen. This can result in some very crazy controls, as I've experimented with before just for fun. A single button is just 1 or 0, on or off. You really can only assign ONE function to that, any more and you have to create methods of sensing "holding" the button or rapid button presses (street fighter for example), so yeah even with that limited input there are some options. A mouse is different than an analog switch actually. It's just a detector of motion, not really range of motion. You'd have to get a method to calculate "speed" first before you can assign multiple functions to that. A joystick or analog trigger are, essentially, the same thing as far as a program is concerned. It's an input range, an axis. Not a "single thing", because quite obviously multiple things are assigned to it. In the case of most games, those functions are all done with a very simple string that just converts whatever range the thing is in to a certain in game "speed" of cursor or character movement. It's usually stupid to convolute it any further than that. But, since it IS a range, you don't have to add much of anything to get multiple functions out of it. It's ready for those to be assigned "as is". As I explained above, any analog trigger or stick MUST be converted to digital to be used by (today's) computers, since they too are digital. An analog machine as in 1940 or so could be designed to not require any digital conversion, but don't even bother worrying about that. Early PCs (and upwards) were digital affairs and thus a conversion to a digital range was needed. That accomplished, it's a simple matter from a programming perspective to assign whatever part of that range you want to whatever function you could want. It's not impossible, it's not even hard.
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." ~ Charles Babbage (1791-1871)