Revolutionary: Introducing GlovePIE
Every Tuesday, Mike Sylvester brings you REVOLUTIONARY, a look at the wide world of Wii possibilities.
The Wii Remote is destined to go down in history as one of those revolutionary advancements that forever changed video gaming. But with the game industry being a business first and foremost, developers are often pigeonholed into sticking with what's proven to work and sell. In recent years, it has been primarily left to the small developers to deliver the big innovations and take the big risks, and homebrew communities are becoming a breeding ground for bucket-loads of innovative gaming experiences.
There is a growing community of hobbyists and weekend coders that are grabbing their Wiimotes and Nunchuks and working to virtually wring out every last drop of potential in these unique new interfacing devices. I'd like to welcome you into that community and give you the tools and resources to start enjoying the fruits of their labors, and even get involved in the creative process.
In this article, I'll be focusing on getting started with GlovePIE, but there are other programs that use the Wii Remote, or translate its input. WiinRemote is a fun program to start off with. Its primary function is to turn your Wiimote into a virtual mouse, but it also gives you a visualization of what the Wiimote is detecting when you motion with it, and what its IR sensor "sees".
GlovePIE
GlovePIE is an easy-to-use application which, through the running of custom scripts, allows input from the Wii controllers to emulate another form of input, such as a keyboard or a mouse. Carl Kenner originally developed GlovePIE as a tool to get his P5 Glove to work however he wanted, in whatever programs he wanted, and with the advent of the Wii Remote, he saw that his program could be modified to support it as well. Through GlovePIE, the Wii Remote's buttons and D-pad, tilting and motions, or full gestures can be mapped to keyboard keys, mouse movements, or virtual joystick controls (more on this later).
Writing scripts for GlovePIE doesn't require any heavy programming experience – though having some doesn't hurt, either. It's designed to be user-friendly, and since it's rather lenient about syntax, it's easy for BASIC, Java, or C programmers to make the switch. But even if you've got no programming experience at all, there is still hope. There is a large community of GlovePIE scripters across the net, and many of them are willing to share some tips and code with novices. You can try to figure out how things work by picking apart some of the Wiimote scripts that come bundled with GlovePIE, but if it all reads like Martian to you, don't worry -- you can use the GUI and let GlovePIE bang out some script code for you. For instance, if you want to have the "Enter" key pressed whenever you shake the Nunchuk, simply shake the Nunchuk while GlovePIE is in detection mode, and then tell it to hit the "Enter" key for that motion. Writing a script really can be that easy!

The GlovePIE GUI tab makes it easier to learn input and output commands
GlovePIE is only compatible with Windows operating systems, though there are other programs for utilizing the Wii Remote in other operating systems. There's CWiid, lg3d-wii, Libwiimote, PerlWiimote, and WMD for Linux, and for Mac OS X there's DarwiinRemote, Remote Buddy, and The Wiinstrument. Of course, GlovePIE isn't the only game in town if you're running Windows, and we will be covering some of the other mods and applications in future installments of Revolutionary.
Hardware Requirements
You don't need much in the way of hardware to get your toes wet. Just a Wii Remote and a computer with a Bluetooth interface are required, but the Nunchuk, Classic Controller, and Sensor Bar are also supported. In GlovePIE, there's a specific function for checking to see whether or not a Nunchuk or Classic controller is attached, so it's possible to switch between entirely different control schemes by simply plugging in or unplugging one of those attachments.
Rez switches between analog stick and motion controls by plugging and unplugging the Nunchuk
Bluetooth
Unlike the Xbox 360 controller, or the Wavebird for Gamecube, the Wii Remote uses Bluetooth, a non-proprietary wireless interfacing standard, to connect to its mother console. That's great for us, because it means we can also connect the Remote to other devices that use Bluetooth. Cell phones, PDAs, and computers have all been found to connect with the Remote. However, efforts to get it to do something once connected to anything other than a computer or Wii, are in their infancy.
Bluetooth Adapter
If you haven't got a compatible Bluetooth interface device built into your computer, you can purchase a USB Bluetooth adapter. Wiili.org and Wiibrew.org have lists of compatible Bluetooth devices, and you can also ask for tips and get help in forums. Shopping from the products among these community-updated lists is probably the best way to be sure you'll get a setup that's Wiimote-compatible, though you may get lucky with something that isn't listed.
Bluetooth Stack
To initiate communication between your Wiimote and the PC, you need a Bluetooth stack - a set of protocols for transmitting and receiving data between Bluetooth devices. The most popular Bluetooth stacks for Windows are Widcomm and BlueSoleil, and you may use one of them (and only one at a time) to connect your Remote to your computer. The first time you connect your Wiimote, it might seem like a long, convoluted process that you won't want to go through repeatedly, but it does get easier with experience, and the reward is definitely worth the small bit of hassle.
The Widcomm Bluetooth Setup Wizard showing devices in range
Wii Remote
The Wii Remote has a deceptive appearance, in that the sparse distribution of buttons and complete absence of any
analog sticks make it look downright archaic in comparison to the standard of modern controllers with dual-analog sticks and an abundance of pressure-sensitive buttons. But the simplistic look of it belies its immense potential as an interactive input device. Motion, gestures, and tilt can be used to perform a lot of the tasks usually delegated to analog sticks and buttons, and the pointing feature that the IR sensor provides, allows objects, characters, and the camera to be interacted with and manipulated with a degree of swift and acute precision that isn't afforded by analog sticks. A racing game that puts all the buttons and sticks to work on a traditional controller may have all the same features covered through motion-sensing and the buttons of the Wii controller. It's even possible to play a first person shooter using just the Remote with no attachments.
Up to 4 Remotes (plus any assortment of Nunchuks or Classic Controllers) can be connected and scripted for, and feedback such as LEDs and rumble can be controlled by other connected devices. For example, Remote #1 can have a rumble or LED sequence activated by pressing a button or performing a motion on Remote #2.
One of the most ingenious traits of the Remote is how its shape allows it to be held any number of different ways. You can hold it in one hand like the remote control for your TV; turn it sideways like a NES controller, or if you run short on ideas you can always consult Wario Ware: Smooth Moves.
The Nunchuk features the same tilt and acceleration sensors as the Remote, and also has an analog stick and two digital trigger buttons. Its small, rounded shape and button/stick layout allows it to be held and in ways that are simply inconceivable with standard controllers. Turn it horizontally and it's a flight throttle with hat switch. Hold it out in front of you with the underside turned toward your abdomen and you can use it to strum a virtual guitar. Hold it vertically with the Remote in the other hand and you can have dual air-joysticks for Robotron. The possibilities are as broad as your imagination.
Classic Controller
The Classic Controller doesn't have the motion-sensing capability of the Remote or Nunchuk, so given its traditionally familiar shape, its button layout, and dual-analog sticks, it's often used as a standard gamepad. Through GlovePIE, the analog sticks can be made to act like digital joysticks, semi-analog (variable responses at different angles or positions), or fully analog. With some determination, it's possible to mount the Classic Controller on top of the Remote, and then run scripts that utilize the features of both.
PPJoy
One simple way to get your Wii controllers to act like standard game controllers is to use PPJoy, a virtual joystick driver that GlovePIE natively supports. With PPJoy-specific code in a script, a Wii Remote, Nunchuk, or Classic controller can have its sticks, buttons, d-pads, or even motions mapped to generic joystick functions. For instance, the left stick of the Classic controller could be mapped as a joystick for a flight sim, while the right stick is mapped as the hat switch, or taking a more radical approach, the Remote and Nunchuk could be the joysticks through motion and tilt detection.
Sensor Bar
To get smoothly responsive controls analogous to using a mouse, you'll need a Sensor Bar, or other source of infrared that the IR "camera" at the front of the Remote can "see" and track. By foraging about your home, you may find any number of items that fit the bill from A/V remotes, to candles, to Christmas lights. You could make your own wireless or USB Sensor Bar, or if your Wii is in proximity with your PC, just turn it on (after pairing your Remote[s] with the PC) and use the Wii' Sensor Bar.
When the Wii controllers were first unveiled at TGS 2005, gamers immediately began imagining the possibilities of playing their favorite games in new ways. Some of those games just can't come soon enough to the Wii, while others stand little or no chance of ever being brought to the system. Others yet will need for the developers and/or publishers to become aware of the possibilities before embarking on the challenge that is Wii. In each of those cases, the homebrew community can play a part.
The potential for novel interfacing with Wii controllers is immeasurable. In the lifetime of the Wii itself, we may never see all the possibilities, but if we all apply our imaginations and contribute a script, a program, or an idea, we can use the Wii controllers to play games and virtually interact like never before.











Reader Comments (Page 1 of 1)
hvnlysoldr @ Jun 12th 2007 11:17AM
Eye patches are for night vision! Nintendo has revolutionized gaming, again. I still would prefer games at retail or through the Wii Shop though.
Wiitard4life @ Jun 12th 2007 11:54AM
Apple or Pumpkin?
psyborg @ Jun 12th 2007 12:58PM
I need to do some more research and get my pc bluetooth ready. I would love to map 'wasd' to the nunchuck's anolog stick and map the mouse cursor axis to wiimotes IR pointing and play Half Life 2 or Prey or something.
theLoneYoshi @ Jun 12th 2007 1:23PM
Heh, I downloaded GlovePIE like 2 months ago. In that span of time, I've created my own version of Twilight Princess controls for Ocarina of Time and A Link to the Past, both fun to play with the Wiimote. I've tried to get a good Pilotwings 64 going on, but no chance for that.
The most common script I use is actually the WinampController2 script that is included with GlovePIE because I like having music play when I fold my laundry, and moving to my laptop to press a keyboard button is more of a hassle than just picking up my Wiimote and pressing a button from far away.
I highly recommend getting GlovePIE if you have the resources. You never know when an old game can be made really fun again by the Wii Remote.
Mike Sylvester @ Jun 12th 2007 1:32PM
"You never know when an old game can be made really fun again by the Wii Remote."
I've even found that some games that I never liked have become enjoyable with the Remote. Playing the Flash version of Alien Hominid is a nightmare with a keyboard, but it's rather fun with the Remote.
HTML_Earth @ Jun 12th 2007 3:28PM
@ 2
There is a guy named Pat Glynn who made a Wiimote mod for HL2. you can get it here: http://wii.hl2world.com/
HTML_Earth @ Jun 12th 2007 3:29PM
i meant 3, not 2
randomguy132 @ Jun 12th 2007 3:59PM
Wow, very well written.
Billy_McBong @ Jun 12th 2007 5:49PM
anyone know of any good Linux programs involving the Wiimote?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free gaming stuff(including Wii points and controllers):http://gaminglagooon.info/
Mike Sylvester @ Jun 12th 2007 6:02PM
@randomguy123
Thanks! I'll be here every week. ;)
@Billy_McBong
There's a lot going on in Linux, but I've yet to see anything become as widely adopted as GlovePIE. Unfortunately, as I've stated, GlovePIE is only for Windows. The good news is that there's a new open source project underway, tentatively named OpenPIE, which should be portable between Mac OS X, Linux, Windows, and several other platforms. I'll be covering the OpenPIE project as it develops.
Billy_McBong @ Jun 13th 2007 3:13AM
thanks ill keep an eye on OpenPIE
boradley @ Jun 13th 2007 3:32AM
jaa i'll recommend GlovePIE as a simple way to achieve great results.... although i seem to be unable to correctly send midi messages - which requires an external loopback program (like midiyoke, which doesn't seem to work for me) unless like in my case you have several midi ports over different interfaces, which i do but still had erratic joy, not the well defined and constant joy i was after.
Even so, i use the wiimote with Ableton live, using the dpad to select audio clips and B to trigger them, and other buttons (+,- etc) i have mapped to various EQ cuts or effects triggers.
Frankly it's awesome :)
Mike Sylvester @ Jun 13th 2007 12:21PM
My brother is a DJ, and he's intrigued by some of the music applications of the Wiimote that I've shown him on YouTube. I haven't had much time to learn it yet, but I'm personally interested in trying to create something with Ableton Live.
http://youtube.com/results?search_query=wiimote+ableton
yoxi @ Jun 14th 2007 1:19AM
Dude, sweet... I'm gettin me a wii.
someone needs to knock together a theremin clone for the wiimote and nunchuk. it wouldn't take more than ten minutes in Reaktor.
oh hold that thought... here's someone doing it already http://youtube.com/watch?v=8N-LpbXF33g
actually I guess I only need to buy a wiimote to do this... that should be easier on the 'ol budget. (not that I won't get a wii eventually)
has there been any use of the speaker on the wiimote?
Mike Sylvester @ Jun 14th 2007 3:56AM
@yoxi
That's so cool!
The speaker has been "cracked" on the Wiimote, but mostly of what I've seeing so far is generating simple tones. I'm hopeful that some enterprising musician is working on sequencing tones to create recognizable sounds through the speaker, or algorithms to let user input shape sounds that resemble instruments.
Also, it should open up a lot of possibilities once someone figures out how to send samples to the speaker. It's believed that it supports 4bit ADPCM.
James @ Jun 14th 2007 1:45PM
I got all excited about this right after they first figured out the command set, right around the first public release of GlovePIE. I got it up and running, used it as a mouse pointer very briefly, then forgot about it for a few months. Why? I realized I was only using my PC for web browsing and watching recorded TV shows, and my wireless keyboard and mouse pretty much did the job. If I had time to play with PC games more (like I used to), it would be cool to come up with innovative ways to use the 'mote, but for now, I got nuthin.
Riley @ Jul 18th 2007 2:39PM
I read most of this. But all I need to know is how do I download the GlovePIE thing? I'm completely confused on what I need to do. I NEED HELP! lol
Mike Sylvester @ Jul 18th 2007 2:44PM
@Riley
From here:
http://carl.kenner.googlepages.com/glovepie_download
nintendo guy @ Aug 27th 2007 6:44AM
Hi,
I just downloaded GlovePIE and expected that all i have to do is start up glove PIE, plug in a bluetooth dongle, grab my wiimote and then play say a project 64 game, but i opened it and found heeps of script. I would rrealy appreciate if someone who has done this already could teach me/ tell me how to use glovePIE.
From Nintendo guy