Game Maker Community: Wiimote Control - Game Maker Community

Jump to content

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Wiimote Control Use the Wiimote in your Game Maker Game

#1 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 29 June 2009 - 02:12 PM

WiiMote Control
Use the Wiimote in your Game Maker Game
Support multiple Wiimotes!

Need: :GM7: pro, I don't have test it on other versions.
.Net FrameWork
Bluetooth stack
Bluetooth software (Bluesoleil has problems, but I have Bluesoleil 6, has no problems)

The functions:
WM_ConnectWiiMotes() 
Call this function first.
Returns number of Wiimotes
WM_DisconnectWiiMotes()
Call this function on the end.
WM_SetRumble(WiiMoteId,Rumble)
Rumble or not (true/false)
WM_SetLeds(WiiMoteId,Led1,Led2,Led3,Led4)
Led1 to 4: on or off (true/false)
Balance Board: led 1 is the led on the Power Button
WM_GetButton(WiiMoteId,button)
button: see in script (A is the same as the Power Button of Balance Board)
WM_CheckExtension(WiiMoteId)
Gets the extension:
0 Noone (I think)
2753560576 Nunchuck
2753561602 BalanceBoard
WM_CheckBattery(WiiMoteId)
Gets the battery level (0: empty, 200: full)
WM_GetAccelX,Y,Z(WiiMoteId)
Gets the Accel: about -1 to 1
WM_Nunchuck_GetAccelX,Y,X(WiiMoteId)
Gets the Accel: about -1 to 1
WM_Nunchuck_GetJoyStickX,Y(WiiMoteId)
Gets the Joystick Values
WM_Nunchuck_GetButton(WiiMoteId)
See script
WM_BalanceBoard_GetWeight(WiiMoteId,position)

See script
WM_BalanceBoard_GetCenterOfGravity(WiiMoteId,XorY)

XorY: 0= Get X, 1 = Get Y
WM_IR_Exists(WiiMoteId,SensorId (0 to 3)
WM_IR_X(WiiMoteId,SensorId (0 to 3)
WM_IR_Y(WiiMoteId,SensorId (0 to 3)
WM_IR_Size(WiiMoteId,SensorId (0 to 3)


How to connect:

Quote

Start up your Bluetooth software and have it search for a device.
Hold down the 1 and 2 buttons on the Wiimote. You should see the LEDs at the bottom start flashing. Do not let go of these buttons until this procedure is complete. If pairing the Wii Fit Balance Board, open the battery cover on the underside of the balance board and hold the little red sync button.
Wiimotes should show up in the list of devices found as Nintendo RVL-CNT-01. Balance Boards will show up as Nintendo RVL-WBC-01. If it's not there, start over and try again.
Click Next to move your way through the wizard. If at any point you are asked to enter a security code or PIN, leave the number blank or click Skip. Do not enter a number.
You may be asked which service to use from the Wiimote. Select the keyboard/mouse/HID service if prompted (you should only see one service available).
Finish the wizard.
from http://blogs.msdn.com/coding4fun/archive/2...14/ 1879033.aspx


:rambo It's my first DLL!!!
If you find Issues :( , tell me!
Later I make (maybe) support for the Guitar from Guitar Hero: World Tour and the classic Controler, but I can't test that, I don't have one :o

Thanks to: :D
Brain Peek, for his WiiMoteLib
Freaked, for his help on GMC
The Cool Gamer, for his GM .net layer

:P Download :P (Tab Downloads,WiiMoteControl3.zip)

Dutch version

Update 1:
IR is now supported.

Update 2:
The balance board works now correct.

:P Mr. Wolf :P

This post has been edited by Mr. Wolf: 30 July 2009 - 09:42 AM

0

#2 User is offline   Revel 

  • Revel Entertainment
  • Group: GMC Member
  • Posts: 4154
  • Joined: 03-February 07

Posted 29 June 2009 - 08:36 PM

This has already been done here, but maybe this one is better. I don't have a wii remote but good luck :D
0

#3 User is offline   Caniac 

  • The #1 Caniac
  • Group: GMC Member
  • Posts: 2598
  • Joined: 25-January 08

Posted 29 June 2009 - 08:46 PM

does this support the wiimotes speaker,
and does it support MULTIPLE wiimotes?
how about the IR bar? if so, this pwns!

But like Revel says, there is already a wiimote gex that can do most of the stuff listed above.

This post has been edited by Caniac: 29 June 2009 - 08:47 PM

0

#4 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 30 June 2009 - 06:25 AM

It doesn't support sound, but it DOES SUPPORT MULTIPLE WIIMOTES!!! (Giimote only in beta)
Now it supports IR :P
:P Mr. Wolf :D

This post has been edited by Mr. Wolf: 05 July 2009 - 02:36 PM

0

#5 User is offline   tdmgames 

  • GMC Member
  • Group: GMC Member
  • Posts: 1641
  • Joined: 18-February 06

Posted 30 June 2009 - 11:10 PM

Cool, I will be checking this out tomorrow. Giimotes creator kinda stopped working on it I think... InfraRed would be good, and speaker also. I will be watching this very closely :)
0

#6 User is offline   Spikehead777 

  • GMC Member
  • Group: GMC Member
  • Posts: 401
  • Joined: 13-October 03

Posted 01 July 2009 - 09:55 AM

Sweet. I'm not using this right away, but I may later. It depends on how far one of my current projects goes.

If you need information on where you can find tech specs for the GH:WT guitar or drums or the GH3 guitar, as well as the nunchuck, Wii Motion Plus, or classic controller, let me know, I'll PM it to you.

It'd be nice being able to play a game or two with built-in Wiimote support instead of having to use GlovePIE and PPJoy together to emulate key presses or joystick button presses. XD
0

#7 User is offline   Caniac 

  • The #1 Caniac
  • Group: GMC Member
  • Posts: 2598
  • Joined: 25-January 08

Posted 01 July 2009 - 04:17 PM

Oh Boy!!!
I am very excited about this, perhaps you can add IR and sound soon? :huh:

Oh Cool, IR is supported now too? wow, this is geting even better then ever!

This post has been edited by Caniac: 01 July 2009 - 04:20 PM

0

#8 User is offline   ApplePiePod 

  • GMC Member
  • Group: GMC Member
  • Posts: 379
  • Joined: 04-January 08

Posted 01 July 2009 - 08:38 PM

The balance board functions do not seem to work.
0

#9 User is offline   michael pw 

  • GMC Member
  • Group: GMC Member
  • Posts: 824
  • Joined: 04-March 09

Posted 01 July 2009 - 08:49 PM

whats IR?

i used a script to make asort of laser pointer with giimote using the acceloerometers, just some hints for the people using this.
0

#10 User is offline   Caniac 

  • The #1 Caniac
  • Group: GMC Member
  • Posts: 2598
  • Joined: 25-January 08

Posted 01 July 2009 - 11:30 PM

InfaRed, like the wii sensor bar.
0

#11 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 02 July 2009 - 06:13 AM

View PostApplePiePod, on Jul 1 2009, 10:41 PM, said:

The balance board functions do not seem to work.

I see,
After update 2 it should work, please try that out.

:skull: Mr. Wolf :)

This post has been edited by Mr. Wolf: 02 July 2009 - 09:39 AM

0

#12 User is offline   MetroidMan347 

  • GMC Member
  • Group: GMC Member
  • Posts: 719
  • Joined: 13-May 08

Posted 03 July 2009 - 04:16 AM

My bluetooth connection doesn't work. :whistle: The Wii Remote just keeps blinking... And blinking and blinking and blinking and... you get the idea. Not that I could use it anyway, I don't have Pro. :unsure: lol
0

#13 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 03 July 2009 - 05:38 PM

View PostMegaManFan1, on Jul 3 2009, 06:19 AM, said:

My bluetooth connection doesn't work. :P The Wii Remote just keeps blinking... And blinking and blinking and blinking and... you get the idea. Not that I could use it anyway, I don't have Pro. :P lol

It should blink!

:rambo Mr. Wolf :P
0

#14 User is offline   Caniac 

  • The #1 Caniac
  • Group: GMC Member
  • Posts: 2598
  • Joined: 25-January 08

Posted 03 July 2009 - 05:40 PM

View PostMr. Wolf, on Jul 3 2009, 01:41 PM, said:

View PostMegaManFan1, on Jul 3 2009, 06:19 AM, said:

My bluetooth connection doesn't work. :P The Wii Remote just keeps blinking... And blinking and blinking and blinking and... you get the idea. Not that I could use it anyway, I don't have Pro. :P lol

It should blink!

:rambo Mr. Wolf :P

it blinks, until you use the led set function.
0

#15 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 03 July 2009 - 05:58 PM

View PostCaniac, on Jul 3 2009, 07:43 PM, said:

View PostMr. Wolf, on Jul 3 2009, 01:41 PM, said:

View PostMegaManFan1, on Jul 3 2009, 06:19 AM, said:

My bluetooth connection doesn't work. :P The Wii Remote just keeps blinking... And blinking and blinking and blinking and... you get the idea. Not that I could use it anyway, I don't have Pro. :P lol

It should blink!

:rambo Mr. Wolf :P

it blinks, until you use the led set function.

If you call WM_ConnectWiiMotes() Wiimote 1 led 1 is on, Wiimote 2 led 2 is on...
0

#16 User is offline   Caniac 

  • The #1 Caniac
  • Group: GMC Member
  • Posts: 2598
  • Joined: 25-January 08

Posted 03 July 2009 - 06:42 PM

thats odd, my wiimotes won't work! but they work fine when I use the other wiimote program.
0

#17 User is offline   Mr. Wolf 

  • GMC Member
  • Group: GMC Member
  • Posts: 31
  • Joined: 27-June 09

Post icon  Posted 03 July 2009 - 06:47 PM

View PostCaniac, on Jul 3 2009, 08:45 PM, said:

thats odd, my wiimotes won't work! but they work fine when I use the other wiimote program.

My wiimotes work fine!

:rambo Mr. Wolf :P
0

#18 User is offline   tdmgames 

  • GMC Member
  • Group: GMC Member
  • Posts: 1641
  • Joined: 18-February 06

Posted 03 July 2009 - 06:47 PM

View PostCaniac, on Jul 3 2009, 08:45 PM, said:

thats odd, my wiimotes won't work! but they work fine when I use the other wiimote program.


Try reconnecting WiiMotes...
0

#19 User is offline   pixelpig 

  • GMC Member
  • Group: GMC Member
  • Posts: 708
  • Joined: 26-July 08

Posted 03 July 2009 - 07:46 PM

View PostMr. Wolf, on Jun 30 2009, 07:28 AM, said:

It doesn't support sound, but it DOES SUPPORT MULTIPLE WIIMOTES!!! (Giimote not)
Later I make IR :rambo
:P Mr. Wolf :P

Incorect the latest giimote does do multiple wiimotes. (BETA)

View Posttdmgames, on Jul 1 2009, 12:13 AM, said:

Cool, I will be checking this out tomorrow. Giimotes creator kinda stopped working on it I think... InfraRed would be good, and speaker also. I will be watching this very closely :P

Giimotes creator is having a few problems.
0

#20 User is offline   MetroidMan347 

  • GMC Member
  • Group: GMC Member
  • Posts: 719
  • Joined: 13-May 08

Posted 03 July 2009 - 09:36 PM

When I hook it to my bluetooth it doesn't stop blinking even when I run my test program. It SHOULD light up LEDs 1 and 3 when I press A, and 2 and 4 when I press B. Instead it just keeps blinking and... well... you know the rest from my earlier post. I'm sure it's great sooooooo... good job making a DLL.
0

Share this topic:


  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users