by date
Wiimote TGE 1.5 Integration Day 2
Wiimote TGE 1.5 Integration Day 2
| Name: | Vinh Tran | |
|---|---|---|
| Date Posted: | Mar 12, 2007 | |
| Rating: | 3.0 out of 5 | |
| Public: | NO | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Vinh Tran |
Blog post
(using this blog to journal my work)
I've taken the source from cWiimote, applied a fix for the Toshiba Bluetooth Stack, and have added it to the platformWin32 directory and the TGE project.
The cWiimote class encapsulates all of the wiimote code and our only job is to call a HeartBeat() function to update the current state of the wiimote. At the moment I have put the call to this function within a process method that gets called in the normal game loop. Afterwards, we can pull out the state of any button on either the wiimote or the nunchuck. We can also pull out the state of the accelerators in either device. I have not tested the IR yet, but I will do that after I get everything else running.
All of the code is in place and I have the buttons working within TorqueScript once I set them up as binds to the GlobalActionMap.
Since i'm not an artist, i'm looking for a 3d model of the wiimote that I can add to the game world. Once the implementation is complete I want to release it as a resource with a sample app that puts the wiimote model in the game world and attempts to mimic whatever the user is doing with the real wiimote. If someone has a little free time I'd appreciate a model I can drop in. tranvv@gmail.com
Summary: The wiimote is functional within TGE. Now I just need to pretty it up and add in the rest of the functionality.
Todo:
support for all buttons and acceleration
support for IR
support for expansion port connection identification (unplugging/plugging in the chuck)
support for setting rumble and lights
support for multiple wiimotes
support for detection of connection of wiimote
I've taken the source from cWiimote, applied a fix for the Toshiba Bluetooth Stack, and have added it to the platformWin32 directory and the TGE project.
The cWiimote class encapsulates all of the wiimote code and our only job is to call a HeartBeat() function to update the current state of the wiimote. At the moment I have put the call to this function within a process method that gets called in the normal game loop. Afterwards, we can pull out the state of any button on either the wiimote or the nunchuck. We can also pull out the state of the accelerators in either device. I have not tested the IR yet, but I will do that after I get everything else running.
All of the code is in place and I have the buttons working within TorqueScript once I set them up as binds to the GlobalActionMap.
Since i'm not an artist, i'm looking for a 3d model of the wiimote that I can add to the game world. Once the implementation is complete I want to release it as a resource with a sample app that puts the wiimote model in the game world and attempts to mimic whatever the user is doing with the real wiimote. If someone has a little free time I'd appreciate a model I can drop in. tranvv@gmail.com
Summary: The wiimote is functional within TGE. Now I just need to pretty it up and add in the rest of the functionality.
Todo:
support for all buttons and acceleration
support for IR
support for expansion port connection identification (unplugging/plugging in the chuck)
support for setting rumble and lights
support for multiple wiimotes
support for detection of connection of wiimote
Recent Blog Posts
| List: | 04/03/07 - Prelim Wiimote Integration Posted 03/12/07 - Wiimote TGE 1.5 Integration Day 2 03/09/07 - Working on Wii for Torque 07/20/06 - Guitar Hero PC Clone Version 0.2 07/17/06 - PC Guitar Hero Clone Prototype Release 06/05/06 - Progress 06/01/06 - XML Data 05/31/06 - Playing Catchup |
|---|
Submit your own resources!| Eric Schuld (Mar 12, 2007 at 15:54 GMT) |
Also curious what you are using for your IR detection - I noticed the other person on these forums made one using like $7 in radio shack parts. Will you be doing the same thing? If so - will you provide instructions for those of us who are not so Radio Shack inclined. :)
Lookin' good though!
-eric schuld
| Vinh Tran (Mar 12, 2007 at 18:35 GMT) |
As for IR i haven't considered it yet, may just whip out the candles!
| Tom Bentz (Mar 12, 2007 at 19:22 GMT) |
| David Higgins (Mar 12, 2007 at 19:54 GMT) |
The Wii Remote's functionality would make PC games so much more fun ... and with the added abilities that PC games have over console games ... wow oh wow (simple to integrate network support, cross-communication between applications, faster storage performance [I/O Speed, More Disk Space]) ...

| Clint Herron (Mar 12, 2007 at 20:06 GMT) |
As far as a model of the Wiimote, I think that's a great idea -- for my RagWii'd program, I have a little *very* cheesy model of a Wiimote that tilts in a way that mimics what the user is doing.

The model is just drawn in code with numbers for vertices and whatnot. The buttons change color to hilight when the user presses the buttons.
If I were better with the Torque exporters, I'd offer to make you a model, but I'm primarily a programmer and very secondarily I'm an artist. Maybe I'll still give it a shot though if nobody else jumps on this.
Thanks for the update! I'm pretty excited. :)
--clint
Edited on Mar 12, 2007 20:13 GMT
| Aarone (Mar 12, 2007 at 20:25 GMT) |
| Eric Schuld (Mar 12, 2007 at 20:38 GMT) |
@Vinh and Clint - explain more about "candles" and IR input. :) I'm new to this. I found this on another page:
"Instead of using the usual Wii remote bar thingy on top of his screen, he uses two candles as IR emitters, allowing him to use the Wiimote without the bar."
Does the IR really work if you setup 2 candles? Like on this link:
www.techeblog.com/index.php/tech-gadget/wiimote-ir-candles-demonstration
Edited on Mar 12, 2007 20:41 GMT
| Clint Herron (Mar 12, 2007 at 20:51 GMT) |
| Eric Schuld (Mar 12, 2007 at 21:07 GMT) |
So am I right then that the Wii itself doesn't receive anything from the IR bar - rather the IR bar you set on the TV transmits an IR signal that the WiiMote actually picks up? And since there are 2 transmission points the WiiMote can determine where it is pointing from that?
| Clint Herron (Mar 12, 2007 at 21:35 GMT) |
| Aarone (Mar 13, 2007 at 00:48 GMT) |
www.aaronellis.net/wiimote.obj
(Right click to save file as)
Here is a wireframe pic of the object . . .

It's kind of heavy on the polygons at around 1200 triangulated, it's not textured, and it's no-where near perfect, but I'm not charging anything for it. :)
| Peter Robinson (Mar 13, 2007 at 15:25 GMT) |
| Clint Herron (Mar 13, 2007 at 15:35 GMT) |
@Peter: I'm not for sure on this, but I *think* that it's looking for two IR light sources that are high output and relatively close together (4-6 inches or something, I'm not sure what the limit is for the Wii). If you just have one candle, I haven't been able to get the Wiimote to recognize it, it really needs to be 2 points. So if you had scattered candles it probably wouldn't screw with the WiiMote, but if you had a menorah with 2 of the candles lit, that might screw with it, yes. :)
Edited on Mar 13, 2007 15:36 GMT
| Aarone (Mar 13, 2007 at 19:10 GMT) |
:)
| Eric Schuld (Mar 13, 2007 at 19:35 GMT) |
| Randy Condon (Mar 15, 2007 at 17:22 GMT) |
I'd love to seet the code as a download prior to a resource becoming available. (If possible).
| Vinh Tran (Mar 16, 2007 at 15:22 GMT) |
@D Higgins:
You can go grab a bluetooth adapter now and download GlovePIE to convert your wiimote into any keyboard/jstick/mouse commands. This is a great solution to create a highly customizable wiimote-pc conversion.
Edited on Mar 16, 2007 15:26 GMT
You must be a member and be logged in to either append comments or rate this resource.


3.0 out of 5


