Discuss Scratch

arpruss
New Scratcher
9 posts

Gamepad extension (Scratch 3.0)

I made a gamepad extension for Scratch 3.0 which can be loaded through the load_plugin functionality of SheepTester's mod: https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js

Provides hat blocks for button press/release and for axis movement, a boolean block for button down, an axis value reporter, and a rumble command block.

Only works with a single gamepad at present, for simplicity.
andyprou
Scratcher
5 posts

Gamepad extension (Scratch 3.0)

I've been looking for something like this for a some time, so thanks a lot to for doing this, support to another controller would be nice of course, but this is already so good.
Ezlambry
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

Ooh! This is awesome! I'd love to use this for a project at some point
arpruss
New Scratcher
9 posts

Gamepad extension (Scratch 3.0)

I've reworked the extension. It now supports multiple gamepads. I also renumbered the buttons and axes to start at 1 rather than 0 to match Scratch indexing and joy.cpl button numbers.
TheGeniusCoder
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

arpruss wrote:

I've reworked the extension. It now supports multiple gamepads. I also renumbered the buttons and axes to start at 1 rather than 0 to match Scratch indexing and joy.cpl button numbers.
can you provide some screenshots of examples of this working because this extension is a bit different then the other gamepad extension that was on scratchx, and the wording is throwing me off such as gamepad would this work with a xbox one controller?
neverminded I got it working and figured it out on my own but the rumble feature doesn't work with my xbox one controller.
is this specific to one controller or is it a bug?
TheGeniusCoder
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

arpruss wrote:

I made a gamepad extension for Scratch 3.0 which can be loaded through the load_plugin functionality of SheepTester's mod: https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js

Provides hat blocks for button press/release and for axis movement, a boolean block for button down, an axis value reporter, and a rumble command block.

Only works with a single gamepad at present, for simplicity.
do you plan on adding dpad support since some controllers do use dpads, and do you plan on adding L R LR RL button support?
TheGeniusCoder
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

TheGeniusCoder wrote:

arpruss wrote:

I made a gamepad extension for Scratch 3.0 which can be loaded through the load_plugin functionality of SheepTester's mod: https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js

Provides hat blocks for button press/release and for axis movement, a boolean block for button down, an axis value reporter, and a rumble command block.

Only works with a single gamepad at present, for simplicity.
do you plan on adding dpad support since some controllers do use dpads, and do you plan on adding L R LR RL button support?
nevermind I found out that by changing the button from 1-16 you're able to use all buttons even the clickable ones on the joysticks now my other question is do you plan on adding values to check how far down the LR and RL buttons are? and to fix the rumble feature? really cool extension
odysseyian
Scratcher
9 posts

Gamepad extension (Scratch 3.0)

bump
reallysoftuser
Scratcher
1000+ posts

Gamepad extension (Scratch 3.0)

arpruss wrote:

I made a gamepad extension for Scratch 3.0 which can be loaded through the load_plugin functionality of SheepTester's mod: https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js

Provides hat blocks for button press/release and for axis movement, a boolean block for button down, an axis value reporter, and a rumble command block.

Only works with a single gamepad at present, for simplicity.
You are breathtaking
SonicFan7000
Scratcher
5 posts

Gamepad extension (Scratch 3.0)

I've Been Using This extenstion for quite some time now and i really like the way it works but for some reason the rumble doesn't work and i use an official xbox one s controller if your wondering… so i really wanna see this function fixed because it would really help for my game i'm working on
CST1229
Scratcher
1000+ posts

Gamepad extension (Scratch 3.0)

Here's my suggestion: Add support for POV pads.
Also, trying to get a button/axis from pad 0- reports nothing, trying to get button/axis 0- also reports nothing, EXCEPT if it's used to modify a list, then Scratch crashes.

Last edited by CST1229 (March 17, 2021 09:03:43)

CRVernon
Scratcher
19 posts

Gamepad extension (Scratch 3.0)

I'm not getting anything on the axes of my generic Xbox controller. Nor the D pad.

The other buttons are working. So there must be something weird with how Xinput deals with analog axes.
The_RealGobo
Scratcher
22 posts

Gamepad extension (Scratch 3.0)

how does it work
edit nvm i get it

Last edited by The_RealGobo (April 24, 2021 13:47:10)

testertostera
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

arpruss wrote:

I made a gamepad extension for Scratch 3.0 which can be loaded through the load_plugin functionality of SheepTester's mod: https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js


Unfortunately it doesn't work with HTMLifier Or maybe I do something wrong. Scratch file works but HTML5 not
Thunderguy77
Scratcher
38 posts

Gamepad extension (Scratch 3.0)

Yes is there any way that this could be made to work with the HTMLifier? That would be great so I could then convert the project into an embedded webapp or something
CST1229
Scratcher
1000+ posts

Gamepad extension (Scratch 3.0)

Thunderguy77 wrote:

Yes is there any way that this could be made to work with the HTMLifier? That would be great so I could then convert the project into an embedded webapp or something
Yes!
testertostera
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

CST1229 wrote:

Thunderguy77 wrote:

Yes is there any way that this could be made to work with the HTMLifier? That would be great so I could then convert the project into an embedded webapp or something
Yes!

I tried. Without success
samq64
Scratcher
1000+ posts

Gamepad extension (Scratch 3.0)

Thunderguy77 wrote:

Yes is there any way that this could be made to work with the HTMLifier? That would be great so I could then convert the project into an embedded webapp or something
No, but I think if use TurboWarp packager, if you paste the whole source code for the extension into the text area for custom JS it might work.
testertostera
Scratcher
100+ posts

Gamepad extension (Scratch 3.0)

samq64 wrote:

Thunderguy77 wrote:

Yes is there any way that this could be made to work with the HTMLifier? That would be great so I could then convert the project into an embedded webapp or something
No, but I think if use TurboWarp packager, if you paste the whole source code for the extension into the text area for custom JS it might work.


It works!
I made the project with:
https://sheeptester.github.io/scratch-gui/?load_plugin=https://arpruss.github.io/gamepad.js

run TurboWarp
copy .js from https://arpruss.github.io/gamepad.js

and Package

Thanks to all!
willy7789
Scratcher
1 post

Gamepad extension (Scratch 3.0)

ive been using (bleep) for my games.
id love for scratch to add this as a extension

Powered by DjangoBB