Discuss Scratch

TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

So, using the help of chatGPT, I created two Bookmarklets for an on-screen joystick and keyboard that emulates pressing actual keys on a keyboard. This means most games that use WASD should be able to be played on mobile and any extra keys that are needed can just use the on-screen keyboard. I want to share this, yes, but userscripts seem to be banned. Unless I am assured I won’t be banned/muted for sharing my two quite complicated Bookmarklets, or maybe be given an exception, I can only provide the method for how I have done so.

I asked chatGPT something similar to this for the joystick Bookmarklet:
To the best of your ability, please try to code a one-line Bookmarklet that creates a on-screen joystick in the bottom left corner of the screen that emulates the WASD keys being pressed and held down while the stick is in the appropriate direction. Release the keys when it is not. The stick should smoothly follow the finger towards the edge of the joystick but only when the finger is nearby the area of the joystick or on it. Try to disable page scrolling when using the joystick. The joystick should also be on the front layer of the page. When the screen is not being held down nearby the joystick, make the stick return to the center and release the keys. Also, the joystick can be toggled to be shown and hidden by clicking the Bookmarklet again. The code should be fully functional.

I asked chatGPT something similar to this for the keyboard Bookmarklet:
To the best of your ability, please try to code a one-line Bookmarklet that creates a on-screen keyboard with all the alphanumeric keys plus the shift, space, enter, and backspace keys. The on-screen keyboard should follow the default keyboard layout for its rows. Include a “hide” button to hide the keyboard too. All the keys should be functional and emulate the actual key being pressed and released. Put the keyboard in the top left corner of the screen. Also, the joystick can be toggled to be shown and hidden by clicking the Bookmarklet again. The code should be fully functional.

Note that these prompts will definitely not work first try. You need to go step by step through the process of making it while telling it to fix any bugs that may occur. You may tell it to expand the code, explain the code, and condense the code back into a one-liner for you and it to have a better understanding. If you don’t know what a Bookmarklet is or how to test it, also ask chatGPT or Google. Currently, my two Bookmarklets are working quite well but they have minor bugs, although very useable to play many games on mobile. Modify the Bookmarklets and prompts to your needs (like if you need to use arrows keys for a game instead or have different sizing).

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
EngineerRunner
Scratcher
1000+ posts

Play Almost Any Scratch Game Easily on MOBILE

dont use chatgpt for programming an entire thing.

social experiment: comment here to not get curator

simpsons and futurama fan

RickRoIler (the first l is a capital i) on PSN, NotXboxGamer765 on xbox (and by that i mean xbox 360), EngineerRunner on Minecraft (find me on hypixel)
also im on the orange cat social media as EngineerRunner

join the worst guild on hypixel with this command!!1/!/!?1/!/
/guild join los gamers

if any of my suggestions ever get accepted, i will have my profile picture set to Just Stamp The Ticket Man for 3 months

give internets pls

an australian cumquat ate my snag and onions

“maintainer” of Pyratch, a very simple text-focused frontend for Scratch
oh god am I becoming an ATer

when I am deleted ::hat control
ask (join (join [what the hell does ] (when I am deleted ::hat control)) [ do?]) and wait
create clone of [Stage v]
delete this project ::control
stop [eh, a few] sounds ::sound
casually taking over the forums:

this is what happens when school goes back in the US, scratch has like no activity













































































when I am deleted ::hat control

create clone of [Stage v]
delete this project ::control
stop [eh, a few] sounds ::sound
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

EngineerRunner wrote:

dont use chatgpt for programming an entire thing.
lol… it works

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
ajskateboarder
Scratcher
1000+ posts

Play Almost Any Scratch Game Easily on MOBILE

I like your idea, but bookmarklets aren't very easy to install on mobile

Maybe we could have a way to add the Scratch code for an on-screen keyboard to a project? I'm sure it's possible through some weird internalized Scratch thingy

Last edited by ajskateboarder (Jan. 9, 2024 23:24:10)

TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

ajskateboarder wrote:

I like your idea, but bookmarklets aren't very easy to install on mobile
No, for me it’s quite easy. On both Safari and Chrome it is quite simple for mobile users. There are not many significant cons to using a Bookmarklet if you know at least a little of what you are doing.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
ninjaMAR
Scratcher
1000+ posts

Play Almost Any Scratch Game Easily on MOBILE

i don't think a bookmarklet is a userscript - a bookmarklet is just a bookmark (or url) that has been configured to run javascript
maybe you could just show us the javascript code? there are other uses that just for scratch
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

ninjaMAR wrote:

i don't think a bookmarklet is a userscript - a bookmarklet is just a bookmark (or url) that has been configured to run javascript
maybe you could just show us the javascript code? there are other uses that just for scratch
It is still ban-able if someone reports the message with the code and of course someone is going to.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
chubby-guinea-pig-33
Scratcher
1 post

Play Almost Any Scratch Game Easily on MOBILE

TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

chubby-guinea-pig-33 wrote:

What great timing. This forum has been dead for a while and when the first time someone comments on this in a while, it’s also the time I’m actually currently working on a version 2 of this mobile joystick control Bookmarklet for myself and maybe others which is much easier to use and contains a keyboard as well.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
Mr_rudy
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

You can use scratchgo to have a nice mobile ui for scratch projects. It is powered by turbowarp and it lets you change what the buttons do. I have used it on my phone, but I don't know if it works on tablets or any other touchscreen devices.

Here is what it looks like on my phone:

Last edited by Mr_rudy (March 17, 2024 13:50:03)


CHECK OUT SNAIL IDE:
Website
Fourm Post



i make games and other cool stuff

when @greenFlag [clicked v]:: events hat
when (when @greenFlag clicked:: events) clicked:: events stack
when @greenFlag clicked {
when @greenFlag clicked:: events stack
}:: events
when <@greenFlag:: events> clicked:: events
when ({when @greenFlag clicked:: events stack}@addInput:: events) clicked:: events stack
when @greenFlag clicked:: events cap
evil kumquats ate this sentenc-
dumorando
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

Mr_rudy wrote:

You can use scratchgo to have a nice mobile ui for scratch projects. It is powered by turbowarp and it lets you change what the buttons do. I have used it on my phone, but I don't know if it works on tablets or any other touchscreen devices.

Here is what it looks like on my phone:
lol i was gonna say that
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

Mr_rudy wrote:

You can use scratchgo
Yes, I know about ScratchGO, in fact, I’m actually in their disc**d (this post was blocked so many times from posting) server so I definitely know about it. However, it uses buttons instead of a joystick which can make it harder to play and it only allows for one key to be activated at once. Furthermore, since my method is a Bookmarklet, you can run it directly on the Scratch website with any game meaning you can play cloud games even though ScratchGO does allow you to play cloud games using TurboWarp. Lastly, the joystick and keyboard are very easily moveable so it’s more helpful to conserve space to see the game but not block anything.

Last edited by TheMobileGames (March 19, 2024 21:34:54)


—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
4678Ekoomson
Scratcher
2 posts

Play Almost Any Scratch Game Easily on MOBILE

isn't that against the scratch terms of use?
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

4678Ekoomson wrote:

isn't that against the scratch terms of use?
https://scratch.mit.edu/terms_of_use
No.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
LP372
Scratcher
1000+ posts

Play Almost Any Scratch Game Easily on MOBILE

4678Ekoomson wrote:

isn't that against the scratch terms of use?
no, mods are allowed, if you don't discuss them or advertise them, in which case muting is possible

Projects I want people to see:
https://scratch.mit.edu/projects/1018171720
ChessProking-tm
Scratcher
38 posts

Play Almost Any Scratch Game Easily on MOBILE

When are you going to release it?


Paper Minecraft 1.21 Update!
https://scratch.mit.edu/projects/807697148/

sonalii
Scratcher
7 posts

Play Almost Any Scratch Game Easily on MOBILE

hi

Come talk to me on my profile!
say [scratch = cool] for (2) secs
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

Everything works perfectly besides two small things. Special keys like “Ctrl” or “shift” are acting kind of weird and changing the keyboard size is currently a little buggy. I also want to add a way to always have important keys visible like the inventory key or jump key. Overall, it’s really nice and extremely useful for letting me test and play any Scratch game. It’s almost perfect really. I can play more of Griffpatch’s multiplayer games and no longer need to ever code mobile controls for every Scratch project for basic gameplay.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————
julmik6478
Scratcher
500+ posts

Play Almost Any Scratch Game Easily on MOBILE

dumorando wrote:

Mr_rudy wrote:

You can use scratchgo to have a nice mobile ui for scratch projects. It is powered by turbowarp and it lets you change what the buttons do. I have used it on my phone, but I don't know if it works on tablets or any other touchscreen devices.

Here is what it looks like on my phone:
lol i was gonna say that
Same


Support the suggestion HERE by adding this button to your signature

My acounts in some websites:
youtube
planet minecraft
mcreator
TheMobileGames
Scratcher
100+ posts

Play Almost Any Scratch Game Easily on MOBILE

julmik6478 wrote:

dumorando wrote:

Mr_rudy wrote:

You can use scratchgo to have a nice mobile ui for scratch projects. It is powered by turbowarp and it lets you change what the buttons do. I have used it on my phone, but I don't know if it works on tablets or any other touchscreen devices.
lol i was gonna say that
Same

I already am very well aware of this website but there’s a few significant issues with it that makes it unideal.

1. It cannot work with the Scratch editor or the TurboWarp editor. If anyone wants to remix and modify games that don’t have mobile support, it is not possible to test our changes using this website. Also, adding mobile support to projects directly can be tedious. Trust me.

2. It cannot use Scratch’s cloud servers. Since it is an external website, the best it can do is use the less popular TurboWarp cloud servers to play cloud multiplayer games.

3. Update progress is slower than my own script. I’m almost done with my own script besides a few minor bugs that won’t affect most games. Special keys including the ctrl, shift, enter, and backspace keys are a little inconsistent. However, very few projects use these weird keys. Also, resizing the keyboard makes the keys weirdly large. However, again, it is rare that there would be a need to change the keyboard size but it’s there just in case.

4. In my personal experience, the website is fairly buggy on tablet-like devices. However, this is likely to be fixed by the creator soon.

Overall, I’m not saying the website is terrible since it is not. Yet, I feel that my script would be more useful to many people for the reasons listed above. The development of this website is a great start for improving the mobile experience on Scratch so I am not against it at all.

—————————— —————————— —————————— —————————— ——————————
A way to make any game easily mobile (no remixing needed): https://scratch.mit.edu/discuss/topic/733837
My mobile engine (use to add buttons/controls to a game): https://scratch.mit.edu/projects/778848092/
—————————— —————————— —————————— —————————— ——————————

Powered by DjangoBB