JoyTail is an experimental program I made that lets you connect a joystick to scratch. I know I'm not the first to make something like this, but this one is a little different. Instead of emulating key presses it uses the Remote Sensor interface to send joystick input directly to Scratch.
You can download JoyTail itself here. It's an exe, so you don't need any extra software to use it. But I included the source code too, in case you don't trust the exe or you want to modify it. It's written in a language called AutoHotkey (which I highly recommend, by the way.)
Here's sample project using it. A complete game is now available too.
Last edited by ManaUser (2009-04-29 01:46:40)
Offline
Looks like a nifty utility - thanks for sharing!
I'm very interested in the AutoHotKey language you mentioned...it sounds like it could definately make me more productive. Thanks for that too.
Offline
ManaUser wrote:
JoyTail is an experimental program I made that lets you connect a joystick to scratch. I know I'm not the first to make something like this, but this one is a little different. Instead of emulating key presses it uses the Remote Sensor interface to send joystick input directly to Scratch.
You can download JoyTail itself here. It's an exe, so you don't need any extra software to use it. But I included the source code too, in case you don't trust the exe or you want to modify it. It's written in a language called AutoHotkey (which I highly recommend, by the way.)
Here's sample project using it. I'll have a complete game that uses it to post soon.
Wow. Really nice. I didn't know that AutoHotkey was that powerful. You should put this on the scratchconnections.wik.is site.
Offline
Thanks (both of you). And yes, AutoHotkey is pretty nifty. The secret in this case is that it can call functions from DLLs, so really you can do just about anything with it that you can do with another Windows programing language. Still I wouldn't claim it's good language for doing networking stuff, it was a pain to get that part set up, even working from an example, and it's still kind of rough. It does have native joystick support though, so it kind of evened out. Where it really shines is as a macro language (hence the name) but it's fun that you can do much more with it if you want.
And yes, I'll see about adding JoyTail to that wiki. I want to finish this game I made to go with it first. (Originally this was just going to be a demo, but I decided it was pretty fun and deserved more work put into it, so made that simple demo instead.)
Offline
Alright. I've got a full game uploaded. It's called Shadow Rocks and it's basically an Asteroids clone, but I think it plays very nicely.
It also shows off a "secret" feature of JoyTail which lets it save a variable even if you don't save the project. I used this to keep a high score.
By the way, the game only uses the X-axis and Y-axis on the joystick and up to ten buttons (with only two really needed), but the demo I posted earlier supports 32 buttons and six axes. So if anybody has a really fancy joystick I'd especially appreciate it if you tested it, because mine doesn't have that many so I can't test it completely.
Offline
Hi, ManaUser.
Great work! It works fine on my Classmate PC.
Typical game controller is more cheaper than other input device such as Pico Board. Cheapest one is sold under $3 in Japan. So we can disassemble to get many input buttons. It's an interesting curriculum for scratch workshop.
BTW, I did another hack for supporting joystick for Scratch.
http://squeakland.jp/abee/tmp/ScratchJoystick.zip
Put ScratchJoystick.image and ScratchJoystick.changes into the same folder of Scratch.image and drag ScratchJoystick.image on Scratch.exe.
joystickTest.sb shows how to use it.
I wrote it in Smalltalk with ScratchSource1.3.1.
Cheers,
Kazuhiro Abe
Offline
I Dont Know How To Use It
Offline
Galacticfuzz wrote:
I Dont Know How To Use It
same here. how do you put it in scratch? and also, do you need to download autohotkey to make it work?
Last edited by 16Skittles (2009-10-18 10:31:09)
Offline
I found out it didn't work because I didn't download JoyTail.
JoyTail is awesome, but could you make it support some other joystick things, such as slider, Z rotation, and point-of-view hat?
Offline
I have a mac...
Offline
how did you two even find this topic?
Offline
ManaUser wrote:
JoyTail is an experimental program I made that lets you connect a joystick to scratch. I know I'm not the first to make something like this, but this one is a little different. Instead of emulating key presses it uses the Remote Sensor interface to send joystick input directly to Scratch.
You can download JoyTail itself here. It's an exe, so you don't need any extra software to use it. But I included the source code too, in case you don't trust the exe or you want to modify it. It's written in a language called AutoHotkey (which I highly recommend, by the way.)
Here's sample project using it. A complete game is now available too.
When I tried downloading AutoHotkey, it warned me that it contains unsafe programming. Has anything happened to your computer that has AutoHotkey?
Last edited by ajg29 (2011-02-21 13:16:29)
Offline
Also... What kind of joystick do you need... I have some old things that used to work on those 'PlugN'Play TV games if you know the sort... Would that do the trick?
Offline
Hi Bulbo
I'd imagine that almost any joystick would work... you could simply try it out with your joystick.
Offline
Okay.... Will do! But I still don't really understand all this extra code needed for the sensory blocks...
Offline
BulboGrubb wrote:
Also... What kind of joystick do you need... I have some old things that used to work on those 'PlugN'Play TV games if you know the sort... Would that do the trick?
No. It needs to be a joystick that is designed to be used on a PC(like a USB joystick)
Offline
how do people keep finding these topics? over the nearly 1 year it's been open, it only has, like 20 posts. this should be closed, too much necroposting.
Offline
martianshark wrote:
I found out it didn't work because I didn't download JoyTail.
JoyTail is awesome, but could you make it support some other joystick things, such as slider, Z rotation, and point-of-view hat?
It does already. Z rotation is equivalent to the R axis. POV is Point-Of-View hat.
Offline