Revolutionary: Speed Metal

Every (other) Tuesday, Mike Sylvester brings you REVOLUTIONARY, a look at the wide world of Wii possibilities.

I guess it could be said that my favorite game genres are rhythm and racing. My racing wheels, bongos, dance mats, drum kit, and guitar collection stand as testament to that being fact. So, while brainstorming new uses for my Guitar Hero III Wii Guitar, it struck me that racing might be the peanut butter to the guitar's chocolate.

Yeah, I'm sure that doesn't make any sense to you, as I got the 'WTF face' plenty of times when explaining my plan to friends. But read on and I'll tell you how to shred. How to shred down NFS ProStreet.

As I've explained before, the Wii Guitar functions in GlovePIE as a Classic Controller, though the button layout is totally rearranged, with a few controls omitted. The device ID is different, so the Wii console won't mistake it for a Classic Controller and let you play Super Mario Kart 64 with it.

Click for larger

What I intend to do is use the accelerometer of the Wiimote for steering and throttle, while flicking the strum bar to shift gears, with the whammy bar working as the clutch. If it all goes to plan, I should be able to shift gears with a quick gesture.

To start, we'll get the simple stuff out of the way. Menu, camera, and shifting controls are basic digital functions which, for the most part, can be mapped with the "Key = Button" syntax. Keeping in mind that the Wii Remote will be held facing away from the body, we'll configure the d-pad to correspond in an intuitive way.

Key.Up = Wiimote.Left //Up, Forward
Key.Down = Wiimote.Right //Down, Backward
Key.Right = Wiimote.Up //Right
Key.Left = Wiimote.Down //Left
Key.Escape = Wiimote.Minus //Menu back
Key.Enter = Wiimote.Plus //Menu forward

Key.C = Wiimote.1 //Camera
Key.B = Wiimote.2 //Look behind
Key.N = Wiimote.A //Nitrous

Key.LeftControl = Classic.Down //Downshift
Key.LeftShift = Classic.Up //Upshift
Shift + P + I + E = Wiimote.Home //Stop script running

The whammy bar works in analog, just like the Classic Controller's 'R' button. To engage the clutch, we'll have GlovePIE press the clutch key when the whammy bar is pushed to about 70% of its range or further.

/*Clutch*/
If Classic.R > .70
Key.Space = True
Else
Key.Space = False
EndIf

Now we'll do the steering, acceleration, and braking. Keeping in mind again that the Wiimote is being held to the right side of your body with the buttons facing away, we've got to set triggering accelerometer values to correspond with that orientation. Being that this is a racing game, analog controls are favored, so we'll fake it as usual, by putting a delay between key presses at varying degrees of pitch and roll.

/*Acceleration, Handbrake*/
If Wiimote.GZ < .5
Key.NUMPAD0 = True
ElseIf Wiimote.GZ > .25 and < .35
Key.Up = True
wait 10ms
Key.Up = False
wait 1ms
ElseIf Wiimote.GZ > .35 and < .55
Key.Up = True
wait 50ms
Key.Up = False
wait 1ms
ElseIf Wiimote.GZ > .55 and < .75
Key.Up = True
wait 100ms
Key.Up = False
wait 1ms
ElseIf Wiimote.GZ > .75
Key.Up = True
wait 200ms
Key.Up = False
wait 1ms
EndIf


/*Steer left*/
If Wiimote.GY > .15 and < .35
Key.Left = True
wait 1ms
Key.Left = False
wait 100ms
ElseIf Wiimote.GY > .35 and < .60
Key.Left = True
wait 1ms
Key.Left = False
wait 50ms
ElseIf Wiimote.GY > .60 and < .85
Key.Left = True
wait 1ms
Key.Left = False
wait 10ms
ElseIf Wiimote.GY > .85
Key.Left = True
wait 1ms
Key.Left = False
wait 1ms
EndIf


/*Steer right*/
If Wiimote.GY < -.15 and > -.35
Key.Right = True
wait 1ms
Key.Right = False
wait 100ms
ElseIf Wiimote.GY < -.35 and > -.60
Key.Right = True
wait 1ms
Key.Right = False
wait 50ms
ElseIf Wiimote.GY < -.60 and > -.85
Key.Right = True
wait 1ms
Key.Right = False
wait 10ms
ElseIf Wiimote.GY < -.85
Key.Right = True
wait 1ms
Key.Right = False
wait 1ms
EndIf

With an EyeToy camera mounted to my guitar, it's time to make my first run with this script. Please bear in mind that I've never played a racing game with a clutch, it's been over 10 years since I've driven a real car with one, and automatic is usually my preference in racing games. What could possibly go wrong?

Terrible, I know. You probably expected as much before even clicking the jump, but to play it really wasn't that bad. Up until my unfortunate crash, I really felt like I was in control, and through the final stretch I was getting a better handle on shifting gears. Driving in automatic would have been less complicated, but that can be said of real life as well. With some more practice, I'm sure I could get to the front of the pack, just like with an Xbox 360 controller or SIXAXIS. But doing it with a GHIII axe is just so much cooler.

As a bonus, I've decided to give your lonely left hand something to do. Need for Speed ProStreet lets you assign individual keyboard keys for each gear, so we'll map them to the fret buttons. Six gears are selectable, but with only five fret buttons to work with we'll combine two of them to work as the sixth gear.

Key.1 = Classic.A //Gear 1
Key.2 = Classic.B //Gear 2
Key.3 = Classic.X //Gear 3, Quit from main menu
Key.4 = Classic.Y //Gear 4
Key.5 = Classic.ZL //Gear 5
/*Gear 6*/

If Classic.ZL
Classic.Y = True
EndIf

I'll spare you the embarassment of watching me try to drive with that little addition.

As fun as this departure turned out to be, it's hard for me to tear myself away from Guitar Hero III long enough to think up alternate uses for the guitar, so if you have any suggestions, please leave a comment.

This article was originally published on Joystiq.