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.






Get a WordPress.com Blog




Reader Comments (Page 1 of 1)
BluClouds7 @ Oct 2nd 2007 3:00PM
so if this is possible.... couldn't perfect dark be made to work with the wii remote? Would that be able to work virtual console-wise? I know it is far from possible that nintendo would do that, but they could right? Oh and also, could online be added as well? (also unlikely, i know)
Mister Hand @ Oct 2nd 2007 3:21PM
Um... I owned this game both on N64 and on PC (purchased the PC version for my son long after I was all done with the N64). Your review of the game is FAR too generous. It was mildly entertaining for me, and it held my 10-year old's attention for a few days, but I found most of the upgrades useless and beating the game was barely even hard, even without using the "advanced techniques" you described. If you're a Wipeout fanatic like me, pod racer is a low rent clone.
I do agree, however, that some version of a pod racing game on Wii could be cool, but a WIPEOUT game on Wii would be the awesomest thing ever (and that will never happen).
Rocketman @ Oct 2nd 2007 4:43PM
Apply this to Rocket Jockey somehow, and you've got the best game ever created.
Jeremy @ Oct 2nd 2007 5:03PM
So in this you were using the PC version of the game right? I don't see you getting the Wii controls working on the N64 version. My big thing though is that it looked so fun that I want to play my VC FPS games now with the Wii remote as a light gun and the racing games as a wheel.
Mike Sylvester @ Oct 3rd 2007 10:41AM
@BluClouds7
It should be technically possible for Nintendo to update the controls of their VC releases to utilize the modern features of the Wii Remote and Nunchuk, but they've stated that they won't be updating the games in such a manner. Same deal with online features. But apparently, the "no fiddling" rule doesn't apply to game textures (see Wave Race 64).
@Mister_Hand
I've never been a fan of WipEout games (I can't bring myself to even finish the first race in my copy of Pure), but I'm a fan of other high-speed, futuristic racers like Extreme G and F-Zero. I'd rank Ep1 Racer below those, but I still found it enjoyable - moreso than the movie it's based on.
@Rocketman
I still haven't been able to get the Rocket Jockey demo to work on any of my computers, but I have a new one on the way, and I'll give it another shot when it arrives. Just for you, buddy!
@Jeremy
Yeah. Everything I've done in GlovePIE so far is for PC. With an investment in some additional hardware, a console that's compatible with that hardware, and a lot of time coding and configuring everything to work together, it's possible to use your Wiimote on consoles other than the Wii. But I don't expect anyone would have any luck building a setup that worked with the N64. I'd love to see me proven wrong, though!
the common cold @ Oct 4th 2007 1:00PM
It looks like it could be a tad more responsive (and a little easier on the arms), but I guess you could just add an option to tweak the sensitivity. Overall though, it looks like fun!
Mike Sylvester @ Oct 4th 2007 1:27PM
@the_common_cold
Holding the controllers in a relaxed position (like in my lap) and twisting them "neGcon-style," yields better results. Like many of my motion scripts, it's much easier to control when I'm not trying to hold my hands in view of a camera.
James @ Oct 5th 2007 3:43PM
Mike, I really like the work you're doing with GlovePIE, but have you by any chance found a driver/scripting tool that uses a "real" language? I'm not trying to be *too* derogatory, but it would be easier for me, as a veteran C++/Java/C# developer to find bindings for a language I'm familiar with than to spend time reading up on how -- what is it, Delphi? -- works. The way everything just sort of runs together, with no functions, or no indications of *when* a particular code snippet will actually run (some seems to be sequential, some seems simultaneous, and it's hard to see what determines the difference), makes me leery of trying to write anything complex from scratch myself.
Mike Sylvester @ Oct 5th 2007 5:06PM
@James
GlovePIE is derived of standard languages, and I'd expect any other language for creating controller emulation scripts to work similarly. No matter what, they'll need to incorporate Wiimote-specific functions into the language to make the access Wiimote's inputs and outputs. You could try making your own programming language for it. The Wiimote reports itself as a standard Bluetooth HID, and the following page tells you the values of the inputs and outputs. That's how Carl Kenner made it work with GlovePIE, and how the Half-life 2 Wiimote project is able to interface with it.
http://www.wiindows.org/index.php/Wiimote#HID_Interface
Otherwise, I recommend downloading GlovePIE and taking a look at the Preliminary Documentation for some more insight on how it works and what is and isn't possible.
Carl Kenner @ Nov 18th 2007 3:59AM
You can write GlovePIE scripts using C++/Java/C# syntax if you prefer, provided you stick to one statement per line, and put braces on the same line as the if/else.
For example:
if ((var.AvgSteer < -10) && (var.AvgSteer> -20)) {
Key.Right = true;
wait(1ms);
Key.Right = false;
wait(1ms);
} else if ((var.AvgSteer < -20) && (var.AvgSteer> -30)) {
etc.
But I'm not a fan of C++ syntax, which is why it also supports BASIC and Pascal styles. It even has some COBOL style syntax if you like (try replacing semicolons with full-stops, aka periods).
I also borrowed things from mathematics:
if -20 < var.AvgSteer < -10
if |var.AvgSteer| < 10
I realise GlovePIE is somewhat confusing in that it mixes things being done simultaneously with things being done sequentially. Basically things are supposed to be simultaneous, except for IF statements which are meant to be like macros. A wait statement in an if statement only pauses that macro, while everything else continues on around it.