Discuss Scratch

bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js

Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!

The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Else, you can find mappings directly via the Gamepad Tester: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

Have fun!

NOTE: As an extension, projects created with the gamepad extension cannot be shared, as non-devs aren't technically allowed to use extensions. Oh well!

Last edited by bobbybee (Dec. 28, 2014 12:47:44)


“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
PrincessPanda_test_
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

When are you gonna make it compatible with other browsers such as Firefox and Internet Explorer?














Click the image for something special!

Wanna collab on something Sonic?
bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

PrincessPanda_test_ wrote:

When are you gonna make it compatible with other browsers such as Firefox and redacted?

I'll do Firefox when I get a chance: the API is a little bit different.

Also, please don't say the I word. This is a family friendly forum.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
PrincessPanda_test_
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

bobbybee wrote:

PrincessPanda_test_ wrote:

When are you gonna make it compatible with other browsers such as Firefox and redacted?

I'll do Firefox when I get a chance: the API is a little bit different.

Also, please don't say the I word. This is a family friendly forum.

I ONLY SAID INTERNET EXPLORER!!!














Click the image for something special!

Wanna collab on something Sonic?
Zeusking19
Scratcher
500+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Sorry, but…

Internet Explorer.

No, just….

No.

(harsh, maybe, but seriously, it's gonna be really difficult to get that working in a stable manner, because experimental API's and such. Perhaps when Microsoft start implementing new technologies, yeah, but I don't really see it happening )

Last edited by Zeusking19 (Dec. 27, 2014 15:27:32)

bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Allow me to clarify:

This extension is a thin wrapper around the Gamepad API, hence why the blocks are rather low level and not well labeled, as per the spec. This is only implemented in two browsers to date: recent versions of Google Chrome and recent versions of Firefox.

To add to the confusion, they support slightly different version of the API, and to support both browsers would mean double the time, effort, and code (and Firefox implements it rather poorly compared to Chrome, mind you).

So, there is a good chance that I'll add FF support. Anything else besides that would be almost impossible to do.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
GrannyCookies
Scratcher
100+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

bobbybee wrote:

So, I was wondering…
Do I have permission to add this to ScratchExt, with credit where credit is due?
I'll clean up the blocks a little and make them seperate labled <button ? pressed?> etc.

Please?

GC

Thepuzzlegame
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Very nice!

hi!
bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

GrannyCookies wrote:

bobbybee wrote:

So, I was wondering…
Do I have permission to add this to ScratchExt, with credit where credit is due?
I'll clean up the blocks a little and make them seperate labled <button ? pressed?> etc.

Please?

GC

Fork and make a pull request

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
ImSonicTheHedgehog
Scratcher
24 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

This doesn't work in Firefox, yet the HTML5 tester works.
when green flag clicked
broadcast [SA-DS3-INIT v] and wait

Still waiting. ;-;

NOTE: Using a Sixaxis Dualshock 3 PS3 controller. Also using Firefox.

Last edited by ImSonicTheHedgehog (Feb. 9, 2015 01:35:03)


PC Specs:
PC: HP Pavilion SleekBook TouchSmart 14-b109wm
CPU: Intel Celeron (x2) B877 (877) @ 1.7GHz 1.7GHz (This is an estimate. The actual clock reading is off. Custom CPU, by HP, I guess)
GPU: Intel HD Graphics 5300 (Soon to be a nVidia GT 530M)
OS: Windows 8 (x64) / Android 4.3 (x86)
bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

ImSonicTheHedgehog wrote:

This doesn't work in Firefox, yet the HTML5 tester works.
when green flag clicked
broadcast [SA-DS3-INIT v] and wait

Still waiting. ;-;

NOTE: Using a Sixaxis Dualshock 3 PS3 controller. Also using Firefox.

The API is significantly between Firefox and Google Chrome.. if my life wasn't so busy, maybe it'd be supported! haha. Sorry

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
ImSonicTheHedgehog
Scratcher
24 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Seriously, though.

when I receive [This Extention for IE v]
release [Half-Life 3 v]

Oh, and for implementation, Firefox has quite a bit of support. Ask the Tilt addon.

Last edited by ImSonicTheHedgehog (Feb. 9, 2015 20:20:00)


PC Specs:
PC: HP Pavilion SleekBook TouchSmart 14-b109wm
CPU: Intel Celeron (x2) B877 (877) @ 1.7GHz 1.7GHz (This is an estimate. The actual clock reading is off. Custom CPU, by HP, I guess)
GPU: Intel HD Graphics 5300 (Soon to be a nVidia GT 530M)
OS: Windows 8 (x64) / Android 4.3 (x86)
bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

ImSonicTheHedgehog wrote:

Seriously, though.

when I receive [This Extention for IE v]
release [Half-Life 3 v]

Oh, and for implementation, Firefox has quite a bit of support. Ask the Tilt addon.

I am aware that Firefox supports gamepads.. but the gamepad API under Firefox is NOT the gamepad API under Google Chrome. Send a pull request if you'd like, but remember this was an afternoon project.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
ImSonicTheHedgehog
Scratcher
24 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

bobbybee wrote:

ImSonicTheHedgehog wrote:

Seriously, though.

when I receive [This Extention for IE v]
release [Half-Life 3 v]

Oh, and for implementation, Firefox has quite a bit of support. Ask the Tilt addon.

I am aware that Firefox supports gamepads.. but the gamepad API under Firefox is NOT the gamepad API under Google Chrome. Send a pull request if you'd like, but remember this was an afternoon project.

You can't deny that, when this extension is compatible with IE, Half-Life 3 will be released.

PC Specs:
PC: HP Pavilion SleekBook TouchSmart 14-b109wm
CPU: Intel Celeron (x2) B877 (877) @ 1.7GHz 1.7GHz (This is an estimate. The actual clock reading is off. Custom CPU, by HP, I guess)
GPU: Intel HD Graphics 5300 (Soon to be a nVidia GT 530M)
OS: Windows 8 (x64) / Android 4.3 (x86)
DemonLordx64
Scratcher
33 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

PrincessPanda_test_ wrote:

bobbybee wrote:

PrincessPanda_test_ wrote:

When are you gonna make it compatible with other browsers such as Firefox and redacted?

I'll do Firefox when I get a chance: the API is a little bit different.

Also, please don't say the I word. This is a family friendly forum.

I ONLY SAID INTERNET EXPLORER!!!
*GASP* He said it again!

My usual name is Sir Gugglesworth.

My YT Channel! (below)
https://www.youtube.com/channel/UCxODyIL8I1nBL8LpWHkcMOw
apgonscratch
Scratcher
100+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

bobbybee wrote:

https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js

Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!

The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Else, you can find mappings directly via the Gamepad Tester: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

Have fun!

NOTE: As an extension, projects created with the gamepad extension cannot be shared, as non-devs aren't technically allowed to use extensions. Oh well!

bobbybee wrote:

https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js

Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!

The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Else, you can find mappings directly via the Gamepad Tester: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

Have fun!

NOTE: As an extension, projects created with the gamepad extension cannot be shared, as non-devs aren't technically allowed to use extensions. Oh well!


HOW DO YOU DO THIS?!?!
apgonscratch
Scratcher
100+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

bobbybee wrote:

https://github.com/bobbybee/scratch-gamepad/blob/master/ext.js

Import that as an experimental extension (look around the forums), and it will give you a get axis and get button on _any_ supported controller. You'll need a recent version of Google Chrome, though (since like 22). Once imported, it should show up in more blocks with a yellow circle. Press any button (although in practice, only some will work), and it will turn green. At this point, you're done!

The mappings are: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad_diagram.png
Else, you can find mappings directly via the Gamepad Tester: http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

Have fun!

NOTE: As an extension, projects created with the gamepad extension cannot be shared, as non-devs aren't technically allowed to use extensions. Oh well!

Can you do this on Chrome OS?
MechaDragon1204
Scratcher
64 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Please excuse my ignorance here, but will this work with a Wii U pro controller?

You're wasting your time. The post is up there!
bobbybee
Scratcher
1000+ posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

MechaDragon1204 wrote:

Please excuse my ignorance here, but will this work with a Wii U pro controller?
Probably not.

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
Anika001
Scratcher
21 posts

Gamepad Extension - Xbox 360, PS3, and non-brand D-Pad controllers in Scratch!

Powered by DjangoBB

Standard | Mobile