Help with USB Gamepad extension implementation

id: 688485

category: Developing Scratch Extensions

posts: 121

I have been active on this suggestion thread which has been open for over 5 years now with many various supporters along the way. The ST has openly said it is not rejected, yet there has been no visible progress (to my knowledge) on the implementation of USB Gamepad support. A few supporters and I would like to take things into our own hands and make a pull request to the Scratch GitHub for this feature. We are unsure how to proceed and would like some help/advice on the matter. We wouldn't have to start from scratch (haha) because there are already people who have made their own open-source extensions for this. (One of them is on TurboWarp)

To be clear! This is NOT button mapping. The suggestion is to have a separate group of blocks (as a Scratch extension) with analog and rumble support!!
Reported to be moved to the Open Source Projects section
my bad
Have you decided API/lib you're gonna use? That's one of the first things to decide before developing it. And gave you forked the repo already?

GIitchInTheMatrix wrote:

(#10)
Have you decided API/lib you're gonna use? That's one of the first things to decide before developing it. And gave you forked the repo already?
No, I haven't done anything yet. I'm a GitHub noob, sorry. I do have an account though.
weewoooweeeooooweeoo

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#10)
Have you decided API/lib you're gonna use? That's one of the first things to decide before developing it. And gave you forked the repo already?
No, I haven't done anything yet. I'm a GitHub noob, sorry. I do have an account though.
Fork the Scratch-vm repo, and set it up locally. From there, ensure you know JS and the blocky lib. You wanna find a good controller lib. LMK when all that's done.

GIitchInTheMatrix wrote:

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#10)
Have you decided API/lib you're gonna use? That's one of the first things to decide before developing it. And gave you forked the repo already?
No, I haven't done anything yet. I'm a GitHub noob, sorry. I do have an account though.
Fork the Scratch-vm repo, and set it up locally. From there, ensure you know JS and the blocky lib. You wanna find a good controller lib. LMK when all that's done.
Hey, I have close to no experience with coding languages other than Scratch and I don't know anything about GitHub, is there still any way I can help?

crawfishcode wrote:

GIitchInTheMatrix wrote:

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#10)
Have you decided API/lib you're gonna use? That's one of the first things to decide before developing it. And gave you forked the repo already?
No, I haven't done anything yet. I'm a GitHub noob, sorry. I do have an account though.
Fork the Scratch-vm repo, and set it up locally. From there, ensure you know JS and the blocky lib. You wanna find a good controller lib. LMK when all that's done.
Hey, I have close to no experience with coding languages other than Scratch and I don't know anything about GitHub, is there still any way I can help?
Make a GitHub Account, and start learning JS. You can’t jump into frameworks or libraries without knowing how the language works. Also, learn errors and than set up the Scratch environment locally. The Scratch-vm repo in particular. You’ll find in under the scratchfoundation account.
Actually, important question. Does everyone here know what a PR is?

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob

crawfishcode wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob
A pull request is basically a request get a feature you write to a service.

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob
A pull request is basically a request get a feature you write to a service.
Wait, so do you write code for a PR, or do you just ask for XYZ to be added?

crawfishcode wrote:

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob
A pull request is basically a request get a feature you write to a service.
Wait, so do you write code for a PR, or do you just ask for XYZ to be added?
You write the code

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob
A pull request is basically a request get a feature you write to a service.
Wait, so do you write code for a PR, or do you just ask for XYZ to be added?
You write the code
oh, ok. Do we build off of the code already made by the ST, or do we start from scratch (pun not intended lol)?

crawfishcode wrote:

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

crawfishcode wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
Uh, no…? Like I said before, I'm a complete noob
A pull request is basically a request get a feature you write to a service.
Wait, so do you write code for a PR, or do you just ask for XYZ to be added?
You write the code
oh, ok. Do we build off of the code already made by the ST, or do we start from scratch (pun not intended lol)?
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
In theory witj changes.

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
I think I do, altho I am not quite sure because I haven’t learned how to do JavaScript yet.

PaperMarioFan2022 wrote:

GIitchInTheMatrix wrote:

Actually, important question. Does everyone here know what a PR is?
I think I do, altho I am not quite sure because I haven’t learned how to do JavaScript yet.
Pulls are something that GitHub{and i think git itself) has anyways, regardless if language.

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
Ah, I didn't think about that. There is also this project already

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
There is also this project already

I don’t like how the editor looks on mobile view. PC should be better use for this version of the editor.

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
Ah, I didn't think about that. There is also this project already
oh yeah sheeptester! i used to make alot of games with that and my xbox controller!

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
Ah, I didn't think about that. There is also this project already
OMG THIS IS SO LIT

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
Ah, I didn't think about that. There is also this project already
Maybe we could take the code from this page, tweak it a little, and put it in the PR? I noticed that there are some features that I would like added missing.

PaperMarioFan2022 wrote:

(#31)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
There is also this project already

I don’t like how the editor looks on mobile view. PC should be better use for this version of the editor.
Of course, we aren't using the editor, only the code from the GitHub.

crawfishcode wrote:

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#29)

RobotChickens wrote:

creeperyeettt wrote:

(#27)

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#22)
-Snip-
You build off what they have. You’ll likely have to build a full environment, including scratch-vm and other editor prerequisites before you can work on it, so you can build and run the code.
I do know about PRs but not so much about environments yet, I'm learning now.
Could we possibly use the code from TurboWarp's existing extension or other existing gamepad projects?
shouldnt we ask the guy who made turbowarp for his code maybe
It's already on GitHub
TurboWarp is compiled, while Scratch is interpreted.
Ah, I didn't think about that. There is also this project already
Maybe we could take the code from this page, tweak it a little, and put it in the PR? I noticed that there are some features that I would like added missing.
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.

GIitchInTheMatrix wrote:

(#36)

crawfishcode wrote:

RobotChickens wrote:

Ah, I didn't think about that. There is also this project already
Maybe we could take the code from this page, tweak it a little, and put it in the PR? I noticed that there are some features that I would like added missing.
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
Ok then, we'll have to start from the beginning then.

RobotChickens wrote:

GIitchInTheMatrix wrote:

(#36)

crawfishcode wrote:

RobotChickens wrote:

Ah, I didn't think about that. There is also this project already
Maybe we could take the code from this page, tweak it a little, and put it in the PR? I noticed that there are some features that I would like added missing.
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
Ok then, we'll have to start from the beginning then.
Not really, Writing controller support from the bottom up is tough, Just use a controller lib and Blockly.
misaPuding misaPuding loading

GIitchInTheMatrix wrote:

(#36)
-snip-
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
i don´t know if ST accepts PR´s at all

misaPuding wrote:

GIitchInTheMatrix wrote:

(#36)
-snip-
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
i don´t know if ST accepts PR´s at all
I believe I've seen a few.

GIitchInTheMatrix wrote:

misaPuding wrote:

GIitchInTheMatrix wrote:

(#36)
-snip-
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
i don´t know if ST accepts PR´s at all
I believe I've seen a few.
Can you help us make the PR?
Can you help us out with the PR, GlitchInTheMatrix?
Can you help us out with the PR, GlitchInTHeMatrix?
oh shoot, it didnt load all the posts on my pc, so i thought they didn't send, sorry

crawfishcode wrote:

GIitchInTheMatrix wrote:

misaPuding wrote:

GIitchInTheMatrix wrote:

(#36)
-snip-
It's designed for a much different version of the Scratch editor, and i don't think the ST accepte PR's if they use code from extensions/mods.
j
i don´t know if ST accepts PR´s at all
I believe I've seen a few.
Can you help us make the PR?
Only after it's been programmed. Best for it to be a tenporary org that is used to add it
we cant make a pull req using turbowarp right?

theres a user by the name of sheeptester who made a controller mod maybe we can ask him

creeperyeettt wrote:

(#44)
we cant make a pull req using turbowarp right?

theres a user by the name of sheeptester who made a controller mod maybe we can ask him
Both are mods, so the source won't work as well on Scratch as other extensions, Sheeptester is, IIRC, based off Turbowarp, which uses a compiler instead of an interpreter.
AFAIK you can't just use a turbowarp extension on Scratch.
those are the 3 types of extensions, with the last 2 being the ones you can load into turbowarp. however, scratch only supports core extensions, so you'd have to make most of it yourself.

EngineerRunner wrote:

AFAIK you can't just use a turbowarp extension on Scratch.
those are the 3 types of extensions, with the last 2 being the ones you can load into turbowarp. however, scratch only supports core extensions, so you'd have to make most of it yourself.
The goal is to add support to Scratch via a pull request.
However, it is true that TurboWarp exclusive extensions can't run in Scratch's VM