WiiSticks [wii remote + physics]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

I would love to try this, but I've only got one Wii remote for now. The Wii itself isn't available here at the moment, hopefully in a couple of days it is...

Or does it work with one Wii remote? Cause I ran to the shop to get one as soon as I saw this post (not for this game only, but I'm doing research on alternative input devices). Unfortunately, there was only one remote left, and no 'chuks.

Anyway, I also really love your original gameplay ideas, that stuff is the future of gameplay. Cause one day, everybody will get tired of only having FPS, RPG, RTS and race games.

Greetz,
JeDi

P.S. I'm creating a proof-of-concept marble puzzle game using alternate input devices. I already implemented webcam input using ARToolkit, the Wii remote is next on the menu. Once it is somewhat enjoyable, I'll post it in the Showcase forum
User avatar
Sycle
Halfling
Posts: 45
Joined: Sun Jun 11, 2006 8:21 am
Location: Sydney

Post by Sycle »

I've attempted to follow the instructions but I'm having a bit of trouble getting things to work, please forgive me if I've overlooked something obvious.

I've got my bluetooth on and my Wii remotes syncing. I've tried some of the GlovePIE scripts to confirm that my Wiimote is connected and is sending data to my machine, but when I start WiiSticks, the UI appears but it won't respond.

What else do I need to do for my remotes to talk to your demo?
Or3L
Gnoblar
Posts: 1
Joined: Wed Jan 03, 2007 8:50 pm

Post by Or3L »

Work perfectly with me.

In the readme.txt, we can read "WiiSticks requires the MSVC 8.0 runtime libraries to operate"

what is MSVC 8.0 runtime libraries ?

Edit : work in OpenGL but not in DirectX 9
Last edited by Or3L on Wed Jan 03, 2007 11:43 pm, edited 1 time in total.
User avatar
xabila
Goblin
Posts: 225
Joined: Mon Jun 05, 2006 9:40 am
Location: rennes [FR]

Post by xabila »

great job !
Is it something to handle a pointer (why not emulate the mouse) with the wii driver ?
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA
Contact:

Post by walaber »

it may only work with some Bluetooth "stacks" or drivers, I have only tested with the "BlueSoleil" stack because that is what my adaptor came with.

ans yes, you can emulate a mouse pointer with the wii remote as well, but it requires the "sensor bar", which are 2 sets of IR LEDs mounted near the screen to work.
Go Go Gadget OGRE!!
Image
vanbirk
Gnoblar
Posts: 11
Joined: Mon Jan 02, 2006 5:39 pm

Post by vanbirk »

Hej Walaber!

Looks terrific! Great work as always!
Did you write the interpretation of Wiimote movement yourself
or did you use a library like Wiim or CWiimote ?

Greetings vb
User avatar
SuprChikn
Bugbear
Posts: 863
Joined: Tue Apr 19, 2005 6:10 am
Location: Melbourne, Aus
Contact:

Post by SuprChikn »

He's using CWiimote (mentioned in another thread).
vanbirk
Gnoblar
Posts: 11
Joined: Mon Jan 02, 2006 5:39 pm

Post by vanbirk »

@SuprChikn: Could you post a link to this thread? Thx!
User avatar
SunSailor
Gnoll
Posts: 699
Joined: Sun Jan 02, 2005 5:45 pm
Location: Velbert, Germany
x 2
Contact:

Post by SunSailor »

http://www.ogre3d.org/phpBB2/viewtopic.php?t=26735

Btw, the search would have been your friend, too... ;-)
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Sorry if this is a bit offtopic, but I'm trying to use the cWiiMote class too, and apparantly I need a file called "hidsdi.h", which I can't find. Is it part of some sdk that I need to get?

Edit: Nevermind, I found the needed files here.

Greetz,
JeDi
User avatar
Levia
Halfling
Posts: 45
Joined: Fri Feb 03, 2006 9:56 pm
Location: The Netherlands

Post by Levia »

JeDi: I didnt like getting the files by hand. I simply installed the Windows DDK. (Hard to get though, alot of crap you need to go through)
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Well I sorta got it to work, but with a lot of jitter...

I put polling of the Wii remote in a thread, heartbeating and polling every 50 ms, and in a framelistener I rotate the gravity with the current roll,yaw and pitch values (protected with a mutex), multiplied with 90 (if I'm correct, the values returned from cWiiMote are between -1 and 1 which correspond to rotations between -90 and 90 degrees).

Walaber, is this sorta what you did in WiiSticks too? Or did you get your values in another way?

Greetz,
JeDi
Sudi
Gnoblar
Posts: 2
Joined: Sat Oct 14, 2006 10:58 am

Post by Sudi »

I don't know how it is with the -1 and 1 but most of the time this means it is radians...so you have to convert it to degree
Ravine
Gnoblar
Posts: 18
Joined: Sat May 06, 2006 1:47 am

Post by Ravine »

Walaber, you should think about releasing WiiSticks to this: http://experimental-gameplay.org/2007/cfp.html

This project seems to fit the experimental category.
Image
jjp
Silver Sponsor
Silver Sponsor
Posts: 597
Joined: Sun Jan 07, 2007 11:55 pm
Location: Cologne, Germany
Contact:

Post by jjp »

walaber wrote:ans yes, you can emulate a mouse pointer with the wii remote as well, but it requires the "sensor bar", which are 2 sets of IR LEDs mounted near the screen to work.
Ever tried to just put a candle on each side of your monitor? That should kind of work as well if I am not mistaken :)
User avatar
xabila
Goblin
Posts: 225
Joined: Mon Jun 05, 2006 9:40 am
Location: rennes [FR]

Post by xabila »

Led candles could be a good idea.
Sweenie
Silver Sponsor
Silver Sponsor
Posts: 92
Joined: Wed Mar 23, 2005 3:29 pm
Location: Sweden
x 1

Post by Sweenie »

Also if you have 2 old remotes lying around, just place one on each side and make each one transmit a signal.

http://www.youtube.com/watch?v=JTGSkYRDpWY


---
User avatar
yuriythebest
Orc
Posts: 468
Joined: Sun Jul 10, 2005 11:44 am
Location: Kiev, Ukraine
Contact:

Post by yuriythebest »

Sweenie wrote:Also if you have 2 old remotes lying around, just place one on each side and make each one transmit a signal.

http://www.youtube.com/watch?v=JTGSkYRDpWY
awsome! can 2 usb-irda ports (the type used for ir-ports for mobiles) be used in the same way?
asteroidWars - an OGRE game
NOOB MAKE MMORPG- the flash movie
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA
Contact:

Post by walaber »

note that you don't need the "sensor bar" (LEDs/candles) for WiiSticks, or for most games that only use motion sensing.

anyway, the remote returns the current force preceived by the remote, as a 3D vector. The units are "G"s. so if the remote is held perfectly flat, it should return 0,-1,0... because it feels the force of gravity pointing straight down.

in my program, if the overall length of the vector is near 1 (therefore not accelerating heavily in any direction), I calculate the tilt and yaw from this vector, and apply that to the physics.

btw on my local copy I have made it so you can change the yaw of the stics by tilting the remote, so you have 2 axis' of control instead of just 1. it is a bit harder to control, but once you get the hang of it it's much better than the current release.

I'll update the binary a bit later once I have improved it a bit more.
Go Go Gadget OGRE!!
Image
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

walaber: do you think it'll be possible for cWii to eventually give out interpreted x,y,z accelleration AND pitch,roll,yaw so we can just use it and pretend that it doesn't really seperately read them all? :) I only had a quick look at cWii and it seems you just get the accel and have to figure it out yourself. I assume the real Wii uses the IR to do it's best to calibrate itself when moving fast.
Also have you tried the IR? I'm pretty sure the absolute x,y,z space coords are figured out inside the controller, so that'd be brilliant if it actually worked.
ps I imagine a gesture recording part to cWii would be extremly cool :D
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

walaber wrote:anyway, the remote returns the current force preceived by the remote, as a 3D vector. The units are "G"s. so if the remote is held perfectly flat, it should return 0,-1,0... because it feels the force of gravity pointing straight down.
Hmm, that explains my jitter offcourse, I thought it was returning angles :-)
So if I understand correctly, I can't get the yaw value? Cause if we rotate around the gravitation vector (-Y in my coordinate system), the force doesn't change relatively to the remote? So setting the gravity to the received values time normal gravity it should work, but only, like you said, if the length of the values is approximately 1 so centrifugal force doesn't mess it up. Right?

Thanks!

Greetz,
JeDi
JonasBS
Gnoblar
Posts: 21
Joined: Wed Apr 27, 2005 1:43 pm

Post by JonasBS »

Looks very cool!! Just what about the controller- is there a USB reciever in the package when you buy these controller or how did you connect them to your computer???
User avatar
neocryptek
Gnome
Posts: 335
Joined: Sat Mar 01, 2003 11:21 pm
Location: Idaho, USA
Contact:

Post by neocryptek »

JonasBS wrote:Looks very cool!! Just what about the controller- is there a USB reciever in the package when you buy these controller or how did you connect them to your computer???
They are using a Bluetooth adapter (sold separately) for the PC to interface wirelessly with the controller(s):
walaber wrote:for anyone that is interested in getting a bluetooth adaptor for your PC, check this out:

http://www.acortech.com/Generic_ES-388_ ... 19645.html

US$8.00 with free shipping!!! I ordered mine on a Sunday, and it arrived on Thursday. Works perfectly with the Wii remote.
User avatar
walaber
OGRE Expert User
OGRE Expert User
Posts: 829
Joined: Sat Oct 02, 2004 2:20 pm
Location: California, USA
Contact:

Post by walaber »

JeDi - that is correct. with the accelerometer values alone, you cannot determine if the remote has been rotated around the Y axis (yaw).

if you use the IR camera (sensor bar), you can determine changes in yaw up to a limited amount, as long as the remote is pointed at the sensor bar, and can see the LEDs...

so the only way to get a 100% idea of the orientation of the remote is to use the accelerometer + the IR camera in conjunction.. which only works if the remote is pointed at the screen.

the IR is not very good for gesture recognition, because it s only valid for a very limited field of view when the remote is pointed at the screen.

that is why games like Wii Sports rely solely on the accelerometer for their input in-game (not including on-screen pointing, etc).
Go Go Gadget OGRE!!
Image
JonasBS
Gnoblar
Posts: 21
Joined: Wed Apr 27, 2005 1:43 pm

Post by JonasBS »

neocryptek wrote: They are using a Bluetooth adapter (sold separately) for the PC to interface wirelessly with the controller(s):
Oh thanks!! I didn't see that at first :oops:
Post Reply