Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, bigsmack, 7th_zorro, dr_panther), 1,364 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
lets work on the " Xbox360 controller-plugin" #358965
02/14/11 17:55
02/14/11 17:55
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
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 ^^


3D-Gamestudio A8 - Commercial
Re: lets work on the " Xbox360 controller-plugin" [Re: sebbi91] #359033
02/15/11 03:46
02/15/11 03:46
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
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.


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: lets work on the " Xbox360 controller-plugin" [Re: Redeemer] #359041
02/15/11 11:15
02/15/11 11:15
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
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.


"Yesterday was once today's tomorrow."
Re: lets work on the " Xbox360 controller-plugin" [Re: Inestical] #359046
02/15/11 11:50
02/15/11 11:50
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
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.

Re: lets work on the " Xbox360 controller-plugin" [Re: 3dgs_snake] #359074
02/15/11 15:13
02/15/11 15:13
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Yeah, works well.

But you cannot set vibration and DeadZones...

Re: lets work on the " Xbox360 controller-plugin" [Re: Redeemer] #359076
02/15/11 15:16
02/15/11 15:16
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
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


3D-Gamestudio A8 - Commercial
Re: lets work on the " Xbox360 controller-plugin" [Re: sebbi91] #359092
02/15/11 16:39
02/15/11 16:39
Joined: Dec 2008
Posts: 1,660
North America
Redeemer Offline
Serious User
Redeemer  Offline
Serious User

Joined: Dec 2008
Posts: 1,660
North America
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


Eats commas for breakfast.

Play Barony: Cursed Edition!
Re: lets work on the " Xbox360 controller-plugin" [Re: Redeemer] #359201
02/16/11 05:30
02/16/11 05:30
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
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 .

Re: lets work on the " Xbox360 controller-plugin" [Re: 3dgs_snake] #359269
02/16/11 15:45
02/16/11 15:45
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline OP
Senior Member
sebbi91  Offline OP
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
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


3D-Gamestudio A8 - Commercial
Re: lets work on the " Xbox360 controller-plugin" [Re: sebbi91] #359329
02/16/11 20:19
02/16/11 20:19
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
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.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 1 of 2 1 2

Moderated by  adoado, checkbutton, mk_1, Perro 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1