Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Much awaited WiiMote plugin!!

Author
Message
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 7th Apr 2009 19:57 Edited at: 14th Jul 2009 21:36
This dll is a wrapper to make the WiimoteLib.dll compatible with dbpro. To use this connect your wiimote by pressing the 1 + 2 buttons then searching on your computer. It should appear as 'Nintendo RVL-CNT-01'.

Once connected run the demo and your wiimote should rumble with flashing leds. You can also press any of the buttons (except power or 1+2 simultaneously). The leds also change with mouse movement and rumble is toggled with mouse movement. Demo supports the nunchuck and guitar extension (guitar hero 3), IR sensor and now features accelerometer graph.

IMPORTANT: For this to work WiimoteLib.dll must be in the same folder as your exe!!

Also just in case people don't know the sensor bar doesn't actually sense at all it's just got infra-red led's inside. The wiimote does all of the sensing.

See index.htm in help files for command list.

Requires .NET Framework 2.0

- Done
- Working on
- Idea/To be looked into

General:
Error handling
Multiple remotes

Wiimote:
Buttons
Rumble
Toggle Rumble
LEDs
Accelerometer
Infra-red sensor

Nunchuck:
Buttons
Joystick
Accelerometer

Classic Controller:
Buttons (Requires testing)
Triggers (Requires testing)
Joysticks (Requires testing)

Guitar:
Type detection (world tour/3) (Requires testing)
Buttons
Joystick
Whammy bar
Fret buttons
Touchbar buttons (Requires testing)

Drums:
Buttons
Joystick
Pads
Pad velocities

Balance Board:
Center of gravity
Sensors (individual) (Kg/Lb/Raw)
Weight (Kg/Lb)

Attachments

Login to view attachments
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 7th Apr 2009 21:16
Great, how getting input from the Wiimote? Also, what about outputting sounds on the Wiimote's speaker?

Everything I needed to know about trigonometry, I learned by becoming a game programmer.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 7th Apr 2009 21:18
I've just coded it to get all the button data just gonna test it then i'll upload. Sound out of the speaker isn't part of the dll it's translating but i requested it other day and as soon as it's available i shall add it.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 7th Apr 2009 21:42
Ok That's been tested and demo has been updated.

First post updated.
Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 8th Apr 2009 00:51
Put together a keywords.ini for you dale...

its attached...

Yours Tv.


Click my signature for free webhosting!

Attachments

Login to view attachments
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 8th Apr 2009 01:54
Groovy... I'll have to incorporate this into my new "DarkWolf" game, check the WIP forums for my Wolfenstein3D thread...

Everything I needed to know about trigonometry, I learned by becoming a game programmer.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 8th Apr 2009 02:03
I've got nunchuck working as well but some of commands are getting so u have to set values specifically so i'm just making some help files but i'm off 22 bed now so will do it in mornin. Look forward 2 seein something use this as it's been talked about for ages but never used.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 8th Apr 2009 05:02
Wow this actually sounds awesome. So many possibilities! How does one go about hooking the WiiMote up to their computer?

<---Spell casting battle game!
Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 8th Apr 2009 06:17
Quote: "How does one go about hooking the WiiMote up to their computer?"


You need a blue tooth adapter. From there, it's actually quite simple.

There's a WiiMote wrapper called Glovepie that lets you assign various tasks to the wiimote's buttons as well as use the Wiimote in a variety of ways. They have instructions on pairing the Wiimote up with the computer in the Glovepie documentation.

http://carl.kenner.googlepages.com/glovepie_download

Everything I needed to know about trigonometry, I learned by becoming a game programmer.
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Apr 2009 06:56
How Are you Getting the input from the remote(like with the wii you use the sensor bar did you somehow connect it to the computer???)

New Site! Check it out \/
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 8th Apr 2009 11:12 Edited at: 8th Apr 2009 11:16
Quote: "So many possibilities!"


Yep! I remembered bout something someone did with head tracking. Once i put IR sensor in if u put 2 leds either side of some glasses and the wiimote above your monitor, you can track where your head is moving in 3 dimensions and move the camera to match Someone should make a game like the old bush shootout from miniclip but with head tracking.

http://www.youtube.com/watch?v=Jd3-eiid-Uw

Quote: "How does one go about hooking the WiiMote up to their computer?"


Just open up your bluetooth and press the 1+2 button on the wiimote. Scan for devices on your computer and 'Nintendo RVL-CNT-01' should appear as a HID device. Just connect to that then run your application.

Quote: "How Are you Getting the input from the remote(like with the wii you use the sensor bar did you somehow connect it to the computer???)"


No i didn't hotwire the sensor bar but this is a gd point. Obviously the wii sensor bar is only on if the wii is on so there's 3 options.

Turn the wii on, buy a battery powered one or make your own

I think i'm just gonna go for the first option atm

Next update will be comin shortly and will give you nunchuck control and some help files i'll look at adding IR next shouldn't be too difficult though.

Anyone think this thread should be anywhere else i wasn't sure when i started it?

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Apr 2009 18:25
oh your using bluetooth lol i wasn't sure how the wiimote connected so ididn't know


i think you put it in the right spot

New Site! Check it out \/
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 8th Apr 2009 21:40
Added guitar extension support, help files, keywords file thanks to Tv-XxX and install file.

zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 8th Apr 2009 23:55 Edited at: 9th Apr 2009 00:00
Are you going to make a version that works with dbc?
Anyway, great effort!

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 9th Apr 2009 00:17
Quote: "Are you going to make a version that works with dbc?"

Will look into it focusing on gettin everything coded for DBPro atm though.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 9th Apr 2009 20:09
Updated first post.

Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 10th Apr 2009 19:37
I can't seem to get it to work. The demo program crashes before anything happens, with a message stating that it has stopped working. The wiimote itself is hooked up fine to the computer via bluetooth (I can control it with GlovePIE). Anyone else having problems or is it just me?
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 10th Apr 2009 21:52 Edited at: 10th Apr 2009 22:00
Don't u love that error message "Stopped working" microsoft are amazin .

Not sure bout that error. i know tv had some problems getting the remote to work but i'm not sure what he did to fix it. I'm working on a better error reporting system atm.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 10th Apr 2009 22:06
@Plotinus

is the Fault Module in your error message kernel32.dll? if so i believe i have recreated the error by accident and have remembered y it is.

This dll translates another dll to make it compatible with DBPro so it looks for the other dll in the working directory. Unless you set this it's the same directory as your exe.

In the downloaded zip there should be a WiimoteLib.dll copy that into the same folder as your exe and it should work fine.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 10th Apr 2009 22:29
Found this picture thought it may come in useful



Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 11th Apr 2009 19:33
No, what happens with me is that it appears to compile, but then instead of anything happening it vanishes and I get:

My Project has stopped working

A problem caused the program to stop working correctly.
Windows will close the program and notify you if a solution is available.

Which isn't very helpful. I'm just trying to run the demo. I've got the dll in the same folder as you specify.

Just in case the problem was unconnected to the dll itself, I tried writing this to test connectivity:



This appears to compile, but doesn't work, giving me the error:

Failed to load DLL (2BPro_WiiMote_Plugin.dll)

But I don't understand why, because I've put DBPro_WiiMote_Plugin.dll into my plugins-user directory. Am I just making some stupid mistake?
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 11th Apr 2009 22:05 Edited at: 11th Apr 2009 22:09
@plotinus

not sure i ran the code you posted and it worked fine. i got a dll with a bit more error handling in which i will update in main post after i've posted this so you could give that a try. if it doesn't crash with new dll i will know the exception so i can trace it through hopefully.

First post updated.

Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 11th Apr 2009 23:10
I'm still getting the same thing, I'm afraid.

I might have just done something wrong with the installation because I'm not very experienced with this sort of thing. It might be best to see if anyone else has this problem - if not then it's just me!
Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 11th Apr 2009 23:22
do you have the "WiimoteLib.dll" in the project folder?

just a thought,

Yours Tv.


Click my signature for free webhosting!
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 11th Apr 2009 23:59
When you say "the project folder", you mean the folder that the project (and the exe) is in, where you would put any media, right? Well that's where it is - I'm trying to run the demo (or my tiny alternative program) from the downloaded Wiimote_Plugin folder, which contains WiimoteLib.dll already. Is that wrong?
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Apr 2009 17:38
Quote: "Are you going to make a version that works with dbc?"


I hope he does! Then I can play SoulHunter with my Wii-mote!!! Well, if you implement it...

@dale2507

Nice work on the DLL, I do hope you make a DLL for DBC too, because I also use DBC.

TheComet

Peachy, and the Chaos of the Gems

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 13th Apr 2009 18:34
@TheComet

Thanks

@All

Can anyone point me to some documentation on DBC plugins?

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 14th Apr 2009 07:46
dbc doesn't have plugins. with dbc you just use load dll and call dll commands.

New Site! Check it out \/
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 14th Apr 2009 16:10
so how do i make it compatible with dbc? do people just need function names, parameters and return values?

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Apr 2009 16:53
I am no expert in that region, but I think that is all it needs.

Peachy, and the Chaos of the Gems

Lucy
17
Years of Service
User Offline
Joined: 19th Apr 2007
Location: Roanoke, VA USA
Posted: 15th Apr 2009 00:31
Quote: "so how do i make it compatible with dbc? do people just need function names, parameters and return values?"


It also needs to not be linked in to any of the DBPro DLL files.

Remember all that time in school that you complained that math is useless and you'll never need to know trig or calc? Guess what. If you're reading this, you need them.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 15th Apr 2009 12:56
It shud work with dbc then i'll add function names when i can be bothered but if you open the dll in notepad all the funciton names are there and the string table shows up so you can see the parameters and return values.

Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 15th Apr 2009 13:49
or you can use something like resHacker and edit the string table and rename the commands to something more memorable

just and idea

Yours Tv

p.s. WiiDrive Game is almost finished


Click my signature for free webhosting!
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 16th Apr 2009 08:00
Ya Return value parameters and names are all we need to use it in dbc. it's really not that hard to do lol. just a little bit more code to write. (the call dll/load dll stuff lol)

New Site! Check it out \/
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 16th Apr 2009 14:36
Quote: "Ya Return value parameters and names are all we need to use it in dbc."


In that case u shud be able 2 use it with dbc. all return values and parameters are in help files that are included in the zip

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 16th Apr 2009 17:16
oh lol sweet thanks!


justmaking sure.

you HAVE to have bluetooth to use this correct?

New Site! Check it out \/
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 16th Apr 2009 18:26
Quote: "you HAVE to have bluetooth to use this correct?"


Yer bluetooth that supports HID devices

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 17th Apr 2009 01:27
ok. Had to make sure

New Site! Check it out \/
Dannyza
15
Years of Service
User Offline
Joined: 14th Apr 2009
Location: west sydney
Posted: 17th Apr 2009 19:00
@ plutonius
are you on vista? if so try nd run dbp as administrator, im on vista and had trouble using .dll plugins and then once i ran as administrator it worked
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 22nd Apr 2009 21:49 Edited at: 22nd Apr 2009 21:50
Been a while since i posted so thought i'd let u no wot i'm doin atm

- Error handling is almost done but need to work out how to return a string and also how to convert the error to the right type of string.
- I was using version 1.6 of WiimoteLib but a newer version was available so i've updated but having a problem with recieving the extension type.
- The old version only supported the fret buttons on the guitar. the new version also supports the touchbar buttons.
- With this version of WiimoteLib there is also support for drums which i will also add to the todo list.
- I've also looked into a type which the dll uses allowing multiple wiimotes and just need to work out how disconnecting works.

Also i don't have a classic controller or guitar (although i have tested guitar hero 3 with tv's guitar) so if anyone has these i will need someone to test any updates for them.

Hopefully i'll have an update for you soon with some of these in.

Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 22nd Apr 2009 22:46
Quote: "@ plutonius
are you on vista? if so try nd run dbp as administrator, im on vista and had trouble using .dll plugins and then once i ran as administrator it worked "


I am on Vista. I wasn't running it as administrator, but I tried it and I still seem to get exactly the same problem. It's a pain as I would really like to use this.

Quote: "Also i don't have a classic controller or guitar (although i have tested guitar hero 3 with tv's guitar) so if anyone has these i will need someone to test any updates for them."


I have both of these - so if I can ever get this to work I'd be happy to test them.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 22nd Apr 2009 23:00 Edited at: 22nd Apr 2009 23:00
@Plotinus

Alright thanks

can you post the extra information that windows gives you when you get the error so i can try and figure out where it's goin wrong pls?

EDIT: 8 more posts to a hot topic!!

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 23rd Apr 2009 00:11 Edited at: 27th Apr 2009 17:09
Ok here is a beta version for anyone wanting to test as i can't. this update changes the values of wm get extension. it also has additional guitar commands and the guitar color button commands have changed. Please follow these instructions otherwise you'll have old files cluttering your system.

1. go to c:/program files/dark basic software/dark basic professional/help
2. delete the wiimote folder
3. extract the zip file
4. run install.bat
5. overwirte any WiimoteLib.dll files in your project folders with the new version (If you don't do this some commands will not work)
6. update the values of wm get extension in your projects
7. compile and run your project

This is a beta version so it hasn't been updated on the first post yet

EDIT: Download deleted. See later post for beta.

Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 23rd Apr 2009 00:48
Just thought i'd post an example i wrote for the Wii Guitar...
Nothing much, just plays all the open strings of a guitar...
Eadgbe

Have fun

Yours Tv.

[url=http:www.samoatesprogramming.co.uk][img=http://img23.imageshack.us/img23/5695/samoatesprogramming.th.jpg][/url]

Attachments

Login to view attachments
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 23rd Apr 2009 21:08 Edited at: 27th Apr 2009 17:07
Alright i believe i've done classic controller as well now but i can't test it so this is a beta once again. would be greatful if someone can confirm that world tour guitar, wm guitar type and classic controller works.

EDIT: Download deleted. see later post for beta.

Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 24th Apr 2009 00:31
What happens is that it seems to compile, but then instead of starting just gives this error:



(I put that in code format so it wouldn't automatically put a smiley in it...)

DBPro_WiiMote_Plugin.dll is present and should be working. In fact if I change its name, the name in the error message changes accordingly. It's failing to load a dll that the dll is calling, presumably the WiimoteLib.dll. But that is exactly where it should be, in the project folder. In fact I've copied it to pretty much everywhere to be on the safe side. I'm running Vista, 32-bit. I'm also running DBPro in administrator mode, and I've tried running it in compatibility mode (XP) as well, but none of this makes any difference. I haven't had any problems with any other dlls.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 24th Apr 2009 00:56
@Plotinus

Hmm... i seem to remember having the same problem but can't remember how i fixed it. i'm runin same apart from i have UAC (them annoyin popups) turned off so everything gets run as an administrator.

I've attached the latest version and the install.bat should remove any old files. if you want to disable UAC iit's in user accounts in control panel. it's not to do with loading WiimoteLib because that flags up a windows error with kernel32.dll so it's something to do with dbpro loading in the dll i think.

I'll keep trying to reproduce it an find a solution.

@All

Attached is another Beta version. Balance board commands have been added and fully tested but i'm waiting on confirmation of working guitar or classic controller commands before i put it in first post. I am also planning to add a version number soon

Attachments

Login to view attachments
Plotinus
15
Years of Service
User Offline
Joined: 28th Mar 2009
Location:
Posted: 26th Apr 2009 17:53
Unfortunately there is no difference! A complication here is that I seem to be getting two distinct problems. There's the error I mentioned in my previous post. But also the demo program, and the exe provided in the latest download, simply crash without starting at all (as I described in my post immediately following your diagram of the wiimote). That's why I tried writing my own tiny test code. I don't know if these two problems are related or if that information helps.
dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 26th Apr 2009 18:09
hmm... This has me stumped. i no in the latest upload i forgot 2 put the wiimotelib.dll in with the project so sorry if that's the problem with the demo otherwise only other thing i can think of is if u've paired more than 1 wiimote with your system it gets the HID Path of the first wiimote it encounters and attempts to connect to that but it should catch that. i'll try compiling your test code and uploading the exe and dll then we'll no if it's something to do with the plugin or some system setting.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 26th Apr 2009 18:25 Edited at: 26th Apr 2009 18:30
Ok i've expanded on your code a bit but it's still extremely simple. Here's the code just so u no wot it's doin.



delete all of your bluetooth pairings with wii devices then run extract the zip and run Wiimote Sinple Test.exe then connect the wiimote and after 1/2 seconds it should change to wiimote connected. otherwise try runing the wiimote test. that's the demo that comes with the wiimotelib.dll if that flags errors it displays the message of the error which i havn't figured out how to return yet

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 11:27:44
Your offset time is: 2024-11-24 11:27:44