Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Wingun, lightgun, guncon 2 troubles aplenty  (Read 18023 times)

0 Members and 1 Guest are viewing this topic.

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #40 on: August 20, 2012, 02:00:40 am »
I wanted you to know that I am probably going to get my penguin pistol tomorrow, so we can find out if it works ok'n'stuff. When you get a calibration feature ready for the script, would it be much work to add a bit to it where instead of just shooting the corners/center once, you do so 3 times? (for averaging purposes) I ask because I would like to test and see if there is a difference myself. Most users (as you said) would mind the multiple shot calibrations, but I do not. For your script, is there any sort of visual confirmation of where the center is supposed to be? Like a dot or something?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #41 on: August 20, 2012, 04:00:10 am »
I was working on the calibration code tonight actually.  I still need a new sensor bar to properly test (the leds on this one are going in and out) but it works fairly well at first glance. 

It'll have multiple visual confirmations on the screen, because I very much intend for this to be a all-in one script.  At the desktop you'll be presented with flashing icons showing you where to shoot.  In mame you'll have the mame cursor "shimmer" in the position where you are supposed to shoot.  By shimmer I mean the cursor will bounce a pixel or two back and forth.  I had to do this because with mame's preferred "auto" crosshair display, the crosshairs disappear if there isn't any movement aftre a second or two.   This means you'll need to keep your crosshairs at least turned to auto, but trust me, for an ir gun that is almost a requirement.  You can turn them off for positional gun games like terminator 2, but you'll need to have the game in a spot where the game's cursor is moveable to calibrate, which means you are going to lose a game.  ;)

In either mode, if you have some form of text to speech installed, there will be a voice telling you what to do.  That could easily be replaced by wav files if a person preferred it instead of installing sapi.   

We'll see about the additional averaging.  To be honest, it would be a noticable amount of extra work.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #42 on: August 21, 2012, 07:47:05 am »
One of the more annoying aspects of glovepie's scripting language is the inability to save or retrieve settings.  It's looping nature also causes issues with constants, or lack there of. 

The constant issue is easily fixed.... you just put the variables in an if statement that can only be entered when the script starts... like so:

if var.init=0 then
     var.init=1
     var.const1=12
     var.const2=13
end if

The script starts up and of course init is 0 because it's never been defined.  Once in the loop we immediately set var.init to 1 ensuring that after these variables are set the first time, they are never set again evne though the script is constantly looping.

Saving variables is a little tricker as there isn't any easy way to do it.  Luckily glovepie supports the launching of programs in the script and the passing of variable values in the command line options.  So I wrote a little command line app that changes the variable values in a script and re-saves it. 


What does all this mean? 

Well normally any glovepie script that involves a calibration routine (like our wiimote gun script) MUST be recalibrated every time you run the script as there isn't any way to save the calibration values.  Now with my command line app, every time you calibrate your gun the values will be resaved in a "constant" section of the script, and thus the next time you open and run the script it will load your latest calibration values!   Now we are getting somewhere!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #43 on: August 22, 2012, 11:35:09 am »
Picked up a new sensor bar today.  Too bad I forgot the batteries.  (DOH!)  Anyway before the bats I did have went dead I tried it out and it works amazingly well.  Now the thing is gigantic, you could probably go into battle with it, but it has adjustable seperation distance between the leds and it works really well. 

It's called the "Wireless Ultra Sensor Bar" by Power A.  If you need one go pick it up!

Anyway, I'll see what I can do about releasing at least the basic script tonight.

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #44 on: August 22, 2012, 03:26:19 pm »
That is some wonderful news! I wanted you to know that I lost the Internet connection at my house, and I do not know when I will be getting it back. I suspect someone forgot to pay the bill but I won't find that out until I actually get around to calling my ISP. Some good news of my own though (btw posting from a friend's house): I got the penguin remote pistol and it is connecting to my bluetooth and showing up as a wii remote. I haven't been able to properly test whether it works with glovepie because of some battery issues of my own. I brought 2 pairs with me here, one that is kind of low, and the other that I thought was charged to full. Little did I know the ones that were supposed to be fully charged were in fact, dead, so I won't be able to give a 100% functional confirmation on the pistol until then, but so far it seems to be working (unless my friend has some spare batteries I can borrow).

I plan to also test a rifle shell thing that I bought, it aims the wii remote at a 90 degree angle, so it may require a modified script with roll compensation or something to work (and I do not expect you to help with that, seeing that it is not part of your plans).

(some time later) well my friend has no spare AA's, so I will just have to test it at home.

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #45 on: August 23, 2012, 06:41:40 pm »
So, I got around to testing the penguin gun, and it works, with 1 caveat and 2 potential caveats. After getting the pistol to sync with windows and GlovePIE I was unable to get the wii remote back on (will talk about this later in the post) so I gave up on comparing the two under the exact same conditions before I got too frustrated. This being said, I cannot be certain that the second condition is exclusive to the pistol, or if it is for the wii remote as well.

First of all, I have confirmed the IR sensor in the pistol is more sensitive than the wii remote, considering I had to block out the windows behind my computer in order for the cursor to stop skipping around in confusion, either when using it on the wii or the pc. I suspect however that the PC is more receptive to the sensitivity, as the cursor skipped around more frequently and violently than on the wii. This means that I will have to switch the locations of my tv and pc. (which is not a big deal because I was planning to do that anyway in the future).

Secondly, and this is the one I am not sure whether it is the pistol or the script, but when I tested it on the first draft of the script you posted, I found that at the sides of the monitor the cursor begins to skip back closer to the center of the screen. To be more specific, the horizontal field limitation is such that I can drag the cursor across to the second monitor on the left, and get about 20% across it before experiencing this phenomenon, while if I try to drag it across to the right, as soon as I get to the right edge of the screen it does this. I do not know what causes this to happen this way, whether it is a matter of the script programming or something else. If the phenomenon cannot be programmed out completely in a later revision I hope you will help me figure out how to center it on my main monitor so that if I slightly overshoot the monitor to the left or right there won't be the skip.

Third, I own the version 1 pistol. This means that it is not compatible with the Wii Motion Plus attachment. I contacted customer service and they said that they had an adapter from their returns that they can send me if I send my order number and shipping address. I purchased directly from Penguin United, and they do not have the version 2 pistol anymore. I bring this up, because aside from version 1 lacking the motion plus adapter (which customer service claims is the only thing that differs between the two) if you read the reviews for the pistol on Amazon there are statements about the pistol disconnecting mid game, and being inaccurate. I cannot verify if any of this is true, because Howard has not released a more complete version of the script for me to test the two side by side. I will see about finding a version 2 pistol when I get around to buying it a few weeks from now.

Aside from those 3 possible caveats, the pistol works fine, connects to the PC as well as a wii remote, and connects to glovePIE as well (or in my case, as poorly) as a real wii remote. I will give a direct side by side review of the over all shape, design, and button layout to a guncon 2, a wii remote, and a wii zapper in a later post, to give my full impression on the feel of the device and its strengths and weaknesses.

However, I want to bring up a technical problem I have been constantly having. Even though I can sync my wii remote to windows with little difficulty, getting GlovePIE to recognize that it has been synced has been a constant problem that has dogged me all throughout the process. Is there anything I can do to get it to recognize any easier?

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #46 on: August 24, 2012, 04:00:39 am »
Ok, I just read "fun with glovePIE" so I will try the directions you put in there for syncing, hopefully I have just been really dumb about it all or something. Can you give me an update on how the script is coming along? or even better, an updated script?

Also I am thinking that when all of this is said and done I will make a tutorial on what does and does not work in regards to light guns, so no one in the future suffers the same frustrations.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #47 on: August 24, 2012, 04:56:58 am »
It's about done.  It's only a matter of cleanup and misc stuff that needs done to it.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #48 on: August 24, 2012, 02:17:01 pm »
It's about done.  It's only a matter of cleanup and misc stuff that needs done to it.

So glad I've put off working on this until someone else worked out all the kinks.  :lol

felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #49 on: August 28, 2012, 03:13:58 pm »
I know that you are still finishing the script, but could you please post a beta of what you have completed so far? I'd like to try messing around with it.

Also, how is that wireless power bar holding up energy consumption wise? I am interested in possibly getting one, since the one I got from ebay was DOA, the only thing is, is that a lot of the ones on amazon have very mixed ratings.
« Last Edit: August 28, 2012, 03:25:03 pm by felix pontifex »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Today at 02:45:49 am
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #50 on: August 29, 2012, 04:09:48 am »
It wouldn't do you any good atm. 

I've integrated it with my writetopie app as well as various othere utilites and ect floating around the net.  I'll have to release it as a whole package unfortunately and that just isn't ready yet. 


felix pontifex

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 24
  • Last login:December 31, 2013, 01:29:10 pm
  • I want to build my own arcade controls!
Re: Wingun, lightgun, guncon 2 troubles aplenty
« Reply #51 on: August 29, 2012, 05:16:20 pm »
Well ok, as long as you don't get Mad Scientist Syndrome and keep it to yourself trying to perfect it. Also wanted to say that I looked at the ratings for the Power A version of the light bar, and it didn't have great ratings, especially in regards to the battery life. So I decided to buy the Nyko one instead. It will be here in a few days and when all is said and done we can compare notes on battery life and whatnot.

In other news, I have been looking for a used kinect to play with in conjunction with glovepie, but despite there being over 20 for sale locally I have gotten no responses yet. Weird. I was thinking if I get one I could map a gesture to show reloading (maybe pressing a on the penguin pistol and putting my other hand on the bottom of the handle, to simulate dropping a clip and putting a new one in) and a crouch feature in case I play Time Crisis or any other game that uses the foot pedal for that.