lets work on the " Xbox360 controller-plugin"

Posted By: sebbi91

lets work on the " Xbox360 controller-plugin" - 02/14/11 17:55

Hi there,

I think in this forum aree some people who want the xbox360 controller working too.
I think its time to work on this Plugin.

i found an plugin for Gamestudio, buts in C-Script.

Here it is:
__________________________________________

xbox 360 controller support(C-script)
__________________________________________

I started converting it into lite-c but i failed at the manupulation of the dll.

I am sure here some Scripters who knows working with dll's.

Here is my try to convert the "Xbox_dll.wdl" into "Xbox_dll.c"



Code:
//////////////////////////////////////////////////////////////////////////
//																								//
//		* dllfunctions for support of up to 4 'Xbox 360 controllers' *		//
//																								//
//		  (plugin by DocJoe, Mars, 30th of 2006)									//
//																								//
//////////////////////////////////////////////////////////////////////////

// use values 1, 2, 3 or 4 for vConroller_Number
// sliders values between 1 - 1000
// axis values between -1000 to +1000
// vibration speeds between 0 - 1000
// render and capture guids can be used in combination with DSound

function  Xbox_Avaiable(vConroller_Number);		//on - off
function  Xbox_ProductName(vConroller_Number, strProductName);	//on - off
function  Xbox_Button_A(vConroller_Number);		//on - off
function  Xbox_Button_B(vConroller_Number);		//on - off
function  Xbox_Button_X(vConroller_Number);		//on - off
function  Xbox_Button_Y(vConroller_Number);		//on - off
function  Xbox_Button_LB(vConroller_Number);		//on - off
function  Xbox_Button_RB(vConroller_Number);		//on - off
function  Xbox_Button_Back(vConroller_Number);	//on - off
function  Xbox_Button_Start(vConroller_Number);	//on - off
function  Xbox_Button_LT(vConroller_Number);		//on - off
function  Xbox_Button_RT(vConroller_Number);		//on - off

function  Xbox_Slider_L(vConroller_Number);		//0 - 1000
function  Xbox_Slider_R(vConroller_Number);		//0 - 1000

function  Xbox_Stick_LX(vConroller_Number);		//-1000 - 1000
function  Xbox_Stick_LY(vConroller_Number);		//-1000 - 1000
function  Xbox_Stick_RX(vConroller_Number);		//-1000 - 1000
function  Xbox_Stick_RY(vConroller_Number);		//-1000 - 1000

function  Xbox_POV(vConroller_Number);				//-1, 0, 45, 90, 135, 180, 225, 270, 315

function  Xbox_Set_Dead_Zone_L(vConroller_Number, vDead_Value);					//on - off
function  Xbox_Set_Dead_Zone_R(vConroller_Number, vDead_Value);					//on - off
function  Xbox_Set_Dead_Zone_Sliders(vConroller_Number, vDead_Value);			//on - off
function  Xbox_Get_Dead_Zone_L(vConroller_Number);									//0 - 2000
function  Xbox_Get_Dead_Zone_R(vConroller_Number);									//0 - 2000
function  Xbox_Get_Dead_Zone_Sliders(vConroller_Number);							//0 - 1000

function  Xbox_Set_Vibration(vConroller_Number, Speed_Low, Speed_High);		//Speeds 0 - 1000

function  Xbox_Get_Audio_GUIDs(vConroller_Number, strRenderString, strCaptureString);	//off: 	no controller
																														//on:  	controller avaiable
																														//			render device avaiable
																														//			capture device avaiable
																														//2:  	controller avaiable
																														//			render device avaiable
																														//			no capture device avaiable
																														//3:  	controller avaiable
																														//			no render device avaiable
																														//			capture device avaiable
																														//4:  	controller avaiable
																														//			no render device not avaiable
																														//			no capture device avaiable

#define Xbox_controller_1, 1;
#define Xbox_controller_2, 2;
#define Xbox_controller_3, 3;
#define Xbox_controller_4, 4;
#define Xbox_controller_all, 0;	//set dead zone of all Xbox controller at the same time




It crashes when it's trying to open the dll.

I hope we can get it working together!

best regards

Sebbi



btw sorry for my bad english ^^
Posted By: Redeemer

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 03:46

You don't need a plugin for the Xbox 360 controller. Just download the "Xbox 360 Controller for Windows" drivers from Microsoft, install the drivers, plug in the controller, set it up in Windows through the control panel, and program it in Gamestudio like a normal joystick.
Posted By: Inestical

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 11:15

If Acknex uses XInput, it will work, but if it uses DirectInput, there will be problems, such as unresponsive POV.

These are my experiences though. I haven't tested my controller with the A8 yet, so I can be wrong too.
Posted By: 3dgs_snake

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 11:50

Hi,

I have already tested an XBox 360 Controller (With Microsoft Driver) with 3dgs, and it worked well. The trigger buttons are treated like joy_raw.z (Something like that, blush I don't remember well ), and input value ranges from 0 to 255.

Best regards.
Posted By: Rei_Ayanami

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 15:13

Yeah, works well.

But you cannot set vibration and DeadZones...
Posted By: sebbi91

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 15:16

Originally Posted By: Redeemer
You don't need a plugin for the Xbox 360 controller. Just download the "Xbox 360 Controller for Windows" drivers from Microsoft, install the drivers, plug in the controller, set it up in Windows through the control panel, and program it in Gamestudio like a normal joystick.


Thanks for your answers.

Your right,
it can be used like an normal Joystick but the difference between the standart functions and the Plugin are the Trigger left Trigger (LT) and Right Trigger (RT)
(look at the Gamepad an you'll see what I mean)

They can't be used at the same time.

Try it out.

the right trigger is used by:
joy_raw.z<0;

and the left trigger is used by:
joy_raw.z>0;

Now you can see the problem.
You cant use both triggers at the same time.
I tried it out, its like no Trigger is pushed.

Here comes the Plugin.
As you can see in the demo, you can controll the left and the right Trigger seperately.

Thats what I want to have.
Its the bigggest Problem using the xbox360 controller.

But thanks for your answer.

If someone could tell me how to open and edit the dll it would help too.(I have no expereince with dll's but I could try it ^^)



hope yomeone could help

best regards
Sebbi
Posted By: Redeemer

Re: lets work on the " Xbox360 controller-plugin" - 02/15/11 16:39

Quote:
it can be used like an normal Joystick but the difference between the standart functions and the Plugin are the Trigger left Trigger (LT) and Right Trigger (RT)
(look at the Gamepad an you'll see what I mean)

They can't be used at the same time.

Ah, you're right. I remember running into that problem. The inability to controll the "rumble" is also a valid point.

Disregard my previous post, then. laugh
Posted By: 3dgs_snake

Re: lets work on the " Xbox360 controller-plugin" - 02/16/11 05:30

Also sorry for my post grin , I tried it for about 10 mn after I bought my Gamepad, and I tested the buttons one by one tongue .
Posted By: sebbi91

Re: lets work on the " Xbox360 controller-plugin" - 02/16/11 15:45

no problem ^^

My question to all:

Is there anyone who know how to fix the dll (or maybe another way to handle it)?

It would be very nive because I have only a Xbox 360 wireless controller because they are very nice ^^
I would like to use it in my games.


best regards to all

Sebbi
Posted By: WretchedSid

Re: lets work on the " Xbox360 controller-plugin" - 02/16/11 20:19

Originally Posted By: sebbi91
If someone could tell me how to open and edit the dll it would help too.(I have no expereince with dll's but I could try it ^^)

Use the hex editor of your choice. Thank me later.
Posted By: sebbi91

Re: lets work on the " Xbox360 controller-plugin" - 02/19/11 14:40

I got it working now.


It knows now how many Xbox360 controllers are plugged in.
All works perfect!

Thanks to all for your help ^^


best regards

Sebbi
Posted By: Clemens

Re: lets work on the " Xbox360 controller-plugin" - 02/19/11 15:17

Then let the community take part in your experiences.. wink
Posted By: flits

Re: lets work on the " Xbox360 controller-plugin" - 02/19/11 18:44

i concerted the wdl to a header a while ago i believe you need this

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=42634&Number=350987#Post350987

i am not sure about it
i am not longer working on with this engine
© 2024 lite-C Forums