Advertisement

Revolutionary: This is Not the Star Wars You're Looking For

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

Ever since the motion sensing ability of the Wiimote was revealed, Star Wars fans have been pleading for a game that would let them live out their Jedi fantasies, swinging the Wiimote in command of an onscreen light saber. Well, Lucasarts recently announced that the Wii will be getting a version of the multiplatform title, The Force Unleashed, a game that's expected to fulfill all your fantasies of being an power-infused enforcer with a luminous sword.

But Lucas & Co. haven't always given us just what we want. In 1999 they released the first chapter of the long-awaited Star Wars prequel trilogy, The Phantom Menace, to an audience that was expecting something more, well ... Star Wars-y. Jar Jar, midichlorians, and a pre-pubescent, mop-topped future-fascist didn't quite make for the hit we were hoping for, and the most exciting moment in the film was not a war or a fight scene, but a race. Lucasarts seemed to agree and developed a game based around that scene (albeit, filled out with more tracks and worlds). In this week's Revolutionary, we'll be using GlovePIE to see if the Wiimote and Nunchuk can keep up with the Jedi-like reflexes you'll need to stay in the lead in Star Wars: Episode I Racer.

A game that was a somewhat impressive on the N64 seemed half-hearted and underwhelming on the PC. Episode I Racer didn't exactly set PCs on fire with its low resolution textures, simplified geometry, and 30 frame-per-second ceiling. But gamers that could overlook the graphical shortfalls found a surprisingly deep racing game that featured a rich upgrading system and the ability to win the pods of other racers after defeating them on their "home" tracks.

As you progress through the game, buying parts to upgrade the pods in your possession, the game will get faster and faster. In time, you'll be blazing along tracks so fast, F-Zero GX will need to dump NOS in its G-diffuser to keep up, and you'll need to rely on the tingling of your Jedi senses to keep from colliding with obstacles in your path. Like GoldenEye 007, Episode I Racer worked great as a supplement to its corresponding film, further enhancing the intensity of the scene (or in GoldenEye's case - scenes).

In the movie, pod steering was controlled by the jet engines tethered to the front of it. More thrust on the right engine would cause the pod to turn left, and thrust on the left turned it right. The N64 offered the option of connecting a second controller and using both analog joysticks to imitate li'l Ani's setup. With this week's script, we aim to surpass that control scheme's coolness and authenticity.

The way this will work is to average the Roll of the Remote with the Roll of the Nunchuk into a variable. The value created will be the variable used to affect how hard we turn.

If Wiimote.Left
Key.Up = True
Else
Key.Up = False
EndIf
If Wiimote.Right
Key.Down = True
Else
Key.Down = False
EndIf

Key.Space = Nunchuk.Zbutton
//Slide
Key.R = Nunchuk.Cbutton //Repair
Key.Alt + Key.F4 = Wiimote.Home //Quit
Key.Escape = Wiimote.Minus
Key.Enter = Wiimote.Plus

To cycle the camera views we're going to modify some code that we used in the Descent Trilogy script. We're only cycling through four camera views here, so we can simplify things, as we don't have to assign and run two variables concurrently, and there are only four values to cycle. Also, we'll move the camera cycling controls to the Wiimote's 1 and 2 buttons.

If !var.Init
Wiimote.LEDs = 1
var.View = 1
var.Init = True
EndIf

If pressed(Wiimote.1)
If var.View <= 1
var.View = 4
Else
var.View--
EndIf
var.CycleView = True
ElseIf pressed(Wiimote.2)
If var.View >= 4
var.View = 1
Else
var.View++
EndIf
var.CycleView = True
EndIf

The next part will check the value of the cycled variable and press the corresponding function key for that number. We'll also set the Wiimote's LEDs as a visual indicator of which view it should be in. Of course, if the script is working, you'll have a visual indication of it by the obviously changed view, but flourishes don't hurt, and this sort of thing can act as a debug outside of running the game.

If var.CycleView
If var.View = 1
Wiimote.LEDs = 1
press(Key.F1)
wait 30ms
release(Key.F1)
ElseIf var.View = 2
Wiimote.LEDs = 2
press(Key.F2)
wait 30ms
release(Key.F2)
ElseIf var.View = 3
Wiimote.LEDs = 4
press(Key.F3)
wait 30ms
release(Key.F3)
Else
Wiimote.LEDs = 8
press(Key.F4)
wait 30ms
release(Key.F4)
EndIf
var.CycleView = False
EndIf

Now we'll tackle the steering. If the variable we're going to create returns a negative value, the pod will steer right. Positive values will steer it left. We'll set the dead zone at 20 degrees. If the averaged roll of the Remote and Nunchuk is less than 20 degrees, the steering will stay on center.

If var.AvgSteer < -10 and > -20
Key.Right = True
wait 1ms
Key.Right = False
wait 1ms
ElseIf var.AvgSteer < -20 and > -30
Key.Right = True
wait 25ms
Key.Right = False
wait 1ms
ElseIf var.AvgSteer < -30 and > -40
Key.Right = True
wait 50ms
Key.Right = False
wait 1ms
ElseIf var.AvgSteer < -40
Key.Right = True
wait 100ms
Key.Right = False
wait 1ms
ElseIf var.AvgSteer > 10 and < 20
Key.Left = True
wait 1ms
Key.Left = False
wait 1ms
ElseIf var.AvgSteer > 20 and < 30
Key.Left = True
wait 25ms
Key.Left = False
wait 1ms
ElseIf var.AvgSteer > 30 and < 40
Key.Left = True
wait 50ms
Key.Left = False
wait 1ms
ElseIf var.AvgSteer > 40
Key.Left = True
wait 100ms
Key.Left = False
wait 1ms
Else
Key.Right = False
Key.Left = False
EndIf

The game has a function for rolling the pod left or right to squeeze through tight spaces. I figure this would be ideally mapped to tilting the controllers. Since we're oriented horizontally, I'll map this to Pitch and use averaged input again.

var.PodRoll = ((Wiimote.SmoothPitch - Nunchuk.SmoothPitch)/2)
If var.PodRoll < -40
Key.A = True
ElseIf var.PodRoll > 40
Key.D = True
Else
Key.A = False
Key.D = False
EndIf

With steering and the other controls in place, it's time to turn our attention towards making our pod go. Since the movie pods had acceleration working with the same controls as steering, we'll do the same.

If Wiimote.SmoothRoll and Nunchuk.SmoothRoll < abs(40)
Key.LeftShift = True
//Boost
Wiimote.Rumble = 1
wait 1ms
Wiimote.Rumble = 0
wait 10ms
ElseIf Wiimote.SmoothRoll > abs(110) and Nunchuk.SmoothRoll > abs(110)
Key.S = True
//Braking
Key.W = False
Else
Key.S = False
Key.W = True
Key.Space = False
Wiimote.Rumble = 0
EndIf


It's working! It's working!

I actually had a lot of fun playing the game with this script. Of course, it's more enjoyable when I don't have to hold my hands way up in the air for the camera to capture. But what do you think? Is the force strong with this one, or should it be dropped into the Sarlacc pit? Leave a comment and share your thoughts.