Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411633 Posts in 69393 Topics- by 58448 Members - Latest Member: wcored

May 13, 2024, 03:20:57 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignGlovePIE Scripts (Wiimote on PC/Indie Games)
Pages: [1]
Print
Author Topic: GlovePIE Scripts (Wiimote on PC/Indie Games)  (Read 19318 times)
GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« on: February 28, 2009, 10:54:23 PM »

Just to note before anyone gets pissed; this is here instead of in Technical because I think user input is an aspect firmly rooted in game design, as opposed to technical aspects.

GlovePIE is a nice little piece of free software that allows you to use your Wiimote (as well as some other things, like the Balance Board) as input on your PC.  What it does is determined by very easy to write scripts; button-to-key mapping being incredibly easy, and adding motion controls and IR a little harder.  That said, there are a lot of scripts out there, so most of the time you can get the script you want by cobbling together pieces of other peoples' scripts.

Software: http://carl.kenner.googlepages.com/glovepie_download
Large Script Database/Wiki: http://www.wiili.org/index.php/GlovePIE:GlovePIE_Scripts

What I love about GlovePIE is that I can use it to give PC games controls that fit better.  At the end of the day, the keyboard and mouse just weren't designed for playing games on, and some games are just so much nicer to play a couple feet back with a controller in hand, instead of hand on the keyboard.  Knytt Stories, for instance, is so much nicer to play like this (my script for it is a sideways Wiimote with no motion controls).  Another indie game that is way better is Audiosurf.  Accelerometer tilt controls do absolute wonders for that game; I think my script needs more tweaking though, so I don't want to post it.  I've also played around with literally surfing Audiosurf (with the Balance Board), and though really really fun, that script really needs tweaking to make it easier to play the game.

So given just how easy it is to script with, I really recommend checking it out, or just copying and pasting the scripts in this thread and giving them a try.  And of course if you do write some scripts with it, make sure to post them here.  Smiley

To use any script, connect your Wiimote to your PC with Bluetooth, then just paste the code into GlovePIE's scripting window and press "Run".

Here's a script I threw together a few minutes ago for cactus' new game Ping Pong; flick the Wiimote to hit the ball, and use the Nunchuk's Analog Stick for the directional options.  And yes, I think it's a lot funner with this script!  Grin Hand Thumbs Up Right

Code:
//Wiimote and Nunchuk for PING PONG by Cactus; script by GregWS
//Flick the Wiimote to press Z/Enter
//Press B on the Wiimote to press Escape
//Use the Analog Stick for the Arrow Keys

if Wiimote.RelAccX > 15
   key.Z = true;
else
   key.Z = false;
endif

Key.Escape = Wiimote.B;
Key.Left = (-1.2 < Wiimote.Nunchuk.JoyX < -0.5);
Key.Right = (0.5 < Wiimote.Nunchuk.JoyX < 1.2);
Key.Up = (-1.2 < Wiimote.Nunchuk.JoyY < -0.5);
Key.Down = (0.5 < Wiimote.Nunchuk.JoyY < 1.2);

And here are some scripts written for konjak's games, including Noitu Love 2 (they were posted on his blog).
http://www.konjak.org/glove/noitu2.html
http://www.konjak.org/glove/chalk.html
http://www.konjak.org/glove/tripline.html
« Last Edit: March 01, 2009, 11:42:36 PM by GregWS » Logged
Mikademus
Level 10
*****


The Magical Owl


View Profile
« Reply #1 on: March 03, 2009, 05:56:16 AM »

Heh, yeah, this is a borderline topic with a foot in both technical and design aspects. That said, I agree with you placing it here, input should be more about game design than "just" technological aspects.

I do disagree with that keyboard and mouse aren't made for games though. Ok, they weren't designed with games foremost in mind, but a keyboard IS basically a huge controller pad and keyboard+mouse is still the absolutely best input system for strategy and FPS games. Other control solutions may be better for different types of games.

But thanks for the link! Really a nice suit of software he is making! What I really would like is support for multiple wiimotes, perhaps as much as three at once (for head tracking and dual guns), some really cool games could be written for that combo!
Logged

\\\"There\\\'s a tendency among the press to attribute the creation of a game to a single person,\\\" says Warren Spector, creator of Thief and Deus Ex. --IGN<br />My compilation of game engines for indies
GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« Reply #2 on: March 03, 2009, 07:00:25 AM »

Multiple Wiimotes already are supported, as far as I'm aware.

Just type "Wiimote2," etc. instead of "Wiimote," when coding it.  And the order that the controllers are connected by Bluetooth is what determines order.
Logged
reetva
Level 5
*****

Bee dee bai do beeeee


View Profile
« Reply #3 on: March 03, 2009, 04:29:47 PM »

I like the voice recognition a lot. I made a script for controlling iTunes with my voice.  Tongue  On the topic of Wiimotes, I think that it has much potential for games.  It would be nice to see a game designed with this in mind.  Smiley
Logged

Hello!  I am here to boogie.  Shall we?
GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« Reply #4 on: March 03, 2009, 07:17:23 PM »

I like the voice recognition a lot. I made a script for controlling iTunes with my voice.  Tongue  On the topic of Wiimotes, I think that it has much potential for games.  It would be nice to see a game designed with this in mind.  Smiley
I tried looking into that once and didn't get very far.  Mind telling me how you did it all?
Logged
reetva
Level 5
*****

Bee dee bai do beeeee


View Profile
« Reply #5 on: March 04, 2009, 03:11:01 PM »

Quote
I tried looking into that once and didn't get very far.  Mind telling me how you did it all?
Code:
ctrl+left = said("restart", 5) //starts song over, but only if 3 or more seconds into song
ctrl+right = said("next", 5)
ctrl+left = said("previous", 5)
space = said("play", 5)
space = said ("stop", 5)
That's the iTunes script.  About the fives... Well, to quote the manual:
Quote from: GlovePIE Docs
Enter = said(“jump”, 3)

The higher the number, the more confidence is required to recognise it. If it thinks you said “jump” when you actually said “pump”, set the confidence value higher. If it doesn’t recognise it when you do say “jump” set the confidence value lower.
I also have a script for Dwarf Fortress:
Code:
space = said("select")
space = said("cancel") //depends on context, though saying "pause" is more reliable
space = said("pause")  //depends on context, though saying "pause" is more reliable
ctrl+five = said("down", 1)
shift+five = said("up")
a = said("announce", 1)
b = said("build", 1)
c = said("civil", 1)
d = said("designations", 1)
shift+d = said("depot", 1)
h = said("hot keys", 1)
i = said("zones", 1)
j = said("jobs", 1)
k = said("look", 1)
l = said("artifacts", 1)
m = said("military", 1)
n = said("nobles", 1)
n = said("admin", 1)
o = said("orders", 1)
o = said("options", 1)
p = said("stockpiles", 1)
q = said("building tasks", 1)
r = said("rooms", 1)
r = said("buildings", 1)
t = said("building items", 1)
v = said("units", 1)
x = said("squads", 1)
z = said("status", 1)
I haven't really done much testing with that, but it seems to work pretty well, though the confidence levels could use some major tweaking.  Also, I wouldn't consider it complete, as it only has commands for the main in-game menu.

If you need to know anything else: Help -> Preliminary Documentation
Smiley
Logged

Hello!  I am here to boogie.  Shall we?
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #6 on: March 04, 2009, 05:07:03 PM »

Oh, you can use voice recognition wih the wiimote speaker? Shocked
Logged

GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« Reply #7 on: March 04, 2009, 05:15:24 PM »

Oh, you can use voice recognition wih the wiimote speaker? Shocked
GlovePIE isn't just for the Wiimote; you can map the PS3 controller as well, or just purely PC stuff too.  For instance, you could map a mouse to act as a virtual joystick (you'd need to use the program PPJoy as well for that though, as it's what GlovePIE uses for any virtual joystick things).  I think the voice recognition thing is just PC stuff.
Logged
GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« Reply #8 on: March 04, 2009, 05:16:13 PM »

Oh, and thanks for posting that voice recognition stuff; I'll have to play around with it later.  Smiley
Logged
agj
Level 10
*****



View Profile WWW
« Reply #9 on: March 05, 2009, 08:14:16 PM »

Wow, this thread totally makes me want to buy a Wiimote now, even though I don't have a Wii.
Logged

GregWS
Level 10
*****


a module, repeatable in any direction and rotation


View Profile
« Reply #10 on: March 05, 2009, 08:16:14 PM »

Wow, this thread totally makes me want to buy a Wiimote now, even though I don't have a Wii.
Yeah, there is actually a decent amount of people that have done that because of this.  Wiimotes are quite cheap, and apparently really good value given what they've got inside.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic