Discuss Scratch
- Discussion Forums
- » Suggestions
- » Have USB controllers added to extensions
- mobluse
- Scratcher
100+ posts
Have USB controllers added to extensions
I use JoyDivision joystick adapter that converts from a Commodore 64/Atari joystick to USB. Now I can use it in Scratch 3, Scratch 2, and Scratch 1.4 (NuScratch) on Raspberry Pi 4 B (4GB RAM) with:
joy2key “Scratch Desktop” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
joy2key “Scratch 2” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
joy2key “Scratch 1.4 (NuScratch) of 2016-12-12” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
respectively.
Then the joystick sends keys wasd for directions and f for fire.
First you have to install jstest-gtk and joy2key. Run jstest-gtk to test the joystick/gamepad.
joy2key “Scratch Desktop” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
joy2key “Scratch 2” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
joy2key “Scratch 1.4 (NuScratch) of 2016-12-12” -X -dev /dev/input/js0 -buttons f -axis a d w s -thresh -9 9 -9 9
respectively.
Then the joystick sends keys wasd for directions and f for fire.
First you have to install jstest-gtk and joy2key. Run jstest-gtk to test the joystick/gamepad.
Last edited by mobluse (Aug. 22, 2019 14:58:54)
- scubastudentcha
- Scratcher
28 posts
Have USB controllers added to extensions
I have always wanted to play/make games with a Wii Remote. I hope that Scratch enable this feature later down the road. This will mean putting Bluetooth in this as well. I hope the Scratch team sees this, and thank you.
- Nambaseking01
- Scratcher
1000+ posts
Have USB controllers added to extensions
What? I don't seem to understand — could anyone explain?
- DerpyHead0
- Scratcher
1000+ posts
Have USB controllers added to extensions
there are projects that can only be controlled with the microphone, or if you ave a webcam, and they aren't nfe. if a project is made controller only, it's the creators fault that others can't play it, and if it is a game people want to play, others can remix to add keyboard and mouse support. How about making it a rule to ensure that the Con-Only projects are not allowed, otherwise they will be NFE projects. Meaning they will have to add some other control scheme too. Plus for some controllers, you can use Bluetooth to link it to a phone, right?
also, monitoring control schemes would make it harder to find things that are real problems.
- DerpyHead0
- Scratcher
1000+ posts
Have USB controllers added to extensions
it's a nice idea, but adding support for such a complicated control setup is far harder, and connecting a wii remote to your computer is far more complicated, requiring special software to make it fully work. I have always wanted to play/make games with a Wii Remote. I hope that Scratch enable this feature later down the road. This will mean putting Bluetooth in this as well. I hope the Scratch team sees this, and thank you.
i don't think it should be added, even though it sounds fun.
- AirWay1
- Scratcher
100+ posts
Have USB controllers added to extensions
Ah, ok. Just didn't understand yet really. Also monitering control scemes would be hard across thousands of projects.there are projects that can only be controlled with the microphone, or if you ave a webcam, and they aren't nfe. if a project is made controller only, it's the creators fault that others can't play it, and if it is a game people want to play, others can remix to add keyboard and mouse support. How about making it a rule to ensure that the Con-Only projects are not allowed, otherwise they will be NFE projects. Meaning they will have to add some other control scheme too. Plus for some controllers, you can use Bluetooth to link it to a phone, right?
also, monitoring control schemes would make it harder to find things that are real problems.
- SArpnt
- Scratcher
17 posts
Have USB controllers added to extensions
taking controller input doesn't require a license, they're just an input type like keyboards. it could potentially be a problem if they NAMED the controller type, but most modern controllers are so similar they can just be referred to as “controller” Whilst I support, because of all the reasons above, it probably won't be added since the Scratch Team would have to get licenses from the companies owning the patents for the controllers to use them in Scratch. And knowing how money-hungry the companies (Sony, Microsoft, Nintendo) producing the most wanted controllers (Xbox 360 and One controllers, DUALSHOCK™ 4 controllers, Joy-Con™ and Nintendo Switch Pro Controller), they would not give permission because people could emulate their games on Scratch for FREE.
It is a shame.
also, you can't emulate a game on scratch. scratch can barely run 3D, so a lot of games can't even be recreated fully, and for actual emulation, scratch can't even run a gameboy game at full speed.
- SArpnt
- Scratcher
17 posts
Have USB controllers added to extensions
“player” isn't a thing in scratch, this block doesn't really make sense. Maybe you could have something like:assign [Controller 1 v] to player [1 v]So you can set players easily.
what is it even supposed to do? a player could be a sprite, multiple sprites, a pen draw, etc.
- SArpnt
- Scratcher
17 posts
Have USB controllers added to extensions
(note to anyone following the thread or just looking at it now)
i changed a lot of information in the main post to simplify things a lot and make it generally a better suggestion, so if you're seeing anything (earlier than this post) that doesn't match the original post, this is the reason.
i changed a lot of information in the main post to simplify things a lot and make it generally a better suggestion, so if you're seeing anything (earlier than this post) that doesn't match the original post, this is the reason.
- Nambaseking01
- Scratcher
1000+ posts
Have USB controllers added to extensions
What? I don't seem to understand — could anyone explain?
Bumping my question.
- SArpnt
- Scratcher
17 posts
Have USB controllers added to extensions
things like xbox controllers, ps4 controllers, and other things can be connected to a computer, and used. i'm suggesting that scratch adds support so that they can be used to play projects. What? I don't seem to understand — could anyone explain?
controllers are the things that you would usually play games with on a console. generally has 2 analog sticks, 4 buttons, a dpad, and l and r buttons.
Last edited by SArpnt (Dec. 8, 2019 16:32:55)
- AirWay1
- Scratcher
100+ posts
Have USB controllers added to extensions
Support I am, will be nice to not have cramped keyboards (multiple people playing on one keyboard), but instead have simply controllers connected to the computer, and for tablets, simply use Wireless Controllers. Adding support for this feature will be a pleasure joy to many Scratchers.
- LucasLovesTacos
- Scratcher
21 posts
Have USB controllers added to extensions
“player” isn't a thing in scratch, this block doesn't really make sense. Maybe you could have something like:assign [Controller 1 v] to player [1 v]So you can set players easily.
what is it even supposed to do? a player could be a sprite, multiple sprites, a pen draw, etc.
well it's an idea
so even though “player” isnt a thing neither is controller support in scratch
- scubastudentcha
- Scratcher
28 posts
Have USB controllers added to extensions
Even with a crappy computer (that has now been taken apart, RIP 2012-2019. #NeverForget) I have connected a Wii Remote via bluetooth with and without special software. unless the control panel in windows 10 is “special software”.it's a nice idea, but adding support for such a complicated control setup is far harder, and connecting a wii remote to your computer is far more complicated, requiring special software to make it fully work. I have always wanted to play/make games with a Wii Remote. I hope that Scratch enable this feature later down the road. This will mean putting Bluetooth in this as well. I hope the Scratch team sees this, and thank you.
i don't think it should be added, even though it sounds fun.
- SArpnt
- Scratcher
17 posts
Have USB controllers added to extensions
Even with a crappy computer (that has now been taken apart, RIP 2012-2019. #NeverForget) I have connected a Wii Remote via bluetooth with and without special software. unless the control panel in windows 10 is “special software”. it's a nice idea, but adding support for such a complicated control setup is far harder, and connecting a wii remote to your computer is far more complicated, requiring special software to make it fully work.
i don't think it should be added, even though it sounds fun.
- In windows 10, the main bluetooth control panel doesn't even work for connecting a wii remote, and you have to go dig up “devices and printers”.
- When you connect it, windows recognizes the device, but it can't keep track of any inputs.
- If you wanted to have a pointer, you would need to get the wii sensor bar, which either requires bringing the wii over to your computer and powering it on, or buying a usb one. and on a laptop, there's nowhere to put the sensor bar.
also, don't forget that people actually have to spend time adding this support. This would take a long time to sort out a lot of issues, and it wouldn't be used in a lot of games. most games that would use the wii remote would REQUIRE it, because it doesn't translate well to any other control scheme. also, if the wii remote was added, there would be tons of suggestions for things like numchuck, classic controller, motion plus, and add even more work.
- AirWay1
- Scratcher
100+ posts
Have USB controllers added to extensions
Even with a crappy computer (that has now been taken apart, RIP 2012-2019. #NeverForget) I have connected a Wii Remote via bluetooth with and without special software. unless the control panel in windows 10 is “special software”. it's a nice idea, but adding support for such a complicated control setup is far harder, and connecting a wii remote to your computer is far more complicated, requiring special software to make it fully work.
i don't think it should be added, even though it sounds fun.the wii remote is filled with sensors to detect motion, which would require a ton of blocks that wouldn't make sense to most people to be added. and if they weren't added, there wouldn't be much point of using a wii remote instead of a mouse.
- In windows 10, the main bluetooth control panel doesn't even work for connecting a wii remote, and you have to go dig up “devices and printers”.
- When you connect it, windows recognizes the device, but it can't keep track of any inputs.
- If you wanted to have a pointer, you would need to get the wii sensor bar, which either requires bringing the wii over to your computer and powering it on, or buying a usb one. and on a laptop, there's nowhere to put the sensor bar.
also, don't forget that people actually have to spend time adding this support. This would take a long time to sort out a lot of issues, and it wouldn't be used in a lot of games. most games that would use the wii remote would REQUIRE it, because it doesn't translate well to any other control scheme. also, if the wii remote was added, there would be tons of suggestions for things like numchuck, classic controller, motion plus, and add even more work.
Okay, that's pretty fair for Wii remotes, it can be a lot of hard work with motion, tilting, etc. And your point with the new suggestions that might pop up will be very frustratingg for the Scratch Team.
- ItsJerryScratch
- Scratcher
11 posts
Have USB controllers added to extensions
welp i have a usb xbox one controller
- aero-a
- Scratcher
55 posts
Have USB controllers added to extensions
Your prayers have been answered (sort of…)
I have made a custom version of Scratch 3.0 (Draft 3.0, link in signature) which has a custom extension that supports gamepads! However, it does come with some caveats; the extension is geared towards 'DualShock' controllers because I used a ‘DualShock’ controller in order to create this. This means that you might have to check for the equivalent if you have a different controller.
Other than that, it should work fine! I know it's not official Scratch, but I doubt they will add it anytime soon…
Check out the forum post here for more information: https://scratch.mit.edu/discuss/topic/391360/
I have made a custom version of Scratch 3.0 (Draft 3.0, link in signature) which has a custom extension that supports gamepads! However, it does come with some caveats; the extension is geared towards 'DualShock' controllers because I used a ‘DualShock’ controller in order to create this. This means that you might have to check for the equivalent if you have a different controller.
Other than that, it should work fine! I know it's not official Scratch, but I doubt they will add it anytime soon…
Check out the forum post here for more information: https://scratch.mit.edu/discuss/topic/391360/
- b1048546
- Scratcher
1000+ posts
Have USB controllers added to extensions
Support. I would love to use wii remotes but that seems too difficult but I have an xbox remote and that sound cool!
- bigsmellybanana
- Scratcher
23 posts
Have USB controllers added to extensions
It could work like this:
when green flag clicked
if <RB pressed> then
nextobjectinhotbar
end
Last edited by bigsmellybanana (April 22, 2020 17:00:17)
- Discussion Forums
- » Suggestions
- » Have USB controllers added to extensions