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.

Newcomers DBPro Corner / Using playstation controller

Author
Message
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 16th Nov 2005 23:27
Is it possible for DBP to respond to a playstation controller???

Wisdom begins in Wonder-Socrates
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Nov 2005 23:44
That's a PC problem, not a DBP problem. If you can get your controller working as a Windows Game Controller, you can use it with DBP

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 17th Nov 2005 00:06 Edited at: 17th Nov 2005 00:16
I use a playstation controller.

You need to buy the interface and driver but once you have it then DBP will talk to it quite happily.

You can buy one here for £6.99 delivered.


Great Britain would be Amazing Britain if it wasn't for idiots like you bringing down the average!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Nov 2005 09:10
Nice, might just have to get one of the those. And I like the fact you get anti-gravity built in as well for such a low price



nojbox87
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: England
Posted: 17th Nov 2005 12:15 Edited at: 17th Nov 2005 12:16
Quote: "And I like the fact you get anti-gravity built in as well"
lol
why not buy a cheap game pad kinda thing instead? doesnt it do that same job?
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 17th Nov 2005 13:03
I have one of those - but, I admit - it's for my secret passion...

Dance Mat Games.

Playstation Dual Shock 2 pads are excellent, and many people are already used to them. Also, all the other 'cheap' peripherals you can get for the PS2, like steering wheels, dance mats, light guns, arcade consoles (joystick and buttons) are often good quality and you may already have lying around the house.

Why buy another version of the same thing, if you can just get the adapter.

(And for those that want to know - those adapters work nicely with two dance mats plugged in at once )
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 17th Nov 2005 15:09
Mmmm...Dancemats and PCs...sounds good

Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 18th Nov 2005 01:30
What code can I use for DBP to respond to the controller?

Wisdom begins in Wonder-Socrates
DrewG
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 18th Nov 2005 01:56
Not sure, but the basic If JoystickA() whatever, might work..

Gowmars
21
Years of Service
User Offline
Joined: 26th Sep 2003
Location: United States
Posted: 18th Nov 2005 02:08 Edited at: 18th Nov 2005 02:11
The Playstaion controllers are good quality controllers. I got a PC controller that’s shaped and designed just like the playstaion controller, but it was crap, I went though 3 of them before I learned I could just buy a PS2 to USB adapter. It was one of the best investments, I made as far as PC peripherals, I've had it for well over a year now and its still works perfectly ^_^ I got mine from radio shack it was like 15 bucks at most. Although the radio shack ones dont work with dance pads. They treat the arrows on the pad as the analogue stick so you cant press up/down or left/right at the same time, so now that I got stepmaina I'm going to need to get a better adapter, but for just using the controller I know that adapter works perfectly.

Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 18th Nov 2005 12:04
Gowmars - you may want to check some websites - they give instructions for some adapters and how to get the mats to work with the PC. Some of them need to have (I think it's select and up pressed) to 'activate them'.

Take a look before you invest in another one - it's been so long since I checked I can't say for sure.
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 18th Nov 2005 21:31
Does anybody know?

Wisdom begins in Wonder-Socrates
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 19th Nov 2005 14:55
Please I really need to know I have a deadline (Sunday).

Wisdom begins in Wonder-Socrates
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 19th Nov 2005 19:19
Is this still the original question? I.e. - how do you make DB respond to a Playstation Controller?

Because if it is - we've already answered it.

Yes. Yes you can. You need an adaptor to be able to plug your controller into your PC (see above) but after that, DB can detect it like any other joystick.
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 19th Nov 2005 19:29
No. I meant does anybody know the correct code.

Wisdom begins in Wonder-Socrates
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 19th Nov 2005 19:41
To enable dance mat controllers to be recognised properly?

I didn't know you wanted to know about dance mat controllers specifically. I thought it was Gowmars who was the one interested in the dancemat compatibility.
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 19th Nov 2005 19:56
No. The code for a playstation 2 controller?
ex.(For a FPS)
X=fire
Joystick 1=move
Joystick 2=camera view.
This is what I have so far.
How can I make Joystick 2 be the camera?
How do I put it so Joystick 1 is spefified as the Joystick that movings you around?


rem moving
if Joystick left()=1 then xrotate camera 0,0 : move camera 0,0.2 : xrotate camera 0,cx#
if Joystick right()=1 then xrotate camera 0,0 : move camera 0,-0.2 : xrotate camera 0,cx#
if Joystick down()=1 then yrotate camera 0,cy#-90 : move camera 0.2 : yrotate camera 0,cy#
if JoyStick up()=1 then yrotate camera 0,cy#+90 : move camera 0.2 : yrotate camera 0,cy#
if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))<180 then xrotate camera 0,40
if wrapvalue(camera angle x(0))>180 and wrapvalue(camera angle x(0))<335 then xrotate camera 0,335

rem shooting
_control_gunandbullet:

rem Control gun firing
if Joystick fire X(square)=1 and bullet=-50
bullet=100
play sound GunSnd
position object BulletObj,camera position x(0),camera position y(0),camera position z(0)
rotate object BulletObj,camera angle x(0),camera angle y(0),0
set bsp object collision 2,BulletObj,0.1,1
if particles exist(1)=1 then delete particles 1
make particles 1, FireImg, 50, 0.5
set particle emissions 1,10
set particle speed 1,0.01
move object BulletObj,0.2
endif

rem Control life of bullet
if bullet>0

rem If bullet collides with BSP world
if bsp collision hit(2)=1 or bulletimpact=1
rem End bullet on wall
position sound ImpactSnd,object position x(BulletObj), object position y(BulletObj), object position z(BulletObj)
play sound ImpactSnd
bulletimpact=0
bullet=0
else
rem Move bullet
dec bullet
move object BulletObj,0.5
set particle emissions 1,1+(bullet/10)
endif

rem Update particle using bullet object position
rotate particles 1,90-object angle x(BulletObj),object angle y(BulletObj)+180,0
position particles 1,object position x(BulletObj),object position y(BulletObj),object position z(BulletObj)

rem Bullet dies
if bullet=0
set particle emissions 1,0
set bsp collision off 2
endif

else
rem Gun recharge phase
if bullet>-50 then dec bullet
endif

return

rem moving camera

Wisdom begins in Wonder-Socrates
Alexander The Great
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location:
Posted: 19th Nov 2005 19:57
I can't really test cause I don't have my controller here?

Wisdom begins in Wonder-Socrates
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 19th Nov 2005 20:17
ah, you want to know how to make db reconise the two seperate analog sticks.

now this is just from memory so i MIGHT be wrong - but i belive the left analog stick responds to the joystick left, joystick right etc commands and the right ones generate values on the X and Z axis properties of the joystick - um, trying to remember how you access those in dbp (been a while since i used dbp..)

um.. it might be something like joystick x/joystick z. These will return values between a minium and maxium saying where the analog actually is, but if you want to use it like you do joystick left and joystick right then you just want to know if its not centered, i would IMAGINE (again guess work, someone can come and confirm or disagree with me) that

if joystick x < 0 then //its held left
if joystick x > 0 then //its held right
if joystick z < 0 then //its held up?
if joystick z > 0 then //its held down?

get someone to confirm or test the values yourself - good luck

Login to post a reply

Server time is: 2024-11-27 12:59:24
Your offset time is: 2024-11-27 12:59:24