Game Development Community

dev|Pro Game Development Curriculum

Prelim Wiimote Integration Posted

by Vinh Tran · 04/02/2007 (8:48 pm) · 8 comments

Been out of town for a bit so I haven't had a chance to get this out like I wanted.

This is just some prelim work. The Code currently supports all buttons (wiimote + chuck) and the acceleration of the wiimote in the x,y,z. It will return this as a Calibrated Value. -X to X, with 0 being no force. Gravity counts as a force, btw.

This particular integration modifies the Torque 1.5 starter.racing example game just to show what can be done quickly.

You should be able to tilt the remote towards you and use the [1] and [2] buttons for accel/brake. Turning the remote like a steering wheel will turn the car.

You will need some sort of USB bluetooth adapter and your wiimote needs to be connected to it before running the racing demo. I won't go over how to do this (its pretty easy) because there are many different adapters available.

My goal is to fully integrate and then do some development.

My todo list includes IR, Chuck Accel, Speaker, LEDs, and Port stuff.

I love discussions on the topic, feedback, or just general interest. I'm also open to PC Wii gameplay ideas to integrate. Hit me up at tranvv@gmail.com

----

Usage:

There are 4 new files to add to the project in the platformWin32 directory:

hiddevice.cpp/.h
wiimote.cpp/.h

These files come from Kevin Forbes (http://simulatedcomicproduct.com) and have been flagged as public domain.

I've included Diffs of all my code changes in PDF format. This should make it a ton easier to integrate. You should be able to copy and paste from Adobe Reader.

I've also included the 4 new files, remember to add them to your project.

***See thread in Private SDK Engine area for code/diffs ***

Thread located here:
http://www.garagegames.com/mg/forums/result.thread.php?qt=60044

#1
04/03/2007 (7:24 am)
I have to admit, I love what I see here. But my question is whats next? We get the wii motes working ( and by we I mean you) How do we get a game on the Wii?
#2
04/03/2007 (8:44 am)
As I see it, there is not a direct link between this resource and getting a game on the Wii since it does not use any of the official Nintendo SDK (which means it would have to be ported). BUT it opens up a huge amount of control variability, prototyping potential, and demo potential to pimp your idea once it is polished. It's not a direct-to-Wii solution (nor do I think it was ever meant to be one), but it is definitely one damn cool way to implement Wii-styled gameplay on the computer.
#3
04/03/2007 (12:34 pm)
I have not been following the forums or rumors mills latley I have been busy missing my own release date, has there been talk of Wii Torque? I would assume it would be a modified engine that has the sdk built into it.
#4
04/03/2007 (2:06 pm)
There's nothing official, but there's all kinds of talk (as always). But projects like this make it possible for developers to create content that uses the same interface as the Wii to demo, get money, and hopefully a devslot (or at least get their foot in a door).
#5
04/03/2007 (3:15 pm)
Vinh, I've finally getting the decks cleared. Email me if you've got time to discuss merging our codebases so there's just one resource for both Mac and PC TGE/A.
#6
04/05/2007 (9:44 am)
Vinh, did you use an external adapter to get Bluetooth on your PC, or did it come built-in? I have a Dell 9300 that I was stupid enough to buy without the built-in Bluetooth, and now it is no longer available as an add-on. I'd love to get this going on my 9300.
#7
04/05/2007 (12:06 pm)
Hello author of a great book.

I purchased a Toshiba stack usb bluetooth adapter for under $20 at compusa. Not exactly sure of the model number right now. Like you, my machine did not come with any sort of bluetooth adapter built-in.

Feel free to let me know if you get this working, I'm always interested on feedback as I press on.
#8
10/08/2007 (6:47 am)
I made a video for the demo on how the wiimote integration do.

http://www.youtube.com/watch?v=cqQVVIr9Mtk

The feeling is quite good actually. Thank you Vinh Tran.