Discuss Scratch

creeperyeettt
Scratcher
500+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

No support. There is a reason why, but I can't mention it.
why?
controllers are cool
musicROCKS013
Scratcher
1000+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

No support. There is a reason why, but I can't mention it.
If it’s because this is already possible using an extension, that’s a bad reason. Not every computer allows extensions because they may be unsafe.
RobotChickens
Scratcher
500+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

(#1482)
No support. There is a reason why, but I can't mention it.
The extension is only basic key mapping; no rumble or analog input. Adding this to scratch will add full support for the controller feature set.

Last edited by RobotChickens (Nov. 28, 2022 17:25:46)

Little_Mittle12345
Scratcher
100+ posts

Have USB controllers added to extensions

Resigns
when button [a v] pressed :: pen hat // buttons include A, B, X, Y, dpad, L, R, L1, R1, L2, Left stick, Right stick, and R2. (analog sticks can be clicked down on some controllers)
// 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 [left v] stick pulled [right v]:: pen hat //happens when a stick gets pulled. Drop downs Include anywhere, right, up, left, and down.
when [L2 v] distance [= v] (100) % :: pen 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 :: pen stack // different rumble strengths

[normal v] rumble for (1) secs :: pen stack // doesn't pause script to rumble

[normal v] rumble :: pen stack // just keeps rumbling until stopped

stop rumble :: pen stack

<button [a v] pressed? :: pen> // (can drop in blocks, like above)

([left v] stick x ::pen)

([left v] stick y :: pen)

([left v] stick direction :: pen)

([left v] stick distance :: pen) // how far the stick is from the center

([L2 v] distance :: pen) // how far the trigger is pushed down (can drop in blocks, like above)
when player [1 v] connected :: pen hat

when player [1 v] disconnected :: pen hat

<player [1 v] connected? :: pen>
Instead of ::extension, do ::pen.

What does rumble do?

Last edited by Little_Mittle12345 (Nov. 29, 2022 21:44:28)

An0therRand0mC0der
Scratcher
1000+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

(#1482)
No support. There is a reason why, but I can't mention it.
You're allowed to use the word “extensions”, just not the specific name of it. You can tell us.
Knightbot63
Scratcher
1000+ posts

Have USB controllers added to extensions

Little_Mittle12345 wrote:

What does rumble do?
Rumble makes the controller vibrate.
creeperyeettt
Scratcher
500+ posts

Have USB controllers added to extensions

Little_Mittle12345 wrote:

Resigns
when button [a v] pressed :: pen hat // buttons include A, B, X, Y, dpad, L, R, L1, R1, L2, Left stick, Right stick, and R2. (analog sticks can be clicked down on some controllers)
// 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 [left v] stick pulled [right v]:: pen hat //happens when a stick gets pulled. Drop downs Include anywhere, right, up, left, and down.
when [L2 v] distance [= v] (100) % :: pen 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 :: pen stack // different rumble strengths

[normal v] rumble for (1) secs :: pen stack // doesn't pause script to rumble

[normal v] rumble :: pen stack // just keeps rumbling until stopped

stop rumble :: pen stack

<button [a v] pressed? :: pen> // (can drop in blocks, like above)

([left v] stick x ::pen)

([left v] stick y :: pen)

([left v] stick direction :: pen)

([left v] stick distance :: pen) // how far the stick is from the center

([L2 v] distance :: pen) // how far the trigger is pushed down (can drop in blocks, like above)
when player [1 v] connected :: pen hat

when player [1 v] disconnected :: pen hat

<player [1 v] connected? :: pen>
Instead of ::extension, do ::pen.

What does rumble do?
some people should know all contllers suppor r2 length like joycons
and some contllers have abxy moved around
playstation doesnt even have them

Last edited by creeperyeettt (Nov. 30, 2022 18:39:35)

RobotChickens
Scratcher
500+ posts

Have USB controllers added to extensions

creeperyeettt wrote:

(#1491)

Little_Mittle12345 wrote:

-snip-
some people should know all contllers suppor r2 length like joycons
and some contllers have abxy moved around
playstation doesnt even have them
If I'm not mistaken, PlayStation controllers Send out the same button messages as any other controller. However, as (you're right) they use shapes instead, there needs to be a generic way of handling button selection in blocks.
musicROCKS013
Scratcher
1000+ posts

Have USB controllers added to extensions

RobotChickens wrote:

there needs to be a generic way of handling button selection in blocks.
Top button (x), Left button (y), Right button (a), Bottom Button (b)

letters based on how a nintendo switch controller looks

Edit: or, there could be a picture of a generic controller and you click the button you want to use? Then no names are needed! But then it might be hard to tell afterwards what button is selected in the block

Last edited by musicROCKS013 (Dec. 1, 2022 23:40:10)

HelloJelloPeople
Scratcher
61 posts

Have USB controllers added to extensions

musicROCKS013 wrote:

RobotChickens wrote:

there needs to be a generic way of handling button selection in blocks.
Top button (x), Left button (y), Right button (a), Bottom Button (b)

letters based on how a nintendo switch controller looks

Edit: or, there could be a picture of a generic controller and you click the button you want to use? Then no names are needed! But then it might be hard to tell afterwards what button is selected in the block
Could use a small graphic showing hollow circles, with the selected one filled in. The same can be said about the D-pad, but with a PS-like D-pad.
creeperyeettt
Scratcher
500+ posts

Have USB controllers added to extensions

i dont like the ps controller its diffrent and weird
cookieclickerer33
Scratcher
1000+ posts

Have USB controllers added to extensions

Just have a menu showing a generic controller and then when you press one of the buttons it selects that button
Kinda like game builder garage
musicROCKS013
Scratcher
1000+ posts

Have USB controllers added to extensions

HelloJelloPeople wrote:

Could use a small graphic showing hollow circles, with the selected one filled in.
Yeah, but imagine an image of a controller on the inside of this block:
<key [ v] pressed?>
That's not a lot of space, so it may still be hard to tell.

HelloJelloPeople
Scratcher
61 posts

Have USB controllers added to extensions

musicROCKS013 wrote:

HelloJelloPeople wrote:

Could use a small graphic showing hollow circles, with the selected one filled in.
Yeah, but imagine an image of a controller on the inside of this block:
<key [ v] pressed?>
That's not a lot of space, so it may still be hard to tell.

Not the whole controller, just the buttons. It would still be small, but it could still be used. Alternatively, they could use direction input or direction D-pad (direction being the button direction from center, input ABXY) like so
<button [direction v] [input type v] pressed?>
the input type is input or D-pad
Example:
<button [up v] [input v] pressed?>
The above block would be Xbox-Y, Nintendo-X, PS-Triangle

Last edited by HelloJelloPeople (Dec. 2, 2022 14:56:29)

creeperyeettt
Scratcher
500+ posts

Have USB controllers added to extensions

musicROCKS013 wrote:

HelloJelloPeople wrote:

Could use a small graphic showing hollow circles, with the selected one filled in.
Yeah, but imagine an image of a controller on the inside of this block:
<key [ v] pressed?>
That's not a lot of space, so it may still be hard to tell.

it could just say button#
then when you click it the entire controller appears
musicROCKS013
Scratcher
1000+ posts

Have USB controllers added to extensions

creeperyeettt wrote:

it could just say button#
then when you click it the entire controller appears
That's a good idea! Then it doesn't have to conform to any controller type!
scratchcode1_2_3
Scratcher
1000+ posts

Have USB controllers added to extensions

An0therRand0mC0der wrote:

scratchcode1_2_3 wrote:

(#1482)
No support. There is a reason why, but I can't mention it.
You're allowed to use the word “extensions”, just not the specific name of it. You can tell us.

Oh, ok.

RobotChickens wrote:

scratchcode1_2_3 wrote:

(#1482)
No support. There is a reason why, but I can't mention it.
The extension is only basic key mapping; no rumble or analog input. Adding this to scratch will add full support for the controller feature set.

Well, yeah, it would be better, but I think that is kind of enough.

musicROCKS013 wrote:

scratchcode1_2_3 wrote:

No support. There is a reason why, but I can't mention it.
If it’s because this is already possible using an extension, that’s a bad reason. Not every computer allows extensions because they may be unsafe.

How is that extension unsafe? It was literally made by scratchers, and even though bad scratchers exist, I have been using it for like 2 years already, and nothing has happened. Sure, some schools block every single extension, but that is so that students can focus, or other extensions that are bad/harmful.
musicROCKS013
Scratcher
1000+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

How is that extension unsafe? It was literally made by scratchers, and even though bad scratchers exist, I have been using it for like 2 years already, and nothing has happened. Sure, some schools block every single extension, but that is so that students can focus, or other extensions that are bad/harmful.
It's just because they could become unsafe. The ST has no control over it, so if someone suddenly decided to make it steal all or your data or something, Scratch doesn't want to be responsible for that. At a moment's notice all could go awry. Read the ST announcement about it in the announcements forum.
RobotChickens
Scratcher
500+ posts

Have USB controllers added to extensions

scratchcode1_2_3 wrote:

RobotChickens wrote:

The extension is only basic key mapping; no rumble or analog input. Adding this to scratch will add full support for the controller feature set.

Well, yeah, it would be better, but I think that is kind of enough.
Just use a keyboard then. The main part of this extension is analog input and rumble because that's the stuff a normal keyboard Can't do. The ST is only going to make extensions that will add features to Scratch. I don't think making controller-shaped keyboards counts as a substantial change.
Minecraft_Master3964
Scratcher
500+ posts

Have USB controllers added to extensions

cookieclickerer33 wrote:

Just have a menu showing a generic controller and then when you press one of the buttons it selects that button
Kinda like game builder garage
Or like the micro:bit menu! Very useful idea!!

Powered by DjangoBB