by date
Wii Remote Control in TGE is Working
Wii Remote Control in TGE is Working
| Name: | Rob Terrell | |
|---|---|---|
| Date Posted: | Dec 15, 2006 | |
| Rating: | 4.8 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Rob Terrell |
Blog post
Hey, I've finally got something to blog about. So yeah, I got a Wii. You know, it's for the kids! It's not for me, honest, honey!
I was talking to a co-worker about the Wii, and we came up with a great idea for a Wii game. But, how to protoype such a thing?
When I got the Wii, I also got some extra controllers. One of those was for me. After following the progress of folks reverse-engineering and coding for the Wii remote I decided to try to hack some Wii remote support into TGE. You know, for the kids.
So far: it's working! And it's fun. Take a look at www.youtube.com/watch?v=o-5mlzf9KxQ
or a high-quality the screen capture movie (9 MB QuickTime). Ignore the dead-tired looking dweeb in the corner (he's actually having fun, that's how he shows it) and focus on the Wii remote in his hand. You can also see some of the console debugging in the background.

I don't have the left-right control as fine as I'd like it, but it's just a matter of fooling with it.
Edit: added YouTube video link.
See, I'm serious about TGE. Now, finally, for the love of god, won't someone let me join the Constructor beta?
I was talking to a co-worker about the Wii, and we came up with a great idea for a Wii game. But, how to protoype such a thing?
When I got the Wii, I also got some extra controllers. One of those was for me. After following the progress of folks reverse-engineering and coding for the Wii remote I decided to try to hack some Wii remote support into TGE. You know, for the kids.
So far: it's working! And it's fun. Take a look at www.youtube.com/watch?v=o-5mlzf9KxQ
or a high-quality the screen capture movie (9 MB QuickTime). Ignore the dead-tired looking dweeb in the corner (he's actually having fun, that's how he shows it) and focus on the Wii remote in his hand. You can also see some of the console debugging in the background.

I don't have the left-right control as fine as I'd like it, but it's just a matter of fooling with it.
Edit: added YouTube video link.
See, I'm serious about TGE. Now, finally, for the love of god, won't someone let me join the Constructor beta?
Recent Blog Posts
| List: | 08/09/08 - iPhone games! 04/08/07 - TGWii Code 12/21/06 - Wii Remote Beta Binary 12/18/06 - Wii Remote + IR Sensor Bar 12/15/06 - Wii Remote Control in TGE is Working |
|---|
Submit your own resources!| Jeremy Alessi (Dec 15, 2006 at 04:46 GMT) |
| Gary "ChunkyKs" Briggs (Dec 15, 2006 at 04:56 GMT) |
I presume you've attached it to the mouse since you're using OSX and joystick code doesn't work? Or did you write a separate joystick/wiimote handler?
Gary (-;
| Vashner (Dec 15, 2006 at 05:00 GMT) Resource Rating: 5 |
edit: After reading it again. There is a market for new controllers for pc's and consoles.
Wii has a problem with extending the carpel but it's new thinking. Just would be good to see some folks invent some new controllers other than the old kiddie plastic ones that have been around for a while.
Edited on Dec 15, 2006 05:02 GMT
| Rob Terrell (Dec 15, 2006 at 05:02 GMT) |
Right now it listens to the motion sensor for X and Y axis movement, and translates that into mouse movements: SI_XAXIS and SI_YAXIS events that are fed in via Game->postEvent(event). I've started support for the A and B buttons but I wasn't sure if I should make them into some new kind of keypress, or map them onto an existing keyboard character. Right now, A = space and B = return.
I thought about implementing the Wii stuff in the joystick functions, but I'm not sure how that all ties together. There seem to be assumptions throughout the code that Macs don't support joysticks. Now that the basic stuff is working, I'll probably migrate the code over and call it a joystick.
Also I'm planning on adding sensor bar support, so navigating GUIs is easier.
Edited on Dec 15, 2006 05:11 GMT
| Charles B (Dec 15, 2006 at 05:15 GMT) |
I was thinking of getting a bunch and making a poor man's bone/skeleton motion capture rig with duct tape.
| Todd Pickens (Dec 15, 2006 at 05:16 GMT) |
| Ian Roach (Dec 15, 2006 at 05:28 GMT) |
| Edward F. Maurina III (Dec 15, 2006 at 05:40 GMT) Resource Rating: 4 |
Rock on!
EdM|GPGT
| Matthew Spindle Harris (Dec 15, 2006 at 05:48 GMT) |
| Joshua Dallman (Dec 15, 2006 at 05:54 GMT) |
| Dreamer (Dec 15, 2006 at 06:44 GMT) |
Congrats anyways.
Regards,
Dreamer
| Rob Terrell (Dec 15, 2006 at 06:55 GMT) |
| Aaron E (Dec 15, 2006 at 08:35 GMT) |
Cool, I almost bought a wii controller the other day, just to see if I could find a use for it in TGE. Now it looks like I have no other choice.
:)
| Tom Bentz (Dec 15, 2006 at 10:14 GMT) |
| Samuel Nova (Dec 15, 2006 at 11:13 GMT) |
Then someone just have to make it work with TorqueX, so we can use it with the XBox 360 ;)
Regarding "the dead-tired looking dweeb", man, he should be a poker player....
| Mincetro (Dec 15, 2006 at 11:32 GMT) |
| Anthony (Dec 15, 2006 at 12:02 GMT) |
| Samuel Nova (Dec 15, 2006 at 12:06 GMT) |
| Rob Terrell (Dec 15, 2006 at 13:05 GMT) |
As for the sensor bar -- the current code doesn't use one, but I hope to add it today. I went to radio shack and bought a couple of infrared ($1.99 each) LEDs. Each is wired to its own a AA battery and taped to the top of my powerbook lid. Incredibly lousy engineering, but it should work well enough to get into the game.
@Tom: It took about two hours to get to this point, but I started from a working example (http://sourceforge.net/projects/darwiin-remote/). Most of the time was spent trying to figure out how to properly call the Cocoa bluetooth APIs from Carbon. Also, the Cocoa code throws a SIGALRM (you can see it in the console output) and I had to figure out why that was happening -- it was the innocuous timing out of the bluetooth discovery, Cocoa throws signals for all kinds of stuff -- and catch it.
Cocoa requires some initialization stuff (creating an allocation pool) that nothing else in TGE needs, so I'll probably switch the code to Carbon. I hope to make a more abstract bluetooth library that can be implemented on both platforms. Unless I get lots of free time, I'll leave the Windows implementation to somebody else. You windows guys are always leaving us Mac guys hanging on implementation of fun stuff, so now it's payback time. ;)
And I've got to get our TGB game finished. This freelancing from the project milestones is going to get me in trouble.
| Anthony Rosenbaum (Dec 15, 2006 at 14:28 GMT) |
| Paul Dana (Dec 15, 2006 at 14:30 GMT) |
| Donald \"Yadot\" Harris (Dec 15, 2006 at 14:47 GMT) |
| Adam deGrandis (Dec 15, 2006 at 16:54 GMT) |
| JamD (Dec 15, 2006 at 16:57 GMT) |
| Jeppie (Dec 15, 2006 at 18:24 GMT) |
Here's some good laughs for the Wee-ites
http://www.wiidamage.com/
| Clint Herron (Dec 15, 2006 at 22:22 GMT) |
Very well done!
Edited on Dec 15, 2006 22:23 GMT
| Ron Yacketta (Dec 16, 2006 at 02:29 GMT) |
| Jeff (Dec 16, 2006 at 06:27 GMT) |
| Casey Weidner (Dec 16, 2006 at 20:20 GMT) Resource Rating: 5 |
Edited on Dec 16, 2006 20:20 GMT
| Josh Williams (Dec 16, 2006 at 20:23 GMT) |
Hopefully you'll release a resource + tutorial once you get this thing all polished up! Kick ass!
| Florian (Dec 17, 2006 at 00:24 GMT) |
this is totaly amazing, imagine making wii games with torque
imagine the possibilities
image the perfect first person shooter with torque 0.o
me need to get a wii-mote :D
but i have some questions
is this also windows compactible?
and are you going to post this as a resource?
And do u only need a wii-mote to get this working or some bluetooth devices or a actual wii?
and will it be legal to make a game where u need a wimote for withouth having to ask for a licence to nitendo?
keep working on this, damn awesome man :D
You must be a member and be logged in to either append comments or rate this resource.


4.8 out of 5


