Discuss Scratch

SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

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

when button [a v] pressed :: extension hat // buttons include ABXY, dpad, L, R, LT, RT, and analog sticks (they can be clicked down on some controllers)

when [LT amount v] amount [= v] (100) % :: extension hat // input options are triggers and all stick movement (shown on next blocks)

rumble for (1) secs :: extension stack

rumble :: extension stack // just keeps rumbling until stopped

stop rumble :: extension stack

<button [a v] pressed? :: extension>

([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

([LT v] pressure :: extension) // how far the trigger is pushed down
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.
another thing to help is that text on the blocks will change depending on which type of controller is connected.

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 hat

when player [1 v] disconnected :: extension hat

<player [1 v] connected? :: extension>
multiple controllers should be a togglable option because it does make things much more complicated.

Last edited by SArpnt (Dec. 8, 2019 00:06:24)


when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
Bla-Games
Scratcher
100+ posts

Have USB controllers added to extentions

Support
It would be really cool

Give me an internet! I only have 3 as of April 8th, 2018.
oh, kumquats attacked. failure endured. I have hired him to protect me. x_x
Generation 380: the first time you see this copy and paste it on top of your sig in the scratch forums and increase generation by 1. Social experiment.
-Osiris-
Scratcher
100+ posts

Have USB controllers added to extentions

Support, I don't know if what you say about more Scratchers having USB controllers is true, but I think this would be a cool idea for those who do have USB controllers. My one question, and pardon me if it is a dumb one is: are USB controllers compatible with Scratch? I mean, Picoboards and LegoWeDo were designed to be compatible with Scratch, right?


LiberlandAnimations
Scratcher
31 posts

Have USB controllers added to extentions

-Osiris- wrote:

are USB controllers compatible with Scratch?
I wonder what this thread is about.

LiberlandAnimations, Good Scratcher

Oh cool a rainbow!

I play ROBLOX (user: chad4411), Minecraft (XBOX user: mudkip6911), and more!

My favorite color is this one! (Purple)



-Osiris-
Scratcher
100+ posts

Have USB controllers added to extentions

LiberlandAnimations wrote:

-Osiris- wrote:

are USB controllers compatible with Scratch?
I wonder what this thread is about.
I mean, are the controllers capable of being compatible with Scratch?


LiberlandAnimations
Scratcher
31 posts

Have USB controllers added to extentions

-Osiris- wrote:

LiberlandAnimations wrote:

-Osiris- wrote:

are USB controllers compatible with Scratch?
I wonder what this thread is about.
I mean, are the controllers capable of being compatible with Scratch?
Oh! In that case, seeing how many other people did it before (as in, with other games and such that were indie) I think it's totally possible.

LiberlandAnimations, Good Scratcher

Oh cool a rainbow!

I play ROBLOX (user: chad4411), Minecraft (XBOX user: mudkip6911), and more!

My favorite color is this one! (Purple)



SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

-Osiris- wrote:

are USB controllers compatible with Scratch?
For the online version: search up “HTML5 Gamepad Tester” on google. if one website can detect it, any website could. the only problem here would be that scratch uses flash, and i'm not sure if flash can detect controllers, but there could possibly be a workaround if flash can interact with the rest of the webpage, where then i believe HTML could pick up the controller signals, then flash would use the data from that.

For the offline version: Absolutely could work, no doubt.

Last edited by SArpnt (Dec. 21, 2017 15:49:18)


when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
Cub56
Scratcher
1000+ posts

Have USB controllers added to extentions

Why do you need a controller?

Check out Life Raft Survival, my new advanced sandbox survival game with crafting, building, transportation, weather events, tropical storms, and more!

In the game you're stranded at sea after a mysterious crash and must survive in an unforgiving tropical island environment collecting resources and crafting, in an attempt to finally be rescued.



Hex4Nova
Scratcher
500+ posts

Have USB controllers added to extentions

Cub56 wrote:

Why do you need a controller?
Because it's cool


「カオスだよ、カオスだね!」
250th post | 500th post | 750th post | 1000th post
OXYGEN: A forum banner shop
lightedblox
Scratcher
73 posts

Have USB controllers added to extentions

SArpnt wrote:

the only problem here would be that scratch uses flash, and i'm not sure if flash can detect controllers, but there could possibly be a workaround if flash can interact with the rest of the webpage, where then i believe HTML could pick up the controller signals, then flash would use the data from that.

also remember that scratch 3 will not be flash-based, it will be html based.

support

Please…. Try our freshly baked new projects! (Now in 3D!)


DOOM 3D OBJ IMPORTER STARFOX 3D GAME DEMO
(Click on the images to play them!)
SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

bump

Last edited by SArpnt (Jan. 28, 2018 15:13:32)


when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
wWSunPandaWw
Scratcher
1000+ posts

Have USB controllers added to extentions

Support. This would get the “Extensions” blocks used more frequently because not a lot of people on Scratch use Lego WeDO or other stuff.

I moved to BelieverGirlSun
LiberlandAnimations
Scratcher
31 posts

Have USB controllers added to extentions

Exactly. The whole idea behind those other extensions was a promo by LEGO. The only other use for it is if you want to use fan-made extensions in ScratchX. Making controller support (with custom mapping probably) would be really amazing, since with multiplayer games, it is hard to map all of the controls to just the keyboard (you can see with my project Dragon Lord - it's only ever easy to play it multiplayer if you have small hands). I'd love to see this in Scratch 3.0 since you can definitely do it with HTML5, and that's what Scratch 3.0 is being made in.

LiberlandAnimations, Good Scratcher

Oh cool a rainbow!

I play ROBLOX (user: chad4411), Minecraft (XBOX user: mudkip6911), and more!

My favorite color is this one! (Purple)



Cub56
Scratcher
1000+ posts

Have USB controllers added to extentions

I guess this could be nice, but the need of a controller is partially caused by Scratch not supporting all keybinds (like I have to use space to aim down sights in my FPS game instead of right click).

What about people without a controller?

Check out Life Raft Survival, my new advanced sandbox survival game with crafting, building, transportation, weather events, tropical storms, and more!

In the game you're stranded at sea after a mysterious crash and must survive in an unforgiving tropical island environment collecting resources and crafting, in an attempt to finally be rescued.



WolfCat67
Scratcher
1000+ posts

Have USB controllers added to extentions

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.

epicRedHot
Scratcher
500+ posts

Have USB controllers added to extentions

WolfCat67 wrote:

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.
This seems like the best choice.
(Ironic, how the system with the most confusing face buttons to outsiders also has the simplest name for the shoulder buttons.)

I occasionally do things.
SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

Cub56 wrote:

What about people without a controller?
Controller is definetly not a replacement for keyboard, and never will be. any game that supports it will still have an option for keyboard. If a game leaves out the keyboard option, it's not the fault of the extension, it's the fault of the creator.

when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

WolfCat67 wrote:

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.

Noted that different controllers will have different extensions, and changed blocks to be less confusing.

when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
SArpnt
Scratcher
15 posts

Have USB controllers added to extentions

(insert bump here)

Last edited by SArpnt (Feb. 1, 2018 11:32:29)


when I see [thing v] :: hat :: events
if <(thing :: sensing) is upgradable?> then
set [old thing v] to (thing :: sensing)
upgrade (thing :: sensing) :: control
if <(awesomeness of (thing :: sensing) :: operators) < (awesomeness of (old thing) :: operators)> then
go back :: control
if <not<(thing :: sensing) = (old thing)>> then
GO BACK :: control
end
end
else
look for [things v] :: motion
end
EmperorWolf
Scratcher
15 posts

Have USB controllers added to extentions

I totally support this. I personally don't have a controller, but this sounds like a good idea. FULL SUPPORT!



Powered by DjangoBB

Standard | Mobile