Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / analog gamepad

Author
Message
MIsfit410
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location:
Posted: 15th Jun 2003 18:53
I am finally getting underway on my game(thanks to the billions of helpful posts already here).

on thing I would like to find out still. I use a Gamecube controller on my PC... many people out there do have analog controllers now. I would like to take advantage of its analog capabilities, and obviously the ole joystickup()=1 isnt going to accomplish that.

you have to excuse me, I always base my startup from my old TRS-80 days, I find this basic isnt much different so I assume what I need to do is basically the same, but with some minor changes..

my old analog stick on the TRS-80 had an X,Y axis, which where controller by the commands joystick 0 and joystick 1(0 being left to right, 1 being up and down).

so if joystick(0)64 you would tell it to move you right, which worked the same, but also gave you an option for any of those numbers for more precision.

does anyone know how I accomplish this with Dark basic?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Jun 2003 19:32
Use the JOYSTICK X() and JOYSTICK Y() functions - they return values between -1000 and +1000 depending on how far you have moved the controller.

You'll probably need to take into account a 'dead-zone' at the centre - my own gamepad sometimes registers values of +/- 16 for either axis when centred.
Mattman
20
Years of Service
User Offline
Joined: 5th Jun 2003
Location: East Lansing
Posted: 15th Jun 2003 19:49
How do u use a gc controller on a pc?

---Mattman
"Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done." Andy Rooney
MIsfit410
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location:
Posted: 15th Jun 2003 20:07
"How do u use a gc controller on a pc?"

I went to Liksang.com and purchased a USB Adapter..
it works awesome(except it doesnt support the Wavebird )

they have them for Xbox and PS2 controllers now as well.

anyways, thanks for the help, I knew it had to be something similar, I am still trying to adjust from my old set ways of RSDos.
if I had my way, the Coco would still be alive and going strong

Login to post a reply

Server time is: 2024-04-19 22:50:34
Your offset time is: 2024-04-19 22:50:34