Jump to content



Photo
- - - - -

How to use Wii-mote for nudging on FP


  • Please log in to reply
13 replies to this topic

#1 Logicfray

Logicfray

    Hobbyist

  • Silver Supporter
  • 14 posts

  • Flag: ---------

  • Favorite Pinball: Black Hole

  • PS3 Gamer Tag: Logicfray
  • 360 Gamer Tag: Logicfray

Posted 27 December 2009 - 05:30 AM

This was pulled from a post on the Future pinball forum that I backed up before it was shut down. The info was originally posted by Xevious99 so I would like to thank him for this info.




I had some success today using a Wiimote with my DIY Tabletop cabinet. I was able to get working to some degree both NudgeXY and Nudge keys using several pieces of software. It needs some careful tuning which is somewhat cabinet specific but hopefully this information will be useful to others.

1. Locate a working BlueTooth stack for your device as the one that come with Windows is deficient. You can find the appropriate driver for your bluetooth device here http://www.wiili.org...uetooth_Devices I needed the BlueSoleil http://www.wiili.org....php/BlueSoleil stack which is pay software but they do have a free version that complains a lot and does not transfer large amount of data but seems to work well enough for this task.
2. You need GlovePie http://carl.kenner.g...ovepie_download which is an application which can run pie scripts that can be used to translate Wiimote data streams into PC events like mouse, keyboard and joystick.
3. In order to simulate a PC joystick you need PPJoy http://www.geocities...s/PPJoyMain.htm which is primarily used for homebrew parallel port joysticks like connecting an old NES joystick to your PC but can also be used to create virtual joysticks which GlovePie can drive with scripts which can be controlled by the Wiimote.
4. You need to firmly attach your wiimote to your cabinet and it must be level as gravity is indicated as an acceleration down and if your wiimote is not flat there will be some perceived motion in that direction unless you account for that in the PIE script and zero it out.
5. Install the bluetooth driver software and sync your wiimote with your PC either by pressing the 1 and 2 buttons at the same time or the button inside the battery area. MAKE SURE YOUR Wii IS OFFor it will attach to your wiimote instead of your PC.
6. Install PPJoy and create a virtual joystick
7. Run GlovePie and run the script below.
8. Launch Future Pinball and configure it as indicated (probably only want to try either Nudge with the joystick or Nudge with the keys not both at the same time)

Here is the PIE script I was experimenting with, GlovePie seems to multi-thread things so I added the flag to prevent multiple nudges on the keys at the same time. Please experiment with it and post any results you have. Seems like it would be a solution for the shooter moving too quickly for the disassembled mouse sensors to register the motion. If I can stick one of the accelerometers from the wiimote on the end of the shooter it might work. Next I need to be able to use the IR camera in the Wiimote for TrackIR smile.gif


*******Copy Script Below*********
//Future Pinball driver

var.gx = wiimote.gx
var.gz = wiimote.gz

// send nudge keys to future pinball
if var.reset == 0 then
if abs(var.gx) > abs(var.gz) then
if var.gx > 0.10 then
var.reset = 1
Key.Z = true
wait 20 ms
Key.Z = false
wait 200 ms
var.reset = 0
elseif var.gx < -0.10 then
var.reset = 1
Key.Slash = true
wait 20 ms
Key.Slash = false
wait 200 ms
var.reset = 0
endif

elseif var.gz > 0.10 then
var.reset = 1
Key.Space = true
wait 20 ms
Key.Space = false
wait 200 ms
var.reset = 0
endif
endif

// send wiimote motion to virtual joystick which future pinball is configured for Nudge
PPJoy.Analog0 = wiimote.gx
PPJoy.Analog1 = wiimote.gz

// Show wiimote forces
debug = Wiimote.gx+', '+Wiimote.gz

#2 Gravy

Gravy

    Pinball Fan

  • VIP
  • 1,147 posts

  • Flag: Australia

  • Favorite Pinball: Simpsons pinball party



Posted 27 December 2009 - 05:46 AM

that was a nice save... well done.

Pinball Addict


#3 vartaxe

vartaxe

    Hobbyist

  • Members
  • PipPip
  • 42 posts
  • Location:Portugal

  • Flag: Portugal

  • Favorite Pinball: Terminator 2

Posted 27 December 2009 - 08:36 PM

now we need the wiimote working as analog plunger too tongue.gif

#4 unidodo

unidodo

    Hobbyist

  • Members
  • PipPip
  • 15 posts

  • Flag: United States of America

  • Favorite Pinball: Panthera!

Posted 26 April 2010 - 01:42 AM

Will this work under VP? Thanks.

Edited by unidodo, 26 April 2010 - 01:43 AM.


#5 Rawd

Rawd

    Pinball Wizard

  • VIP
  • 4,313 posts
  • Location:Edmonton, Canada

  • Flag: Canada

  • Favorite Pinball: Triple Strike



Posted 26 April 2010 - 01:53 AM

QUOTE (unidodo @ Apr 25 2010, 07:42 PM) <{POST_SNAPBACK}>
Will this work under VP? Thanks.


Yes it will. Just set the nudge keys to the same as Future Pinball. All that you are doing here is sending a key press to the computer when the wii-mote detects a nudge.

You can also set it up analog, but it doesn't work as well, and you don't get a tilt penalty... I am not sure if that would work in VP.

I use the Wiimote on my mini-cab and it works perfect! My large cabinet is too solid to nudge, so I went with buttons on that.



 


#6 unidodo

unidodo

    Hobbyist

  • Members
  • PipPip
  • 15 posts

  • Flag: United States of America

  • Favorite Pinball: Panthera!

Posted 26 April 2010 - 10:38 AM

QUOTE (Rawd @ Apr 26 2010, 02:53 AM) <{POST_SNAPBACK}>
QUOTE (unidodo @ Apr 25 2010, 07:42 PM) <{POST_SNAPBACK}>
Will this work under VP? Thanks.


Yes it will. Just set the nudge keys to the same as Future Pinball. All that you are doing here is sending a key press to the computer when the wii-mote detects a nudge.

You can also set it up analog, but it doesn't work as well, and you don't get a tilt penalty... I am not sure if that would work in VP.

I use the Wiimote on my mini-cab and it works perfect! My large cabinet is too solid to nudge, so I went with buttons on that.


Hmm, I have a wide body cabinet (a Panthera cabinet). You think by changing sensitivity (if there is a way), a wide body could detect nudge using the WII?

Thanks.

#7 groo

groo

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Brazil

  • Favorite Pinball: hawkman, taito, brazil

Posted 06 September 2010 - 09:42 PM

Please, I couldn't get mi wiimote to work.

Only digital are working.

Analog X, Y, Z isn't.

I Downloaded bluesoleil and connect to wiimote.
I Downloaded GlovePie and ran the script above.
I Downloaded PPJoy and set a virtual controller.

I ran FP and, opened Key Setting and... No analog for nudge, pluger etc.

What did I do wrong?

Thanks in advance.


#8 moogster66

moogster66

    Pinhead Deluxe

  • VIP
  • 1,277 posts
  • Location:The Hoosier State

  • Flag: United States of America

  • Favorite Pinball: Black Knight, Kiss, Black Hole, Gorgar, Centaur



Posted 08 September 2010 - 05:07 PM

Are you guys using a dongle? Which one?
I don't mind being called a PINHEAD!
I'd rather have a bottle in front of me, than a frontal lobotomy!
Posted Image

#9 groo

groo

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Brazil

  • Favorite Pinball: hawkman, taito, brazil

Posted 10 September 2010 - 03:36 PM

QUOTE (moogster66 @ Sep 8 2010, 02:07 PM) <{POST_SNAPBACK}>
Are you guys using a dongle? Which one?


I bought one of these: http://www.u-hid.com...news_id=#newsid.

It still not arrived here, but I'm already disapointed: a guy answered me in other topic that analog nudging just work with nanotech's gizmos.

Is it true? If it is, how did the guy whose wrote this topic get his wiimote working?

Regards!

#10 groo

groo

    Hobbyist

  • Members
  • PipPip
  • 10 posts

  • Flag: Brazil

  • Favorite Pinball: hawkman, taito, brazil

Posted 13 September 2010 - 12:47 AM

QUOTE (groo @ Sep 6 2010, 06:42 PM) <{POST_SNAPBACK}>
Please, I couldn't get mi wiimote to work.

Only digital are working.

Analog X, Y, Z isn't.

I Downloaded bluesoleil and connect to wiimote.
I Downloaded GlovePie and ran the script above.
I Downloaded PPJoy and set a virtual controller.

I ran FP and, opened Key Setting and... No analog for nudge, pluger etc.

What did I do wrong?

Thanks in advance.

I did a better studying over the glove pie script of original post and got it. This tutorial is not for "analog nudging". The script sends "Z", "Slash" and "Space" keys.

Thanki you very much!


#11 pasappie

pasappie

    Hobbyist

  • Members
  • PipPip
  • 26 posts
  • Location:Westerhaar VriezenveenseWijk (Overijssel)

  • Flag: Netherlands

  • Favorite Pinball: SuperMan

Posted 25 October 2011 - 08:43 PM

Thanks!!
From the Concert of live nobody get a program

#12 rooter

rooter

    Enthusiast

  • Members
  • PipPipPip
  • 111 posts

  • Flag: United States of America

  • Favorite Pinball: Theater of Magic

  • 360 Gamer Tag: root88

Posted 17 April 2012 - 03:00 AM

Would you happen to know how far you actually have to move the Wiimote to have the keypresses sent?
Can you use any Wiimote?

#13 embryon1111

embryon1111

    Hobbyist

  • Members
  • PipPip
  • 29 posts
  • Location:Newfoundland, Canada

  • Flag: Canada

  • Favorite Pinball: Embryon

Posted 30 March 2013 - 01:26 AM

I've tried for a full day to get this to work for me.  My bluetooth picks  up my wiimote, I run ppjoy and its also listed there, and I also ran the script.  When I go to control panel, the virtual stick is listed however, nothing works!!  No response from anything.  When I go to various ppjoy applications that was included in the download, I get the same results.  I followed the instructions here step by step, only to be frustrated.  Any input would be awesome!!tead of using bluesoliel

Update. . .Instead of using blue soliel for the blue tooth stack, I used a toshiba stack instead with much better results!!  I still cannot configure the controller they way I want though (in control panel) in ppjoy.  The analog part is working, but nit the way i thought it would.  For instance, my wiimote is actuall on a 30 degree angle before the ball will start moving on a playfield.  There's other issues as well.  I'm going to try and tweek it once more - then thats it!!  Enough time spent on this.


Edited by embryon1111, 30 March 2013 - 06:32 PM.


#14 GCS

GCS

    Enthusiast

  • Members
  • PipPipPip
  • 59 posts

  • Flag: ---------

  • Favorite Pinball: Gorgar

Posted 20 June 2013 - 05:27 PM

The older Wii remotes had no problem connecting to PC using bluetooth - i know because i searched a lot to find an older one to be able to make it connect and work with the Dolphin emu. But there's another option to nudge a table:

 

Get this: http://www.u-hid.com/home/uhidg.php

 

I am creating a controller (a sloped box actually) with pinball buttons on the front, left and right, that will house a U-Hid G accelometer. Nudging the controller will nudge the ball on screen.

 

It supports all six axis. When i'll be done i'll post pictures but it is some time away.