Grease Minigames (Wii)

I think spray painting was my favourite to make, it is very satisfying to see it change from the rust to gloss.

When creating the Greaser’s Garage minigames I did also build a mock welding game that I would have liked to go in, I used the spanner as a welding torch and black polygons for the holes. However there wasn’t enough free time in the song, and never even got checked into source control.

YouTube Preview Image

I forgot how much Tom’s AI was a dick to play against with his constant sabotage, and he gets worse the more you do it to him. By the end of the project it was easy to get homeruns and dunk the basketballs.

YouTube Preview Image

The wrestling was quite a simple game to make from a code point of view and turned out quite well.

Athena: Wiimote and Mac OS X

Wiimote USB DrivesSince solving the problem of the rumbling on the XBox 360 pad, I’ve grown bored of it, and decided to branch out trying to get more controllers working in my engine.

So a few days ago I started with the Wiimote, I had planned to try to the PS3 controller but I didn’t have one, so borrowing one of my housemates Wiimotes I set to work.

There is quite a lot of documentation on the Wiimote at the moment, whether it is the correct way to do things is questionable, since there are cases like “1? – it is set to 1 by the Wii” and “set this to 0x55 at memory address X and set to 0x00 at memory address Y to enable it”.

I started with website called The Wiimote Project, but as their documentation grew scarce I found a better site (which it seemed to copy it all from anyways) called WiiBrew. The WiiBrew wiki is quite comprehensive and within a few minutes I already had the LEDs flashing.

I won’t go into a lot of detail, I’ll just show the basics that I’ve got to grips with from the documentation on WiiBrew – LEDs + Motor, Buttons, and Battery.

Connecting the Wiimote

Connecting the Wiimote to a Mac is far simpler than it is for XBox 360, for a start its a Bluetooth device that operates using the normal protocols and it doesn’t require a key to activate. To connect, first turn on Bluetooth on your Mac, and then select “Set up Bluetooth Device…“.

Follow on the onscreen instructions, and when it gets to the point where it is searching for nearby Bluetooth devices, press 1 + 2 to soft synchronize if the Wiimote isn’t bound to another device, or the sync button to hard synchronize (unbinds the Wiimote from anything it remembers).

When it appears, select it and click the “Passkey Options…” button. Select the “Do not use a passkey with this device” option and then OK. Continue on and the device will be setup and connected. You can’t actually tell since the LEDs are still blinking, but if you have done it correctly, the Bluetooth icon should be different, or the menu will have a disconnect option for the device just setup.

Athena: XBox 360 Pad and Mac OS X (cont further)

Steampunk LincolnThe past couple of week’s I’ve really gotten into writing code that communicates with gaming devices (the Mac is limited in this part of itself).

One annoyance I had was with getting rumbling working on the XBox 360 pad, eventually after essentially pinging all messages, I found and worked out the format for the rumble message, which was annoyingly nothing like the others listed.

Well after that I got kinda bored with the 360 and decided to turn towards another console controller, the Wiimote. And I thought I’d write my own driver.

Long story short, when I was having trouble getting my driver working, I looked at the code for the driver for Tattiebogle’s XBox 360 pad driver, only to find out that it has redefined the rumble message to it’s own format, namely the 4 byte one, only to forward on the settings to the 360 pad.

Well I’m glad I figured out why the message was different, kinda annoying that wasn’t in his FAQ. Hopefully others will find this post and go “ohhhhhhhh” like I did when seeing the code.

As for the Wiimote, writing a driver for a Bluetooth device I’ve decided doesn’t make sense, the device is already designed to communicate with another bluetooth device, so I made a class instead, using a Bluetooth API and documentation I found on WiiBrew.

I’ll hopefully post my Xcode project for testing the 360 pad in a few days. And I’ll probably write up my Wiimote stuff once I get it working the way I want. I’m really tempted to buy lots of cheap USB and Bluetooth devices on eBay now just to see if I can write drivers for them.