I don't know if this is under the right header, but here goes...

Recently, I discovered a really cool program called GlovePIE. Basically, it lets you translate any concieveable input into any other concieveable input (e.g keyboard keys to mice, mouse to joystick, USB joystick to MIDI, or any other combination). It also does Wiimote and SIXAXIS with gestures (I use this program for the former). It even differentiates between multiple mice and keyboards!

Here's a little sample of GlovePIE code:

Code:

// Nunchuk to move, B on Wiimote to shoot, swing up to jump
Left = Wiimote1.Nunchuk.Left
Right = Wiimote1.Nunchuk.Left
Up = Wiimote1.Nunchuk.Left
Down = Wiimote1.Nunchuk.Left
mouse.LeftButton = Wiimote1.B
Space = Wiimote1.SwingUp


I realize that this would let you use WabbitEmu with a joystick or any other device, since GlovePIE could read the joystick and press corresponding keys. This would definitely make some games, such as Geometry Wars, far easier to test, since you could simply map far-apart keys to neighboring buttons on your joystick and fire away.
Indeed, you could do that Smile I, personally, use my Wiimotes to let me play other games on the computer. I have one set up so I can play Cave Story, SuperTux2, as well as just moving the mouse around. I tried one for playing Minecraft, but I got bored and started playing Cave Story instead Razz However, I used Python and cwiid to do it, instead of GlovePIE (Never could get that one to work for me). For example, here's the script I wrote to play Cave Story with a Wiimote turned on its side (2 to jump, 1 to shoot, arrows to move, I think):
Code:
#!/usr/bin/python
import cwiid
from time import sleep
from os import system

w = cwiid.Wiimote()
w.rpt_mode = cwiid.RPT_BTN
w.led = 15

keys = [
    {'isdown': False,
     'wiikey': cwiid.BTN_DOWN,
     'xtekey': 'Right'},
    {'isdown': False,
     'wiikey': cwiid.BTN_LEFT,
     'xtekey': 'Down'},
    {'isdown': False,
     'wiikey': cwiid.BTN_RIGHT,
     'xtekey': 'Up'},
    {'isdown': False,
     'wiikey': cwiid.BTN_UP,
     'xtekey': 'Left'},
    {'isdown': False,
     'wiikey': cwiid.BTN_2,
     'xtekey': 'z'},
    {'isdown': False,
     'wiikey': cwiid.BTN_1,
     'xtekey': 'x'},
    {'isdown': False,
     'wiikey': cwiid.BTN_PLUS,
     'xtekey': 'Escape'},
    {'isdown': False,
     'wiikey': cwiid.BTN_MINUS,
     'xtekey': 'F1'},
    {'isdown': False,
     'wiikey': cwiid.BTN_B,
     'xtekey': 'a'},
    {'isdown': False,
     'wiikey': cwiid.BTN_A,
     'xtekey': 's'}
    ]

while( 1 ):
    # If nunchuk is active then dump the values.
    for key in keys:
        if w.state['buttons'] & key['wiikey']:
            if not key['isdown']:
                system('xte "keydown ' + key['xtekey'] + '"')
            key['isdown'] = True
        else:
            if key['isdown']:
                system('xte "keyup ' + key['xtekey'] + '"')
            key['isdown'] = False
    sleep(0.01)
(And, yes, there are better ways to do that, but it worked at the time)
I found a similar program before, but it did not let me use my gamepad's d-pad, only the analog sticks, which made it hard to control games where you only moved in 4 directions.
You're probably thinking of AutoHotKey, DJ_O. I used AutoHotKey to do the required key remapping for Clove 2, the Cemetech Bluetooth Dataglove; for Clove 3, I'm coding up my own USB device that does the remapping internally and exposes a USB HID hybrid mouse/keyboard to the computer, thus requiring no special software drivers at all. This seems like a very cool program though, Compy; thank you for sharing!
A script I (or someone else) should write in GlovePIE:

A 4-player PinduriTI script: Basically, the script will read from up to 4 controllers (Wiimotes, joysticks, etc.) that are mapped to calc keys. On every frame, the script will serve the input of 1 player by clicking in that player's region and then pressing keys based on that player's controller state. If multiple people are pressing buttons in any one frame, then the person who has waited longer to be served will be served. This would allow for somewhat-seamless multiplayer testing on an emulator.
That sounds like a great idea! Your next challenge is to interface this with jsTIfied, when I release a private/public demo of the project.
KermMartian wrote:
That sounds like a great idea! Your next challenge is to interface this with jsTIfied, when I release a private/public demo of the project.

Of course, GlovePIE has a small problem: its scripts run at only 40 frames per second, which means that every player would only get an average of 10 keypresses per second (and many ASM calc games go faster than that). With three players, we'd get 13 KPS, and with two, we'd get 20 KPS. So, inputting with PindurTI would not be a problem for turn-based programs such as Obliterate, but it would be clunky with games where all players play simultaneously.

However, when you make jsTIfied, you could possibly remap different keys to different calculators, which means that instead of only one calc getting input on a particular frame, all four could get input at once, meaning that all calcs get 40 keys per second, much faster than most games' frame rates.
Actually, I have some updates that I hope to make to PindurTI, since I have the source in hand. I could easily make a key-mapping mode where you could use (say) the arrow keys, 2nd, and ALPHA keys on all four screens simultaneously.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement