Discuss Scratch
- Discussion Forums
- » Suggestions
- » Have USB controllers added to extensions
- boojkk
- Scratcher
100+ posts
Have USB controllers added to extensions
Support, because this does seem interesting.
- creeperyeettt
- Scratcher
500+ posts
Have USB controllers added to extensions
bump
we exist still
I dont know what a github pull req is, but can we make one for controllers? or does the ST have to do that
we exist still
I dont know what a github pull req is, but can we make one for controllers? or does the ST have to do that
- RobotChickens
- Scratcher
500+ posts
Have USB controllers added to extensions
(#1728)I'm not familiar with how github works, but you make a pull request, it gets added to a list list and the ST reviews it and accepts/rejects it. (At least I think so) It is even eiser now because TurboWarp has it built in, so we can just port that one over. Although, that one doesn't have any hat blocks. It does have multi controller support though, and there are other options too.
bump
we exist still
I dont know what a github pull req is, but can we make one for controllers? or does the ST have to do that
- creeperyeettt
- Scratcher
500+ posts
Have USB controllers added to extensions
ngl i think we should make a updated list of all the blocks this would add
i also want to add a block called controller tilt. it would be a
i also want to add a block called controller tilt. it would be a
(circle)when placed a blurb would pop up saying that not all controllers can use gyro, and before you launch the project it would say so. this could also be compatible with your mobile device gryo
- TwinAndTortoiseTeam
- Scratcher
100+ posts
Have USB controllers added to extensions
I think this could be a great feature for Scratch! On Za-Chary's post (scroll down to the 2.7 section), it saids the ability to connect gaming controllers to a computer or tablet to use for Scratch is NOT rejected. This suggestion will probably NOT be rejected. I think this is a great idea.
^‿^ // Blockly (who protects my siggy) think it's a great idea too! (^..^)
Last edited by TwinAndTortoiseTeam (May 23, 2023 23:26:23)
- Candy_lime
- Scratcher
27 posts
Have USB controllers added to extensions
This is dead but ima reply anyway.
This would be useful, especially for those on Mobile who have Consoles.
And Playstation and Xbox both have browsers that can access Scratch.
This would be useful, especially for those on Mobile who have Consoles.
And Playstation and Xbox both have browsers that can access Scratch.
- creeperyeettt
- Scratcher
500+ posts
Have USB controllers added to extensions
@robotchickens you down to make a updated version of the blocks maybe?
- Scratchuel21439new
- Scratcher
100+ posts
Have USB controllers added to extensions
Only Xbox has a web browser capable of Scratch. The PS3/PS4 one is kinda basic, PS5 has only a barebones one, Switch is same case as PS5. This is dead but ima reply anyway.
This would be useful, especially for those on Mobile who have Consoles.
And Playstation and Xbox both have browsers that can access Scratch.
Only Xbox's web browser (adapted Microsoft Edge Chromium) is capable of WebGL.
- Minecraft_Master3964
- Scratcher
500+ posts
Have USB controllers added to extensions
This isn't dead… This is dead but ima reply anyway.
This would be useful, especially for those on Mobile who have Consoles.
And Playstation and Xbox both have browsers that can access Scratch.
- RobotChickens
- Scratcher
500+ posts
Have USB controllers added to extensions
(#1733)I personally don't have the blocks on hand, but the ones on the TurboWarp github are the best option. I can't remember how to copy/access it but, I think that's the one we should use.
@robotchickens you down to make a updated version of the blocks maybe?
Go to TurboWarp, See inside>New Extension>Gamepad
I think these blocks are the closest to what we need, except the hat blocks are missing which we definitely need for new scratchers. The way they label the inputs is really good too.
Last edited by RobotChickens (May 25, 2023 12:32:04)
- creeperyeettt
- Scratcher
500+ posts
Have USB controllers added to extensions
this is also very good, but i feel like tilting controllers (nintendo and PlayStation and maybe your mobile device) would be cool Scratch has a lot of extensions for things like lego, makey makey, generally some strange input types that aren't usable for a lot of projects.
adding support for controllers would help lots of projects, especially ones that work well with analog input, like driving games,when button [a v] pressed :: extension hat // buttons include ABXY, dpad, L, R, L1, R1, L2, R2, L stick, R stick (analog sticks can be clicked down on some controllers)triggers are LT, RT, L2, R2, or ZL, ZR. note that switch controllers (if they get support) just have triggers (ZL and ZR) be at either 0% or 100% since they aren't analog.
// this could also have blocks dropped in as an input, just like you can for key pressed blocks.
// when dropping in blocks, it could take the button number ids, meaning that even unsupported controllers could work (to an extent)
when [L2 v] distance [= v] (100) % :: extension hat // input options are triggers and all stick movement (shown on next blocks)
// this block could also have blocks dropped in and take axis ids, just like the button blocks.
[normal v] rumble for (1) secs until done :: extension stack // different rumble strengths
[normal v] rumble for (1) secs :: extension stack // doesn't pause script to rumble
[normal v] rumble :: extension stack // just keeps rumbling until stopped
stop rumble :: extension stack
<button [a v] pressed? :: extension> // (can drop in blocks, like above)
([left v] stick x :: extension)
([left v] stick y :: extension)
([left v] stick direction :: extension)
([left v] stick distance :: extension) // how far the stick is from the center
([L2 v] distance :: extension) // how far the trigger is pushed down (can drop in blocks, like above)
if possible, it would change these depending on the controller currently connected, but if it can't, it could just use positions for ABXY (like the switch does for single joycons), and just use L1/L2 (there's only 2 of them, anyone can figure out which is which easily just by trying it)
another thing that could be done is adding support for multiple controllers, for thigns like multiple players. with would modify the blocks to add player numbers from 1-4 (this would be the same as the player indicator on the controller) and add these blocks.when player [1 v] connected :: extension hatmultiple controllers should probably be a togglable option (if added) because it does make things much more complicated.
when player [1 v] disconnected :: extension hat
<player [1 v] connected? :: extension>
.
Last edited by creeperyeettt (May 25, 2023 14:10:31)
- RobotChickens
- Scratcher
500+ posts
Have USB controllers added to extensions
(#1737)Please don't quote the OP-SNIP-this is also very good, but i feel like tilting controllers (nintendo and PlayStation and maybe your mobile device) would be cool
I'm not sure if gyro would be included in this sugestion. That would add complexity, and also weird mobile stuff that will slow down getting this implemented.
- creeperyeettt
- Scratcher
500+ posts
Have USB controllers added to extensions
i quoted the OP as i wanted to show their blocks?(#1737)Please don't quote the OP-SNIP-this is also very good, but i feel like tilting controllers (nintendo and PlayStation and maybe your mobile device) would be cool
I'm not sure if gyro would be included in this sugestion. That would add complexity, and also weird mobile stuff that will slow down getting this implemented.
also by Gryro I mean simple left/right tilt, now maybe it is a good idea to ditch the mobile idea but other scratch add-ons do have gyro so its not impossible
(Tilt?)
would go from like -180 to 180
or 180 to 0
idk how rotation works
this would allow for a physical steering wheel type thing
Last edited by creeperyeettt (May 26, 2023 18:06:00)
- MicrosoftWindows8
- Scratcher
37 posts
Have USB controllers added to extensions
I have one problem. Some controllers (like an Xbox One S controller) have sticks that you can push down, and that would be confusing. Maybe just have them called triggers and shoulder buttons? Support. USB controllers would be a great inclusion for Scratch, and having them as an extension will definitely not confuse new users viewing the site for the first time (as it will be hidden). However, I don't agree with some of the wording here, specifically the use of “trigger”. Remember that only Xbox controllers refer to the top buttons as triggers, whereas on PlayStation it is L2 / R2 and with Nintendo it's ZL / ZR. Instead, have it simply replaced with L, R, L2, R2. This is possibly the most simple to understand with most people when looking at a controller. When a controller is plugged in, perhaps the name could change based on what controller it is.
Last edited by MicrosoftWindows8 (May 26, 2023 22:41:47)
- RobotChickens
- Scratcher
500+ posts
Have USB controllers added to extensions
(#1740)Pushing the sticks down is one of the default outputs on all controllers that support it. When this gets added, that will be one of the inputs just like all the others.I have one problem. Some controllers (like an Xbox One S controller) have sticks that you can push down, and that would be confusing. Maybe just have them called triggers and shoulder buttons? Support. USB controllers would be a great inclusion for Scratch, and having them as an extension will definitely not confuse new users viewing the site for the first time (as it will be hidden). However, I don't agree with some of the wording here, specifically the use of “trigger”. Remember that only Xbox controllers refer to the top buttons as triggers, whereas on PlayStation it is L2 / R2 and with Nintendo it's ZL / ZR. Instead, have it simply replaced with L, R, L2, R2. This is possibly the most simple to understand with most people when looking at a controller. When a controller is plugged in, perhaps the name could change based on what controller it is.
I think the shoulder and trigger names are better because it isn't any confusing letters/numbers that are hard to remember, and it works with all controller brands.
- MicrosoftWindows8
- Scratcher
37 posts
Have USB controllers added to extensions
Maybe pushing down the sticks should be L-Stick and R-Stick?(#1740)Pushing the sticks down is one of the default outputs on all controllers that support it. When this gets added, that will be one of the inputs just like all the others.I have one problem. Some controllers (like an Xbox One S controller) have sticks that you can push down, and that would be confusing. Maybe just have them called triggers and shoulder buttons? Support. USB controllers would be a great inclusion for Scratch, and having them as an extension will definitely not confuse new users viewing the site for the first time (as it will be hidden). However, I don't agree with some of the wording here, specifically the use of “trigger”. Remember that only Xbox controllers refer to the top buttons as triggers, whereas on PlayStation it is L2 / R2 and with Nintendo it's ZL / ZR. Instead, have it simply replaced with L, R, L2, R2. This is possibly the most simple to understand with most people when looking at a controller. When a controller is plugged in, perhaps the name could change based on what controller it is.
I think the shoulder and trigger names are better because it isn't any confusing letters/numbers that are hard to remember, and it works with all controller brands.
- RobotChickens
- Scratcher
500+ posts
Have USB controllers added to extensions
(#1742)Yes, the second part of my post was responding to the second part of the previous one about triggers.Maybe pushing down the sticks should be L-Stick and R-Stick?(#1740)Pushing the sticks down is one of the default outputs on all controllers that support it. When this gets added, that will be one of the inputs just like all the others.I have one problem. Some controllers (like an Xbox One S controller) have sticks that you can push down, and that would be confusing. Maybe just have them called triggers and shoulder buttons? Support. USB controllers would be a great inclusion for Scratch, and having them as an extension will definitely not confuse new users viewing the site for the first time (as it will be hidden). However, I don't agree with some of the wording here, specifically the use of “trigger”. Remember that only Xbox controllers refer to the top buttons as triggers, whereas on PlayStation it is L2 / R2 and with Nintendo it's ZL / ZR. Instead, have it simply replaced with L, R, L2, R2. This is possibly the most simple to understand with most people when looking at a controller. When a controller is plugged in, perhaps the name could change based on what controller it is.
I think the shoulder and trigger names are better because it isn't any confusing letters/numbers that are hard to remember, and it works with all controller brands.
- Gggllittttccvhjyuy67
- Scratcher
56 posts
Have USB controllers added to extensions
(long unnecessary quote removed by moderator - please don't spam)
Yea that would be really cool especially with console controllers and wireless console controllers!
Yea that would be really cool especially with console controllers and wireless console controllers!
Last edited by Paddle2See (May 29, 2023 19:10:32)