Archive for the ‘Java’ Category

h1

Goodbye GlovePIE, Holla Java!

September 12, 2008

So, last night I rolled up a noob toon on Deathwhisper named Thules, just to test out my set up on Tortage.

 

Yeah…and… it actually worked! Minus a few bugs it was fairly successful. I ran around the island slicing left, right, down all the while bonking alligators with the giant broken oar I had. It didn’t quite get my heart pounding, but I can see a lot of potential for this.

 

If I can figure out a way to create a mechanism that makes your character jog when you jog, and turn right or left when you do (hehe, and jump when you jump!) it definitely would be better. And I know I am not going to accomplish this with the Dance Pad, so I’m going to have to retire it. But what would replace it?

I really wish the guys at http://virtualproductsllc.com/ would respond to the emails I send them, because that looks like something I could use. In the end I will probably do something like create a Wiimote/Nunchuck belt that responds to the up & down motion of jogging, and turning etc.

 

Even though I was able to use my rudimentary bonking and running abilities on Tortage, for some reason the IR mouse in my left hand was being stubborn, and none of the buttons on EITHER Wiimote were working properly. I think that my script is simply too complex for GlovePIE, or I am doing it wrong. Either way, I believe at this point it would be better to ‘borrow’ some projects done by others, and basically weave them together to make what I want. In that way, I would only have to learn a minimal amount of scripting/coding in Java instead of trying to start from scratch with GlovePIE. I’m going to use Java because theoretically it is a cross-platform language, and the gesture recognition library I want to use is written in Java as well.

 

So, looking at Java APIs for the Wiimote, I have these three so far:

 

WiiUseJ

A very simple Java based API for the Wiimote with a graphic UI that is fairly intuitive. It’s very similar to WiinRemote in that it can set commands for all the buttons, and do IR Mouse application. Aside from that, it doesn’t really support gesture recognition so I would have to figure out how to add WiiGee to it for swing recognition support.

 

Motej

“Motej is a slim Java library for Wiimote communication” according to their website.

It simply allows for Wiimote communication and the data from the Wiimote is as unchanged as possible. There seems to be several ‘packages’ that come with it that I don’t completely understand yet. Here are the features comprehensively listed though.

  • Discover and connect to Wiimote devices
  • Wiimote IR Camera in both basic and extended mode
  • Wiimote Accelerometer
  • Wiimote rumble feature
  • Wiimote player LEDs
  • Wiimote buttons
  • Read Wiimote EEPROM memory
  • Write Wiimote registers
  • Wiimote Status Information
  • Wiimote Calibration Data

So it definitely allows for comprehensive data gathering from a Wiimote. Now to interpret that data into actual key strokes might be a different monster all together.

 

Also, there is no graphic UI, so I might have to add that myself? (gulp) Although it provides several ‘demos’ with it.

 

Wiimote Simple

I’m not exactly sure how ‘Simple’ this API is. Although it claims to have “less functionality than WiiremoteJ” the features it lists are the same as Wiiremotej

The features listed are:

  • Read accelerometer data, useful for responding to dynamic swinging actions.
  • Read infrared camera data, useful for cursor pointing.
  • Respond to button pushes.
  • Vibrate Wiimote.
  • Set lights on the Wiimote
  •  

    The one thing that interests me is the “useful for responding to dynamic swinging actions” in that it mentions “swing” and not “flick” because so far the only action that I can read or interpret from the Wiimote is an almost-instantaneous flick action.

     

    In the end, I want to combine one of these API’s with the WiiGee Java-Based Recognition Library so that I can have button interpretation, an IR mouse, AND complex gesture recognition so that both Wiimotes will be able to properly & comprehensively communicate with AoC. So for now I’m dumping GlovePIE. It was great while it lasted, but unless I’m scripting retarded with it, I’m pretty sure that the language is a bit too limiting for what I want to do. Therefore, on to Java!

    I guess when I get home I’ll install Java and the Bluetooth Java Library etc and see how it all works. Maybe I know more about Java than I think I do.

    h1

    Argh!

    September 9, 2008

    Ok, so after looking at Glovepie, and then looking at how to calculate certain swings, I realize the only way I can do this is by using Calculus (I got an A in it in college…10 years ago!) or simply switch to writing this script in Java and figure out how to combine the efforts of:

     

    Wiigee Gesture Recognition Library

    and

    WiiUseJ

     

    Oh yeah, and then I simply need to teach myself how to use the Java programming language!

     

    That’s all…no big deal… /sigh/

     

    Oh well, I guess innovative creations are never spawned with ease.

     

    Anyone know basic Java out there?