Connected my XBox Controller, need some help...

Blitz3D Forums/Blitz3D Programming/Connected my XBox Controller, need some help...

WedgeBob(Posted 2006) [#1]
I was just looking at a 3D terrain example, now I wanted to see how a console-based controller could go around it. However, most PC controllers are modelled after PS2, I have an XBox controller connected to my PC. Now, the layout is a little different. Would the same D-Pad code work for this controller as well, or should the XBox controller be programmed a little differently? I mean, the thumbsticks and the D-Pad may be different from that of a normal PC joystick/gamepad, and would like to know if the programming would be a little different.


Stevie G(Posted 2006) [#2]
Not really, I'm pretty sure joyx() and joyy() is standard for reading the d-pad axis' and left analogue ( if turned on ). The right analogue needs a different setup to the ps2.

See here ..

http://www.blitzbasic.com/codearcs/codearcs.php?code=1592


WedgeBob(Posted 2006) [#3]
Okay, that sounds great. I'll browse around for commands as far as setting up this controller to work with an arcade-style game that I'm putting together. Should be interesting to see what I come up with when it comes to setting up my controller. Thanks. I would've thought that an XBox controller would be a little more difficult to program from a PC controller, but I did install the XBCD drivers for it, so it may come out to be approximately the same.


Stevie G(Posted 2006) [#4]
Try one of the 360 shooters and you'll find that it works just fine.

Stevie


WedgeBob(Posted 2006) [#5]
Yeah, that would be a direct connection, since an X360 controller is USB already (smart move Microsoft, using a PC connection for a game console). However, for the original XBox, I believe that I just got the SmartJoy Adapter mailed to me from Amazon.com, so I have no problems there, either now. I was just looking to see that.

Now if only I could figure out how to get that vibration/rumble effect programmed into Blitz, so that way if you were to hit a wall, you would feel the vibration through the joystick (just like the XBox does). I don't think Blitz had vibration/rumble joysticks or game controllers in mind, I guess.


Stevie G(Posted 2006) [#6]
Nope, no native force feedback control within blitz but there is a ( not free ) dll which will do this for you ....

A link to demo version should be available on Codersworshop. The file is called ...

FFPPluginDemo

A good while back a guy called Pepsi did something also ... you could try searching in these forums.

Stevie


WedgeBob(Posted 2006) [#7]
That sounds okay, I'll be sure to find some ways to find a rumble force feedback, maybe converting my game to Visual C++ would be a start (I believe most XBox or X360 games are ported from VC++ code, if I'm not mistaken, knowing Microsoft they probably want you to use their languages to code in). However, I have plans on keeping my game project on the PC platform until then. I'll start off by converting my game to C++ after I'm done with the Blitz phases of the program. Man, oh man, have I got a lot of work to do getting my "Plasmorg" project going. It's gonna be a while before this game gets into different platforms, and different code languages. Especially a joystick/gamepad version of the game.


WedgeBob(Posted 2006) [#8]
Well, after getting an X360 controller, I saw that the XBCD driver didn't recognize that. That would've allowed the 360 controller to have rumble features (which the Microsoft driver does not). How would I get the XBCD driver to recognize the 360 controller, as that is the one I'm switching to?