On Joysticks
Displaying 1-9 of 9 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Time_Wizard

Forgive me if this has been addressed, but...

Of the joy.button[x] built-ins, only button 0 seems to return 0/1. The rest appear to return 0/something else. I came across this when trying to do switches in a simple joystick testing utility, where case 1 would only work for joy.button[0].

Also, this is negligible, but on my non-analog gamepad, the center position returns -1 instead of 0 for the joy.anologx and joy.analogy built-ins.

One other largely irrelevant question: Does V3 check for joysticks only when it initializes? When I unplug/plug my USB gamepad in when my program is running, the program doesn't notice it's abscence/arrival in terms of the joy.active built-in.

BTW, the joystick testing utility is all done and running smoothly, but I'd appreciate if someone with multiple joysticks could test it for me to make sure it works all cool-like. E-mail me (or just say so here) if you want the packfile for any reason.

Thanks in advance.

Posted on 2004-08-17 07:42:29

Gayo

key[] doesn't return 0 or 1 either, it's 0 or a non-zero value. vecna isn't telling us what the non-zero value means, so it will forever be a mystery.

Posted on 2004-08-17 09:09:17

vecna

The values are whatever directx returns. I don't know offhand what they are.

Verge only checks for joysticks at startup, yes.

As for analog positions returning -1 ... well, they range from -1000 to +1000, and the word analog is key here. Even on digital pads, you should not expect it to return exactly 0 or +- 1000. You should consider 10-15% to be a dead zone in most cases, eg, any value less than abs(100) should be considered 0. I believe the up/left/down/right builtins use a 15% deadzone. But the analog values are raw feeds (just scaled to +- 1000), so its up to the VERGE programmer to use the values appropriately.

Posted on 2004-08-17 15:23:21 (last edited on 2004-08-17 15:25:48)

mcgrue

Gayo:

The joystick button values seem to return the bitvalue of the corresponding joystick button position... at least for me. So button 0 returns 1, button 1 returns 2, button 3 returns 4, button 4 returns 8, button 5 returns 16, etc.

Posted on 2004-08-17 15:26:16

Time_Wizard

Righty, understood.

Posted on 2004-08-17 21:20:41

mcgrue

I have multiple joysticks installed, btw... two gamepads and a wingman I (sadly) haven't used in years due to a lack of good space flight sims. If you want me to test this program out, filfre to send it to me.

Posted on 2004-08-17 21:23:10

Alex

Quote:Originally posted by mcgrue

I have multiple joysticks installed, btw... two gamepads and a wingman I (sadly) haven't used in years due to a lack of good space flight sims.

The space flight sim: Frontier - First Encounters. Still without equal after nine years and downloadable for free nowadays too. Anyone who's not played it, play it!

Posted on 2004-08-17 22:51:01

Interference22

I have Freelancer. That's nice, although it could do with a little more DEPTH. Just shooting at stuff get a little wearing at times: even Doom was up for more than that.

Posted on 2004-08-18 00:20:29

Thrasher

It's more about trading, but that's even MORE boring.

Posted on 2004-08-23 03:47:14


Displaying 1-9 of 9 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.