Discuss Scratch
- Discussion Forums
- » Suggestions
- » Mobile or PC detecting block in Scratch 3
- IggyAndCassie
-
Scratcher
500+ posts
Mobile or PC detecting block in Scratch 3
As most people know, Scratch 3 will have mobile support (tablets and phones will both be able to view and create projects, but phones will have to wait for the project editor), which is awesome but as a large number of ways to control a project involve keys, I have thought of a new block that will allow project creators to have one way to control a project for people on mobiles and another for people using computers. Here's a example of it:
One of the many uses of this block will be that it could allow for on-screen controls to only be displayed to mobile users, avoiding a lot of annoyance if you don't need them.
I don't want to type any more, but feel free to leave constructive criticism, questions and whether or not you support!
<on mobile? :: sensing(Thanks to Hellounicorns and others for making this blue)
One of the many uses of this block will be that it could allow for on-screen controls to only be displayed to mobile users, avoiding a lot of annoyance if you don't need them.
I don't want to type any more, but feel free to leave constructive criticism, questions and whether or not you support!
Last edited by IggyAndCassie (Feb. 27, 2018 16:39:03)
- Wahsp
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Some projects have mobile compatibility already. The controls are just set manually
or
The workaround is simple, but it would be nice to automatically tell. I guess I'm undecided on this one
when this sprite clicked
set [mobile? v] to [yes]
or
ask [are you using a mobile device] and wait
if <(answer)=[yes]> then
set [mobile? v] to [yes]
else
set [mobile? v] to [no]
end
...
The workaround is simple, but it would be nice to automatically tell. I guess I'm undecided on this one
- DaEpikDude
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Given that 3.0 is going to support mobile fully, I don't see a reason why something like this shouldn't exist.
- Sheep_maker
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
I think a button for switching between touch/mouse in a project would be better because it would allow touchscreen laptops to choose which set of controls to use instead of being forced to use one or the other.
- hellounicorns2
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Support! I can’t see any reasons why not, and it would be useful to tell people that a project isn’t really mobile friendly without disturbing PC users. Btw I’m terrible at scratchblocks too but (tell me if it works):
<on mobile? :: sensing>
[scratchblocks]
<on mobile? :: sensing>
[/scratchblocks]
Last edited by hellounicorns2 (Feb. 27, 2018 04:34:57)
- apple502j
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
How can we detect? User-Agent is a very popular way, but sometimes it's not correct.
- Botcho_Otkho
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Support,it would lead to confusion with many users to say: “How to play this?” or “I can't play because I am on mobile D:”.
on mobile?::sensing boolean
- DylanSearch
-
Scratcher
50 posts
Mobile or PC detecting block in Scratch 3
I think the below blocks should be included in Scratch as part of the sensing section.
Does anyone support it?
<user on [mobile v]::sensing>I think these blocks could help on scratch so it is possible to create mobile friendly games that only activate certain “if” statements when on mobile.
<user on [desktop v]::sensing>
Does anyone support it?
- M1mikyu
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
I do believe this would be a good idea, though it could lead to some mean things like “Lol you’re on mobile you don’t deserve to use this project” though I think that’s unlikely.
- TheRealNetherBefore
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Support since this would allow users to adjust controls and visuals to better suit the medium the user is playing on.
- NilsTheBest
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
This could be interesting, it could be used to avoid asking each time whether one is using a mobile device or not.
- fastdash1234
-
Scratcher
3 posts
Mobile or PC detecting block in Scratch 3
That would Be a good Idea…and then i can make mobile Emulators..
- DipLeChip
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
If this is to go through. It could help young aspiring developers learn basics to game apps on your phone. Very good idea.
- -PoIar-
-
Scratcher
500+ posts
Mobile or PC detecting block in Scratch 3
Support
I'm on my phone about 90% of the time when it comes to Scratch, so I think that this would be helpful for adjusting controls and the view screen for what device the user is on.
I'm on my phone about 90% of the time when it comes to Scratch, so I think that this would be helpful for adjusting controls and the view screen for what device the user is on.
- EIephant_Lover
-
Scratcher
500+ posts
Mobile or PC detecting block in Scratch 3
Support, but like this:
<mobile? :: sensing>So you don't have to choose and it'd be easier, you could just do
<mobile? :: sensing>or
<not <mobile? :: sensing>>But if the other way seems less confusing to others, I'm down for it. It's just that with a dropdown with only two options (like
<mouse down?>you don't need the dropdown, just use the
<not <>>block.
Last edited by EIephant_Lover (Feb. 10, 2019 17:57:09)
- --Explosion--
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Suppprt! I often add mobile support in my games and it would be cool to only use mobile controls when one is on mobile.
- PkmnQ
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
I think the below blocks should be included in Scratch as part of the sensing section.Semi-support. Someone could do:<user on [mobile v]::sensing>I think these blocks could help on scratch so it is possible to create mobile friendly games that only activate certain “if” statements when on mobile.
<user on [desktop v]::sensing>
Does anyone support it?
if <user on [mobile v]? :: sensing> thenBut on the other hand,
say [no mobile players allowed]
else
. . .
end
if <user on [mobile v]? :: sensing> then
mobile controls :: custom
else
normal controls :: custom
end
- WindOctahedron
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Semi-support. Someone could do:Some existing blocks can be abused, like the “username” block.
[block abusing]
Last edited by WindOctahedron (Nov. 21, 2019 18:39:56)
- venyanwarrior
-
Scratcher
1000+ posts
Mobile or PC detecting block in Scratch 3
Yeah, for example:Semi-support. Someone could do:A some existing blocks can be abused, like the “username” block.
[block abusing]
when green flag clicked
if <(username) = [venyanwarrior]> then
say [u suck lol]
else
say[ok ur fine]
Last edited by venyanwarrior (Nov. 21, 2019 19:35:16)
- C0nyc0n
-
Scratcher
100+ posts
Mobile or PC detecting block in Scratch 3
when this sprite clickedMake a sprite that looks like a switch, with one costume that is on, and another that is off
next costume
when green flag clicked
forever
set [mobile v] to (costume #)
end
This wouldn't allow abuse but you would have to click or tap a switch
- Discussion Forums
- » Suggestions
-
» Mobile or PC detecting block in Scratch 3



















