Jump to content


Photo

Xbox 360 Controller Library


  • Please log in to reply
66 replies to this topic

#1 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 22 October 2007 - 01:15 PM

After learning here how to use the XBox 360's controller for use in GM, I went ahead and created a library for D&D members to use.

Posted Image

This is my first library to date. Any bugs, suggestions, and so on I appreciate hearing.

I've included the button graphics in case anyone would prefer changing them, or simply modifying them slightly.

Edited by RabbidMickeyMouse, 14 March 2008 - 05:25 AM.

  • 0

#2 gmkaya

gmkaya

    GMC Member

  • New Member
  • 214 posts

Posted 23 October 2007 - 02:37 PM

After learning here how to use the XBox 360's controller for use in GM, I went ahead and created a library for D&D members to use.


What the hell? You cant even use GM games in xbox :D ....??
  • 0

#3 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 23 October 2007 - 10:12 PM

What the hell? You cant even use GM games in xbox ....??

Of course not, but you're able to plug the controller into your usb port and use it for game you build.
  • 0

#4 airheadgames772

airheadgames772

    GMC Member

  • New Member
  • 247 posts

Posted 26 October 2007 - 12:01 AM

Errr... Does it work with a regular Xbox controller? Beacause I don't have a 360. :GM008:
  • 0

#5 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 26 October 2007 - 12:25 PM

I'm reading on Wikipedia that the original XBox controller used a 'proprietary USB'. It may, but I wouldn't know (as I dont own an original XBox controller), so I encourage you to find that out for yourself, and comment back on any successes.

Edited by RabbidMickeyMouse, 26 October 2007 - 12:25 PM.

  • 0

#6 airheadgames772

airheadgames772

    GMC Member

  • New Member
  • 247 posts

Posted 26 October 2007 - 06:42 PM

Well, Wikipedia is right 89% of the time, so I'll try it.
  • 0

#7 Prime32

Prime32

    GMC Member

  • New Member
  • 28 posts

Posted 27 October 2007 - 03:11 PM

I believe the Xbox controller uses a USB cable with a modified connector - you have to attach a USB connector to the end to use it on a PC.
  • 0

#8 Mattthew_H

Mattthew_H

    GMC Member

  • GMC Member
  • 236 posts
  • Version:GM:Studio

Posted 31 October 2007 - 08:39 AM

well let me know if it work's for any game, Because i have used it for about 5 of my up coming game's and old one's.

PS: dose it work for :( or :lol: ?
  • 0

#9 Mattthew_H

Mattthew_H

    GMC Member

  • GMC Member
  • 236 posts
  • Version:GM:Studio

Posted 06 November 2007 - 08:23 AM

Has any one actually Tried this? :D
Because I would Be Disappointed With All the updates i have done to my game's and it wont work. :P
  • 0

#10 bombshell

bombshell

    GMC Member

  • GMC Member
  • 1607 posts

Posted 10 November 2007 - 09:01 PM

After learning here how to use the XBox 360's controller for use in GM, I went ahead and created a library for D&D members to use.


What the hell? You cant even use GM games in xbox :P ....??

<{POST_SNAPBACK}>

actualy you can,
all you need is a chipped xbox360,

and you need a converter,
like with the normal xbox there was an EXE TO XBE converter,
and thats about it I tried it it works well with house of the dead for PC :P
  • 0
http://bombshell93.deviantart.com/

Our emotions each take the form of a Demon. These Demons roam our mind looking for little quirks they can take advantage of. It is up to us to control out Demons. Or they will consume us and control us. You need to find your angel before your Demons do. Or the devine hero saving the memories and thoughts that keep you going will fall.

#11 brahma

brahma

    GMC Member

  • New Member
  • 46 posts

Posted 15 November 2007 - 12:59 AM

damn! this is so ****ing sweet!! I am adding this to my 3d golf game.
  • 0

#12 Fyeregg

Fyeregg

    Fyeregg Productions

  • New Member
  • 763 posts

Posted 17 November 2007 - 12:35 AM

Amazing, This is simply amazing, especialy for some one who joined 8/14/07, you have talent!
  • 0
I think I am done with Game Maker, so if I was working on any projects, they will most likely never get finished.

I am moving on to...

C++
Java

#13 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 17 November 2007 - 11:07 AM

please change the host i cant use this one please change it :GM131:
  • 0

Posted Image


#14 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 17 November 2007 - 12:21 PM

Death-droid, I've put up a new mirror.

Amazing, This is simply amazing, especialy for some one who joined 8/14/07, you have talent!

Don't you mean 21-May 06?
  • 0

#15 alejandrogr700

alejandrogr700

    GMC Member

  • New Member
  • 7 posts

Posted 17 November 2007 - 03:05 PM

cool :GM131:
How about a wii controller library?
  • 0

#16 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 18 November 2007 - 02:43 AM

Death-droid, I've put up a new mirror.

Amazing, This is simply amazing, especialy for some one who joined 8/14/07, you have talent!

Don't you mean 21-May 06?

<{POST_SNAPBACK}>

Cool thank you.

Cant wait to try this.

But it means i have to limit controlls.
Oh well i cant wait to use it plus do you know if the power pack things for the wireless 360 controllers you get if there able to be used??

Edited by death-droid, 18 November 2007 - 03:51 AM.

  • 0

Posted Image


#17 Fyeregg

Fyeregg

    Fyeregg Productions

  • New Member
  • 763 posts

Posted 18 November 2007 - 01:59 PM

Whoops! I must have looked at the noobs post that is right below yours! (jk gmkaya your not that noobish! :P)
  • 0
I think I am done with Game Maker, so if I was working on any projects, they will most likely never get finished.

I am moving on to...

C++
Java

#18 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 18 November 2007 - 02:54 PM

Oh well i cant wait to use it plus do you know if the power pack things for the wireless 360 controllers you get if there able to be used??

Not sure really. I wouldn't know what the 360 controller uses to communicate wirelessly. I'm assuming Bluetooth like the Wii controller, which either way requires some kind of receiver. I'll assume further that wireless controllers would require a DLL, since most joysticks aren't wireless for computers.

How about a wii controller library?

I know there's someone working on a DLL for GM's purposes. I think it may be called Giimote or something. If I were you, I'd search the forums, and see if they're looking into making a library for it (if it works yet).
  • 0

#19 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 1506 posts
  • Version:GM:Studio

Posted 19 November 2007 - 12:42 AM

cool so consoles will happen just use the xbox controller and a computer and all systems go cool so i could find out how this was done and make my own controller and a library for it and have a computer on sale and mod it completely and have it like a whole new console and with the controller and everything work man this is cool i can imagine my first console with games on it now andd i could do the same with a laptop to make it portable.
  • 0

Assuming I helped you out in a questions and answers topic won't you return the favour by helping me with one my coding problems, or recommend some one who can chat to me over pms about helping and how to overcome my obstacles, after all lets just say I did help you or them or many people with similar problems, in that topic.

Here i have a topic for those of you struggling with type writer text and mugshots in your games especially if it is a rpg see the link below for more info

http://gmc.yoyogames...howtopic=619103

almost no code needed, only uses two events.

click here for the l8est version of feed the alien pizza, it has some major polished up features.


#20 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 19 November 2007 - 10:56 AM

cool so consoles will happen just use the xbox controller and a computer and all systems go cool so i could find out how this was done and make my own controller and a library for it and have a computer on sale and mod it completely and have it like a whole new console and with the controller and everything work man this is cool i can imagine my first console with games on it now andd i could do the same with a laptop to make it portable.

:GM072: I'm guessing you're interested in making your own console? Punctuation goes a long way in explaining yourself better.

Anyhow, I didn't make this library (or the easy to use scripts found in the original topic) for making any emulation related activities easier. I'm quite against that sort of thing. I understand that's the first thing that comes to mind for some, but I hope that as game designers, people will think of their own original ideas instead, and respect the property rights of others.

Edited by RabbidMickeyMouse, 19 November 2007 - 10:57 AM.

  • 0

#21 paolo-dude

paolo-dude

    GMC Member

  • New Member
  • 210 posts

Posted 01 December 2007 - 03:05 PM

cool  :D
How about a wii controller library?

<{POST_SNAPBACK}>

Try searching up GiiMote, it is not DnD, but it works
~PD~
  • 0
Her eyes are like looking into the abyss...

#22 paolo-dude

paolo-dude

    GMC Member

  • New Member
  • 210 posts

Posted 22 December 2007 - 08:33 AM

Sorry for this, but does anyone know where to get a normal Xbox lib?
Thanks,

~PD~
  • 0
Her eyes are like looking into the abyss...

#23 warpedpipe

warpedpipe

    GMC Member

  • New Member
  • 7 posts
  • Version:Unknown

Posted 02 January 2008 - 07:05 PM

Thanks!

Edited by warpedpipe, 02 January 2008 - 07:09 PM.

  • 0

#24 popidiots

popidiots

    GMC Member

  • GMC Member
  • 25 posts

Posted 27 January 2008 - 03:45 PM

You can use the original xbox controller with a PC. I did a project like this a while back.
Further Details
  • 0

#25 giga970

giga970

    GMC Member

  • GMC Member
  • 458 posts
  • Version:GM:Studio

Posted 01 February 2008 - 03:01 AM

This is pretty cool. I believe it works for the Lite version right? I haven't got an Xbox360, but lot's of my friends do.

I'll see if I could make a whole game for an Xbox360 controller attachment.

EDIT: It's not that I don't want to buy Pro, it's just that I, like so many here have had upgrading problems. I hope for a new upgrading system next time so that I might be of some contribution to this whole forum...

Edited by giga970, 02 February 2008 - 01:25 AM.

  • 0

| Website - http://afrodynamics.net/ | Twitter - @afrodynamics |

| My Ludum Dare 24 Entry | GameMaker Video Tutorials | Aegis (HTML5 game on Kongregate) |

| Kongregate API Extension - Use Kongregate's API in your HTML5 Games |


#26 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 02 February 2008 - 05:40 AM

I forget whether you need Pro to use library files. If you know how to work with code, here are some scripts you can work with, since the functionality of the library and these scripts doesn't use any reg. functions.

http://gmc.yoyogames...=0#entry2384940
  • 0

#27 giga970

giga970

    GMC Member

  • GMC Member
  • 458 posts
  • Version:GM:Studio

Posted 06 February 2008 - 12:11 AM

I can use the library, that's Lite. I kinda got it to work.

You see I have a Microsoft SideWinder with no driver that isn't being recognized by my XP computer. I want to get it to work, but I have no driver and the one i got off the 'net didn't.

My friend tried his Logitech controller, which was recognized, but the buttons were messed up. A was like the joystick...

I'd like to see more of a tutorial on hwo to use this. I didn't quite get the joystick axis thing. If anyone knows how I can get my SideWinder to at least be recognized by Windows please let me know immediately.
  • 0

| Website - http://afrodynamics.net/ | Twitter - @afrodynamics |

| My Ludum Dare 24 Entry | GameMaker Video Tutorials | Aegis (HTML5 game on Kongregate) |

| Kongregate API Extension - Use Kongregate's API in your HTML5 Games |


#28 hiro-niro

hiro-niro

    GMC Member

  • New Member
  • 707 posts

Posted 06 February 2008 - 07:36 PM

It works with a regular XBox controller right?
  • 0
Permanently left the Game Maker Community.

#29 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 08 February 2008 - 12:43 PM

It works with a regular XBox controller right?

No, not that I'm aware of. The original XB controller doesn't plug into a USB port.
  • 0

#30 Agamez

Agamez

    GMC Member

  • New Member
  • 169 posts

Posted 09 February 2008 - 04:56 PM

Is it possible to make it so that the Xbox360 X-plorer guitar hero controller would work for GM?
  • 0

#31 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 10 February 2008 - 07:36 AM

That's an interesting idea. I would have no idea myself, as I don't own one, but if you'd be willing to, use the joystick diagnostic example below to see if GM's built-in functions will responds to anything from the controller.

http://www.willhostf...hp?fileid=14904

So, run the example, plug in your guitar, and if GM recognizes a controller, information will appear about all the buttons, joysticks etc. You may need to wait a couple seconds for your computer and GM to realize something new has been connected.

If GM does pick up on your controller, press each of the buttons a couple of times to see which button or whatelse responds, and keep track of which corresponds to what. And put this into a list (ie. Button 3 = Blue Button).

Edited by RabbidMickeyMouse, 14 March 2008 - 05:28 PM.

  • 0

#32 Agamez

Agamez

    GMC Member

  • New Member
  • 169 posts

Posted 10 February 2008 - 04:33 PM

Well when i plugged it in, nothing happened. If someone else could try that would be nice... If it matters i have unregistered... sooooo someone else who has it please try.
  • 0

#33 Jared771

Jared771

    GMC Member

  • New Member
  • 190 posts
  • Version:Unknown

Posted 23 February 2008 - 03:46 AM

[quote name='Agamez' date=' Feb 10 2008, 01:22 PM'][quote]Is it possible to make it so that the Xbox360 X-plorer guitar hero controller would work for GM?[/quote]

I don't know if this sort of answers your question or adds anything, but open source program FretsOnFire (GH clone written in Python) can utilise the X-Plorer to play with. That being said, the coding used to make the guitar work with FoF could probably be ported to GML (I have no idea how getting the guitar to work with FoF was accomplished, and don't know how to go about porting said code. Just making a suggestion), allowing it to be used in GM.

Edited by Jared771, 23 February 2008 - 03:50 AM.

  • 0

#34 Agamez

Agamez

    GMC Member

  • New Member
  • 169 posts

Posted 24 February 2008 - 05:59 PM

Well if you could figure out how to do that, that would be awsome!!
  • 0

#35 mfox7

mfox7

    GMC Member

  • New Member
  • 74 posts

Posted 26 February 2008 - 05:11 AM

Hi all.

This all sounds awesome! For me, the thought of using GM games on other consoles is out-of-this-world! For years it's been an off-limits topic in the forums, but if your script works like it sounds, i'm definitely gonna have to check it out! (gotta get GM7 first lol). Nice going!

As far as making consoles goes, you can make your own PC consoles with GM: I made one in GM5 that i'm still developing games for.

One last question: I know NADA about x-box but have been playing PlayStation since it came out. Is there any potential for a GM7-PS2 thing? Just a thought. :)
  • 0

#36 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 07 March 2008 - 11:19 AM

Given that the PS2 controller doesn't have a USB connection, although if I remember right, the PS3 controller charges via a USB cord, and it would be interesting to see if Windows recognizes the controller (and accelerometer data).

The code in this library works with GM's joystick functions, which relies on whether or not Windows recognizes a controller, as opposed to any work arounds, which Lite users can't use.
  • 0

#37 death-droid

death-droid

    GMC Member

  • GMC Member
  • 2600 posts

Posted 07 March 2008 - 12:05 PM

lol Microsoft have probally rigged it so it wont
  • 0

Posted Image


#38 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 07 March 2008 - 12:05 PM

Old Xbox controllers can be rewired to USB. They use a reversed Sidewinder driver, which is available for download.
Nice job, by the way.
People looking for full Xbox 360 support might want to try XInput. I don't know whether your library uses XInput, so please correct me if it does. :)
XInput supports seperate triggers and Force Feedback.
I made a Dll myself. If you're interested, check my sig!
It's better to use RabbidMickeyMouse's library if you don't need it, though.

Keep it up!
  • 0
"Go thy way, eat thy bread with joy, and drink thy wine with a merry heart; for God now accepeth thy works." - Ecclesiastes 9:7

English is not my native language. Please keep this in mind.

"The ruling class has the schools and press under its thumb. This enables it to sway the emotions of the masses." ~Albert Einstein

#39 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 14 March 2008 - 05:29 AM

I fixed a small bug dealing with recognizing the trigger buttons, and added a simple visual display of what buttons are being pressed, showing an XBox controller and a circle showing over any buttons being pressed.

Thanks for the replies, folks. Enjoy.
  • 0

#40 hiro-niro

hiro-niro

    GMC Member

  • New Member
  • 707 posts

Posted 28 March 2008 - 07:15 PM

my version
  • 0
Permanently left the Game Maker Community.

#41 CoolDude330

CoolDude330

    The Cool Guy

  • GMC Member
  • 242 posts

Posted 12 July 2008 - 05:30 AM

This is a fantastic lib, works great with my wireless 360 controller!
  • 0
Registered GM user since 2003

#42 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 12 July 2008 - 06:38 AM

CoolDude, do you happen to have one of those MS adapters for their wireless controllers?
  • 0

#43 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 12 July 2008 - 04:31 PM

can you make this in GML code? i dont like D&D
  • 0
------------------------------------------------------------
Game Maker PRO User!


#44 RabbidMickeyMouse

RabbidMickeyMouse

    GMC Member

  • New Member
  • 241 posts

Posted 13 July 2008 - 06:54 AM

Yup, in fact, I did my work with the 360 controller with scripts first.

// xbox_controller_init();

globalvar XB_A, XB_B, XB_X, XB_Y, XB_RTHUMB, XB_LTHUMB, XB_RSHOULDER, XB_LSHOULDER;
globalvar XB_RTRIGGER, XB_LTRIGGER, XB_BACK, XB_START XB_DPAD;

XB_A = 1;
XB_B = 2;
XB_X = 3;
XB_Y = 4;

XB_RTHUMB_X = 5;
XB_RTHUMB_Y = 6;

XB_LTHUMB_X = 7;
XB_LTHUMB_Y = 8;

XB_RSHOULDER = 9;
XB_LSHOULDER = 10;

XB_RTRIGGER = 11
XB_LTRIGGER = 12;

XB_BACK = 13;
XB_START = 14;

XB_DPAD = 15;

XB_LTHUMB_B = 16;
XB_RTHUMB_B = 17;

// xbox_controller_check(id,button);
// Returns the data concerning the button given

switch argument1
{
 case XB_A : return joystick_check_button(argument0,1);
 case XB_B : return joystick_check_button(argument0,2);
 case XB_X : return joystick_check_button(argument0,3);
 case XB_Y : return joystick_check_button(argument0,4);

 case XB_RTHUMB_X : return joystick_rpos(argument0);
 case XB_RTHUMB_Y : return joystick_upos(argument0);

 case XB_LTHUMB_X : return joystick_xpos(argument0);
 case XB_LTHUMB_Y : return joystick_ypos(argument0);

 case XB_LTHUMB_B : return joystick_check_button(argument0,9);
 case XB_RTHUMB_B : return joystick_check_button(argument0,10);

 case XB_RSHOULDER : return joystick_check_button(argument0,6);
 case XB_LSHOULDER : return joystick_check_button(argument0,5);

 case XB_RTRIGGER : if joystick_zpos(argument0) > 0 then
					{ return joystick_zpos(argument0); } else { return 0; }

 case XB_LTRIGGER : if joystick_zpos(argument0) < 0 then
					{ return abs(joystick_zpos(argument0)); } else { return 0; }

 case XB_BACK  : return joystick_check_button(argument0,7);
 case XB_START : return joystick_check_button(argument0,8);

 case XB_DPAD : return joystick_pov(argument0);
}

Edited by RabbidMickeyMouse, 13 July 2008 - 06:58 AM.

  • 0

#45 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 15 July 2008 - 06:32 AM

good. il try and make my game work whit the controller woude be cool btw my friend made a .gex of this i think. hes name is Khelder.
  • 0
------------------------------------------------------------
Game Maker PRO User!


#46 morno

morno

    GMC Member

  • New Member
  • 193 posts

Posted 16 July 2008 - 04:16 PM

(BUMP) here is the link for the .Gex made by Khelder! (Credit is not nessesery what i know) Khelder only make this into a .Gex so you just can implant it to you'r Game!

http://www.megaupload.com/?d=T6MGGFKJ

Hope i dont have broken some rules. the commands are xb_(whatever) when i search for the Xbox controller setting i just do xbox, and it Shows!
  • 0
------------------------------------------------------------
Game Maker PRO User!


#47 Shade_Games

Shade_Games

    GMC Member

  • New Member
  • 162 posts

Posted 21 July 2008 - 10:54 PM

I know Game Maker only supports two joysticks at a time. Does this limitation apply to 360 controllers as well? If so, is there any way around it?
  • 0

#48 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 1506 posts
  • Version:GM:Studio

Posted 16 September 2008 - 11:29 AM

one word, wicked...
  • 0

Assuming I helped you out in a questions and answers topic won't you return the favour by helping me with one my coding problems, or recommend some one who can chat to me over pms about helping and how to overcome my obstacles, after all lets just say I did help you or them or many people with similar problems, in that topic.

Here i have a topic for those of you struggling with type writer text and mugshots in your games especially if it is a rpg see the link below for more info

http://gmc.yoyogames...howtopic=619103

almost no code needed, only uses two events.

click here for the l8est version of feed the alien pizza, it has some major polished up features.


#49 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 17 September 2008 - 07:33 AM

I know Game Maker only supports two joysticks at a time. Does this limitation apply to 360 controllers as well? If so, is there any way around it?

Since the scripts simply wrap Game Maker's joystick functions, you still have a maximum of two.
  • 0
"Go thy way, eat thy bread with joy, and drink thy wine with a merry heart; for God now accepeth thy works." - Ecclesiastes 9:7

English is not my native language. Please keep this in mind.

"The ruling class has the schools and press under its thumb. This enables it to sway the emotions of the masses." ~Albert Einstein

#50 Johnnsen

Johnnsen

    Braaaains

  • New Member
  • 418 posts

Posted 01 October 2008 - 08:43 PM

There was a way to even get rumble support. I don't know which topic or project it was, but it worked great. Does it work with this one?
  • 0
I can't hear "ZIP FILE PLZ" anymore. Install Winrar or 7zip, it can extract them all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users