Discuss Scratch
- Discussion Forums
- » Suggestions
- » Mobile issues
- Elijahmwhite0616
-
Scratcher
21 posts
Mobile issues
We should add a feature that warns if a game or project doesn't have mobile controls
- ametrine_
-
Scratcher
1000+ posts
Mobile issues
how is it supposed to know which projects don't have mobile controls?
- alpha_ape_13
-
Scratcher
500+ posts
Mobile issues
How exactly would Scratch figure out that it has mobile controls
Arg the 60 second demon
Arg the 60 second demon
- Elijahmwhite0616
-
Scratcher
21 posts
Mobile issues
How exactly would Scratch figure out that it has mobile controlsWe can use ai and use donations to soppurt it
Arg the 60 second demon
- Rosics
-
Scratcher
1000+ posts
Mobile issues
how is it supposed to know which projects don't have mobile controls?
How exactly would Scratch figure out that it has mobile controlsproject.json
Arg the 60 second demon
Donations wouldn't fund AI.How exactly would Scratch figure out that it has mobile controlsWe can use ai and use donations to soppurt it
Arg the 60 second demon
- AHypnoman
-
Scratcher
1000+ posts
Mobile issues
That's just the project file - there's nothing in it telling Scratch that the project it is in has mobile controls or not. (although you could check if there are no key-detecting blocks in it, but I'm sure there would be other problems).how is it supposed to know which projects don't have mobile controls?How exactly would Scratch figure out that it has mobile controlsproject.json
Arg the 60 second demon
- ametrine_
-
Scratcher
1000+ posts
Mobile issues
We can use ai and use donations to soppurt itthis would be an okay idea, if it weren't for the fact that ai is horrendously bad at stuff like this.
Last edited by ametrine_ (Jan. 3, 2025 16:25:21)
- 1THEKINGBOB3
-
Scratcher
500+ posts
Mobile issues
It COULD detect in JavaScript… just wouldnt be a block.That's just the project file - there's nothing in it telling Scratch that the project it is in has mobile controls or not. (although you could check if there are no key-detecting blocks in it, but I'm sure there would be other problems).how is it supposed to know which projects don't have mobile controls?How exactly would Scratch figure out that it has mobile controlsproject.json
Arg the 60 second demon
- AHypnoman
-
Scratcher
1000+ posts
Mobile issues
Wdym? All Scratch pages use JS, so detecting JS wouldn't tell you much. Also tmk there is no JS in a project.json - it's just a json file.-It COULD detect in JavaScript… just wouldnt be a block.
That's just the project file - there's nothing in it telling Scratch that the project it is in has mobile controls or not. (although you could check if there are no key-detecting blocks in it, but I'm sure there would be other problems).
- BigNate469
-
Scratcher
1000+ posts
Mobile issues
Um, no? The project.json is just a machine-readable representation of your project and its code. As @AHypnoman mentioned above, it could just check if there's only one type of input, but there are plenty of things on Scratch that are not mobile-compatible and include mouse sensing blocks.how is it supposed to know which projects don't have mobile controls?How exactly would Scratch figure out that it has mobile controlsproject.json
Arg the 60 second demon
The real issue here is that mobile controls are implemented in different ways in different projects, depending on the needs of the project, and some projects are mobile compatible just because the primary form of input is the mouse. As a result, it's hard to know what to look for.
How? Scratch already uses JavaScript for almost everything, but JavaScript is just a programming language. How would it detect it? Most likely, if this suggestion was implemented, it would use JS, but “use JavaScript” is not an answer here. What are you doing with JavaScript, specifically? In Therophyt, JS can do anything that assembly can, but without having a way to define what mobile controls are (computers are dumb, they don't know), neither JS or assembly can detect if a Scratch project has mobile controls.snipIt COULD detect in JavaScript… just wouldnt be a block.
- 1THEKINGBOB3
-
Scratcher
500+ posts
Mobile issues
No, I mean js could detect if it was an mobile device or not.Wdym? All Scratch pages use JS, so detecting JS wouldn't tell you much. Also tmk there is no JS in a project.json - it's just a json file.-It COULD detect in JavaScript… just wouldnt be a block.
That's just the project file - there's nothing in it telling Scratch that the project it is in has mobile controls or not. (although you could check if there are no key-detecting blocks in it, but I'm sure there would be other problems).
- 1THEKINGBOB3
-
Scratcher
500+ posts
Mobile issues
It doesn't need to detect if it has mobile controls, it just needs to detect if the device is MOBILE or not.Um, no? The project.json is just a machine-readable representation of your project and its code. As @AHypnoman mentioned above, it could just check if there's only one type of input, but there are plenty of things on Scratch that are not mobile-compatible and include mouse sensing blocks.how is it supposed to know which projects don't have mobile controls?How exactly would Scratch figure out that it has mobile controlsproject.json
Arg the 60 second demon
The real issue here is that mobile controls are implemented in different ways in different projects, depending on the needs of the project, and some projects are mobile compatible just because the primary form of input is the mouse. As a result, it's hard to know what to look for.How? Scratch already uses JavaScript for almost everything, but JavaScript is just a programming language. How would it detect it? Most likely, if this suggestion was implemented, it would use JS, but “use JavaScript” is not an answer here. What are you doing with JavaScript, specifically? In Therophyt, JS can do anything that assembly can, but without having a way to define what mobile controls are (computers are dumb, they don't know), neither JS or assembly can detect if a Scratch project has mobile controls.snipIt COULD detect in JavaScript… just wouldnt be a block.
- AHypnoman
-
Scratcher
1000+ posts
Mobile issues
-Unless I've misinterpreted this suggestion entirely, they want something that tells someone using a tablet or phone if the project they are on is not mobile friendly. They're not suggesting that a block is added to detect what device someone playing the project is using.
No, I mean js could detect if it was an mobile device or not.
Last edited by AHypnoman (Jan. 3, 2025 17:51:24)
- everwinner64
-
Scratcher
1000+ posts
Mobile issues
Of what I see, most of the projects that plan to understand mobile controls let you know that on the thumbnail
Last edited by everwinner64 (Jan. 3, 2025 18:31:44)
- 1THEKINGBOB3
-
Scratcher
500+ posts
Mobile issues
oh, so it must have been me who misinterpreted it. Although, the creator of the project could just check/click a button that's says its not mobile friendly, then js checks if user is running scratch on a mobile device, then it tells them that its not mobile friendly.-Unless I've misinterpreted this suggestion entirely, they want something that tells someone using a tablet or phone if the project they are on is not mobile friendly. They're not suggesting that a block is added to detect what device someone playing the project is using.
No, I mean js could detect if it was an mobile device or not.
- BigNate469
-
Scratcher
1000+ posts
Mobile issues
Checking for a device being a mobile device can actually be more difficult than it seems- your best bet is to look at OS (from the JS side of things), and if that's Android or iPadOS/iOS then it's a mobile device.snipoh, so it must have been me who misinterpreted it. Although, the creator of the project could just check/click a button that's says its not mobile friendly, then js checks if user is running scratch on a mobile device, then it tells them that its not mobile friendly.
Still, it really shouldn't check if it's a mobile device, but if it has a keyboard (mouse input can be replicated most of the time by tapping), because some people have external keyboards that they use with their tablets and phones, and then it doesn't really matter. Keyboards work the same way regardless of what they're plugged into or connected to via Bluetooth. On the flip side, many laptops these days come with touchscreens built-in, and some users may prefer to use those rather than their mouse or trackpad when they can. The issue with this is that JS doesn't provide a way to do this that has widespread browser support- APIs that look promising for this kind of thing are either experimental or non-standard, and for the most part aren't supported on Firefox and Safari.
What it should really do is, if the project does not have touchscreen support, notify all users that it does not have touchscreen support.
- AHypnoman
-
Scratcher
1000+ posts
Mobile issues
-
Checking for a device being a mobile device can actually be more difficult than it seems- your best bet is to look at OS (from the JS side of things), and if that's Android or iPadOS/iOS then it's a mobile device.
Still, it really shouldn't check if it's a mobile device, but if it has a keyboard (mouse input can be replicated most of the time by tapping), because some people have external keyboards that they use with their tablets and phones, and then it doesn't really matter. Keyboards work the same way regardless of what they're plugged into or connected to via Bluetooth. On the flip side, many laptops these days come with touchscreens built-in, and some users may prefer to use those rather than their mouse or trackpad when they can. The issue with this is that JS doesn't provide a way to do this that has widespread browser support- APIs that look promising for this kind of thing are either experimental or non-standard, and for the most part aren't supported on Firefox and Safari.
Scratch would actually have no problem with this because of a mobile touchevents: as you have to start a project by pressing the flag, Scratch can check if a touchstart event (which is only fired on mobile devices) is fired the same frame as the click event on the green flag is. If there is a touchevent, the user is on a mobile device. If not, the user is on a computer.
Doesn't work in Safari yet, but for that you can just add an additional check using Navigator.userAgent. (or opera mini, but that's hardly a browser)
Last edited by AHypnoman (Jan. 3, 2025 21:32:19)
- BigNate469
-
Scratcher
1000+ posts
Mobile issues
Doesn't change the fact that it might be a touch event that triggers the green flag, but the device could be connected to a keyboard. Also, see my point about some laptops having touchscreens- the Chromebook I'm writing this on now has one, as does a Windows 11 laptop in the same room I'm in. Both of them are capable of firing touch events, and they do when you use their touchscreens. At the same time, they have functional keyboards and trackpads.snip
Scratch would actually have no problem with this because of a mobile touchevents: as you have to start a project by pressing the flag, Scratch can check if a touchstart event (which is only fired on mobile devices) is fired the same frame as the click event on the green flag is. If there is a touchevent, the user is on a mobile device. If not, the user is on a computer.
Doesn't work in Safari yet, but for that you can just add an additional check using Navigator.userAgent. (or opera mini, but that's hardly a browser)
Safari on MacOS doesn't support touch events- but on the other hand, no Mac has a touchscreen, so why bother? They're fully supported on iPadOS/iOS.
- Discussion Forums
- » Suggestions
-
» Mobile issues