CRAZY COOL JOYSTICKS 🎮 - How to make your Scratch Games Mobile Friendly
Do you want to make your games mobile friendly, learn how to code an awesome reusable mobile joystick (thumbstick) by following this tutorial and you'll be playing your Scratch Games on your phone or tablet in no time!
Scratch works great with mouse and keyboard, but showing off your hard work to a friend on your mobile can be really frustrating unless you have the best mobile controls. That's where this tutorial will help! Once coded you can backpack the controller script and drop it into all your favorite games!
My tutorials are for all budding game & software developers using Code Blocks. Scratch On guys!
👀 NEW Multi Touch Joystick Tutorial !!! - • Impossible "Multi-Touc...
🔥 Early Access / Channel membership - www.youtube.com/@griffpatch/join
🐱 Scratch Studio for this tutorial - scratch.mit.edu/studios/31206...
👀 Quick and Fun Tutorials - • Quick and Fun Scratch ...
⭐ Projects Featured in this video
Click and Jump [ A Platformer ] - scratch.mit.edu/projects/6327...
Slither.io v1.10 #games #all #game #trending #s - scratch.mit.edu/projects/6426...
Potatoid Invasion v1.3 - scratch.mit.edu/projects/5547...
Scratch Fly | Mega Game | #Games #Trending # - scratch.mit.edu/projects/6291...
Snowy town - teeeeeeen - Unshared - scratch.mit.edu/users/teeeeeeen/
-------------Video Chapters-------------
0:00 Intro
1:00 Costumes
2:50 Coding the Joystick Base
3:20 Code Control Stick
5:22 Release back to Centre
6:58 Stick Direction and Power
9:02 Constrained Distance of Travel
12:21 Using the Thumb Stick in a Game
13:45 Thumb Stick Activation Area
17:45 Stick X & Stick Y
20:36 Using the STICK X & Y variables in game
22:14 Bigger Stick for Small Screens
23:31 Backpack to other Games!
24:14 Snowy Town by teeeeeeen
26:15 Click and Jump by ManGold-658
27:52 Highway Madness! by Games_Central
28:50 Slither.io v1.5 by SlordWas Taken
30:03 Potatoid Invasion by Kube_Komix
32:24 Outro
New Multi Touch Tutorial - kzhead.info/sun/lq1qnciOjah5ipE/bejne.html 🔥🔥🔥 Early Access / Channel membership - www.youtube.com/@griffpatch/join Scratch Studio for this tutorial - scratch.mit.edu/studios/31206995/comments Quick and Fun Tutorials - kzhead.info/channel/PLy4zsTUHwGJKByTn_qV76oTpEYGczqEb_.html
LETS GO
how do you get the guy and the flags?
@@NotRealChatGPT griffpatch have the membership future
how do you make the joystick only go left and right?
@@morganisapro5 just make the player change x by stick x
I loved the section where you implemented it in others' games, much fun! :)
Chiroyce, what are you doing here?
@@BuzzyBee13 LOL
Woah, Chiroyce!
@Samfitzgamer, what are you doing here?
@Samfitzgamer Hehe, ok I'll stop. But watch Twishorts to see where I get it.
I always love how goofy yet entertaining your videos are! while I doubt I'll make a mobile game, this is still helpful
Hey Griffpatch! I just wanted to say thank you so much. Im currently making a game and you have really helped me with these tutorials. In fact, i would be completly lost on how to even properly code the PHYSICS ENGINE without you. So yea, keep up the good work, and thank you again! :)
Thank you so much!!! I was making an game where you use your keyboard but I realised I could not test the game on the go. I came across this and tought it was perfect for me as it is easy to understand. It also works very well.
Thank you so much! I combined this with my platformer game that I am making with your tutorials and it works so well! You are amazing :D (Also, 1000th comment?)
This really helped! Ive always failed at joysticks!
same lol
the problem is the small circle moving out of the big one
Same
Same :)
✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓
I actually had to shorten the scripts, but got the same results !! Well done Griffpatch!!
The same effect could also be achieved by using the "set mode to draggable" block, and "if " then limit the stick, and "if not ", then reset the stick.
That is a good idea, but it would be too tricky to ensure the user actually clicked on the stick to start moving it
@Zi Zoy Nacho Maybe that works too.
@@griffpatch moving the stick would be needed only to limit it or reset its position. The "set drag mode [draggable]" block from the sensing category does the work of moving the sprite/clone while it is held. Also i realised while writing this that the only difference is you have to move the stick every time you press it, instead of just pressing the area of the stick
@@griffpatch nice
That’s what I was thinking this video would be about-
I love it! I just added a version of this to my Rocket Canyon game (and submitted it to your studio). But I also experimented with only turning on the joystick once they click on the screen so it doesn't get in the way of the game if playing on the computer. Thanks again for a great tutorial (and worth waiting for)!
Very cool, I have a small update to make it even better, but that will have to wait
For the changing size, maybe add a icon and make it 100 for regular size and 200 for big size or something
Never stop scratching there are only a few scratch tutorial makers and you are one of the best sadly I don’t know where you get your sprite designs from but that’s not your fault it’s mine for not learning. Keep it up!
This worked great! I put it into my 2d top view style game and was surprised at how easy it was to code. thank you!
When you made it to where you could only use the joystick by clicking on it WITHOUT “when this sprite clicked”, it actually helped me with something completely unrelated. I was making a mobile keyboard for a Morse Code translator, but had tons of buttons that I wanted to keep on one sprite. Thank goodness I saw this before finishing the code for a whole control-button system. This channel has taught me many ways to avoid big messes. Thanks a lot!
That's excellent news, exactly what I hope
O
@@spiderman2099notyetinthefuture Spider man go away from home
Crazy cool... you are undoubtedly the BEST scratcher in scratch! I haven't shared a project with a joystick but I will certainly do it soon!
Hey griffpatch can you tell the scratch team to make scratch multi touch? Thanks.
Griff, I literally love your vids i get so much more knowledge just by copying them or actually making them thanks so much for getting my code skills up! and also by the way when I was doing the part 3:49 mine actually appeared the thumb stick bc I was doing it in a copy of my game so I can add it on my actually game
I love how griffpatch sounds more and more excited in every video he makes. Great tutorial!
lol :D
:D
@@griffpatch :P😛
@@griffpatch for this lemon only
@@griffpatch ah, this lemon only
Oh, yes, yes, yes! The perfect tutorial for a joystick! I'm excited for this one, as I've always been working on mastering my joystick code! Thank you so much again, griffpatch!
Thank you, it really help me improve, long time ago, I very been trying to do the same as yous but it never worked, thank you, after watching your video, I could do more programing
love the little animations they really help explain the programming! thanks griffpatch! love u
I have always wanted to learn how to do this, especially with the growing amount of people on mobile devices. This is really helpful!
Just Added the joystick in my classic platformer and tested it with my mobile device! It turned out so well, So smooth and easy to use! Thank you griffpatch! You never fail to amaze me!
Great to hear!
@@griffpatch i agree. also, there is some kind of Pc = mobile type of the mobile controls [5 keys, 3 moving keys[left,down,right], 2 jumping keys [space,up].]
For a lot of games, on the cat sprite use a ‘set rotation style left-right’ block inside the forever loop, but not in the ‘if Stick Power > 0’ block.
This is the first vid of your channel I've seen and it instantly earned a subscribe from me👍 good job and keep creating amazing vids
I can’t believe your probably one of the only you tubers who is big and uploads consistently I have watched you for u years and you have tought me so much thank you!!!!!keep grinding and doing your thing brotha!!!!
Personally I think if you are using a joystick for a platformer, it’s best to use a square joystick. That way it is easier to run and jump, as the corner where both are possible is larger. Though it would be even better if Scratch had some kind of multi-touch capability… It might make things more difficult to code, but it would be easier to play when you can press a separate button for jumping as for running.
You are very right! I think just the same thing. Although, by using joystick > 0.5 you actually end up with just such a design in reality :) - And yeah - Scratch should support multi touch somehow!!!
@@griffpatch i agree :DD
I also agree
@@BOLT_THUNDERSPHERE Agree:D
How
Best scratch tutorial, understand easily and specific explanation, keep up the good work
This will be great for my RPG project. Thank you so much for this tutorial.
This is great! I am looking forward to another tutorial like creating an inventory with draggable items.
Who else likes how enthusiastic griffpatch is always makes every second of the vid interesting and fun
yeh
He's the Bob Ross of Scratch coding.
he is the wrost
@@RyteoyGamingCommunity you this is wrost
@@RyteoyGamingCommunity correction YOUR THE WORST*
I’m working on a scratch platform we but I’m on mobile making it so this tutorial really helps also I’m using your platform tutorial videos it really helps thx
Thank you so much for this tutorial! i made a game but people wanted it to be mobile too so this helps a lot.
Hey griffpatch, I think it would be cool if for your next series after 3d raycasting would be a renewed version of your old series, How to make a cloud game. It would be nice with your current editing and microphone!
Wow, I used a completely different technique for a joystick and this is so much more flexible than mine. Mine is so stiff.
My most popular project on scratch is Dan Adventures, and it was based on the great platformer tutorial from griffpatch! Thank you so much.
Super now I can put this thing on the platformer game you put into the tutorial (not appel) but the other if I wanna play on mobile thx
I went to the Scratch homepage and saw that you were following "Crazy Cool Joysticks" and thought, "Oh, I guess he posted a video of that." Sure enough, here it is. I can't use Scratch on my iPod because there is no Apple app, and the website is too big. What a great series. Finally, a break from raycasting!
Thank you so much for this tutorial! youre the person who inspired me and got me started!
It will be helpful! I will now use your skills in my work. Thank you :D
thank you so much i was doing a basketball game i was looking for this now i found so thank you i subscribed to you and liked the video
Griffpatch: this function is relatively simple also Griffpatch: Explains quantum physics and the relative law of black holes in under 40 seconds.
Lol
I didn’t get it lol
@@rayyanrahman8115 lol
For the going to center thing, use this: Go into 1 sprite then use the go to block to select the sprite, then move the sprite into the Control Stick sprite and tada.
your videos are very helpful! thank you
It's really lacking in mobile friendly, I'm so glad to see this💗
Easy tutorial, thanks Griffpath! 👏👏👏
7:53 i believe theres an alternative way on making it turn 180 degrees.. using join blocks.. basically you use the join block to point toward the negative of the variable
would that work if it was already a negative direction
Amaizing tutorial, it explains every thing slowly and makes every one understand
I am so happy my game works with the Joystick!! Thanks griffpatch so much!!
I think you should do things in other people's code more often, I find this really entertaining for some reason 😅
True....
That would be funny.
Same
5:06 you can add a “set drag mode to not draggable” so you can test the project with no full screen.
Sadly not... That only applies to full screen mode. There is a scratch addon extension that supports that feature though.
I tried that with my 3D backrooms game and I dragged the actual entity sprite
Thank you for sharing this. This VDO help me a lot to create new scratch project.
its cool because everything can be easily customized in the joystick, the look of the base, stick, shape of the base too
You don't have to use the MYSELF variable. You can use a scratch bug. Drag a GO TO block into a different sprite, select Control Stick, drag the block into Control Stick.
I got interrupted as I was typing and part of the code I mentioned is missing. I reads "go to x position of control stick, y position of control stick", which is what is in the project I mentioned. BUT, doing it myself now I realize that the project I got that from must have done it by exploiting the "different sprite" trick, so it amounts to the same thing. I guess it's another alternative, though I still wonder how they compare in efficiency. Note, you also need it in the "distance to myself" block. the myself variable is easier to code, but you have to worry about if the sprite name changes.
Thanks Griffpatch! I'm make a new game but I need joystick but you helped me!
Thank you for this tutorial. It helped me in my work a lot.
somehow you've again made a undercomplicated script that functions the same as a 500 block long script. Wondering if you could attempt Binary Space Partitioning though. That'd mean you could make a true 3d engine. And you can also add actual up&down movement without the image weirdly shifting. That'd probably make the project run far too slow but a full on 3d engine will being able to have many old gems to be ported over to scratch. I know that you've attempted something similar a long time ago but this could be a chance to remake it but extremely easy to port over like the stick and have many extra things like textures and shading.
Griffpatch, you can actually get the control stick position option in another sprite and then drag the block to the stick sprite instead of using a variable.
He did it in one of the Tile Scrolling Plattformer Video.
@@DoxxTheMathGeek And also shiftclicklearn did that.
@@darrickhans9478 did you join his discord?
@@DoxxTheMathGeek and in raycasting pt 5
@@1080GBA No.
Best tutorial ever ! This video made my game interesting than ever!~
griffpatch, I really learn alot from your videos thankyou.
This is perfect! I was just implementing mobile support to my game and I was having trouble with movement. Do you think you can create a tutorial on optimization to reduce project size and make things run faster? (reducing imported file sizes, smart coding, etc. My game runs at around 31 FPS on PC and 20 FPS on my phone but I still have a lot of content to add)
Scratch runs at 30 FPs, so that's the highest it can run.
@@maikeru5187 oh thanks, I didn't know that, that was helpful
17:21 u can devide the size by 2 and u need to be in the radius of the base to use the joystick and i think it works well!
sorry but *you*
@@coolswag352 ?wym
@@scratchsuperpower386 you said “u” instead of “you”
@@simplylou8631 ye ik it is easier
Wow that is some crazy but complex code. Thank you for the great tutorial. Am i allowed to use this exact same code in my Mario PC/Mobile game? (With credits of corse)
Thank you, Griffpatch, for teaching me about Scratch coding
A tip is that if you want the joystick to always stay in the front no matter what, you can put the go to front layer in a forever loop.
Thank you for making this tutorial so the mobile joystick can become more popular, I am tired of those terrible mobile controls where you have to hold a specific section of the screen and stuff.
I’m working on the RPG on my ipad and my chrome book so for testing I needed the joystick TYSM for the amazing tutorials.
No problem I'm glad to have been of help, scratch on
At 20:80 I left the Set STICK X and Y out and it still worked. I think this is because you are multiplying the X and Y by Stick power and when you let go is is set to 0 so its multiplying Stick X and Y by 0 (making it 0). Thank you so much for your tutorial's they have help me start coding on scratch and understanding it.
20:80?
I love how enthusiastic griffpatch is with each video! Also helpful how he explains everything making it easy to make quick tweaks. I was wondering how to do it for your recent scratch RPG series? The movement didn’t seem to work the same for the player. 😢
Technoblade never dies
Your tutorials are the best :D I also like how you added the joystick in other scratchers games :)
Thanks! 😃
My projects are only for computers which means I can't use my phone whenever I open my Scratch games. Thank you so much griffpatch for teaching me how to pull this off!
Love it! Could you tell me what platform you use to add text and edit your videos? It’ll really help!
Scratch: *no you can’t return to base sprite* Also scratch: lets us add a variable in the ‘go to’ block which we can set to the base
I loved this one, I didn't even realize that there was a simpler way to make a joystick! Can you please make a tutorial on how to make your own scratch extensions?
keep the tutorials up and it helps A LOT of people like me! :)
Thank you since I program on a mobile phone and it will help me a lot🎉
instead of using variable 6:48 you can use the join block like this [ *join* _control stick_ *with* _blank_ ] (you just don't type anything in the blank and delete the pre existing space) edit sorry if this is annoying i just hate making new variables unless its necessary
Same
Yes, I often do that, but I was thinking since we had to use it over and over a variable would be better
yeah CUP
Yeah it's not that hard to type it out every time.
uosh?!?!?
2 sec later ROBLOX IN SCRATCH FOR MOGILE
Yea its a roblox moving stick😂😂😂😂
Mogile
You miss spelled
I hope not
2 secs? G’arn m8 r u rekt? No wey you mak gam 3D les tan 2 secs
I love how he just starter Tallinn att licorice. I love this guy’s way to talk
6:57 what I find it interesting: you can replace it with glide (0.1) secs to ( myself variable) instead of go to, which makes it looks better for me
Thanks! This is really helpful! 😄
WOW this helps alot! and thank you! ❤️👍
This is so usefull in my scratch games thx for the tutorial👍
My pleasure
helped me a lot thanks griffpatch!
And I also don't speak English XDDDDDDDDDDDDDDDDDD
15:01 I ticked the run without screen refresh box lol. What I did was I seperated the script from the repeat until block, and placed the Drag Stick block inside the repeat, just in case, 'cuz it seems SOOOOOO much smarter.
Tank you, this is really nice.
This was basically a stick power vs max stick showdown. I love it!
Thank you for teaching me about joysticks
You should’ve probably tested this in a top-down game, as that’s one of the best uses of the joystick. any other game you should opt for a simple 3 button setup, left right and up.
This is great really useful your tutorials are awesome
This helped a lot by the way!☺
Thanks Now I Can make alot of mobile friendly games From The Joystick!
Thank you for your efforts I wish you success in the future
This was extremely helpful!
Man this was amazing! I tried to code a clone snake out of it but I am probably one of the worst scratchers so I don't know how to make the clones and get them to go to the last position of each one.
I always play your scratch games and I have always loved them!
wow griffpatch this is a lot of effort you put in your videos thanks
30:30 I created a game like that but if you didn’t know, on mobile tapping something is actually moving the mouse there then clicking, meaning it is partly mobile friendly already. You just can’t move, which has to be controlled my the thumbstuck
You are always so energetic! These guides help me a lot!!!!! Thanks you!
thank you very much! tomorrow is my birthday and i need something to play with my cousin so i decided to make an game instead of downloading a game, and i am making an online game with mobile friendly because my cousin only have a phone, thank you!
this really helped thanks!!!