This coding with Chris is amazing, once I have all of my games has been gone and now coding with Chris he helped all of my games come back thank you chris
In case anyone wants to add an eye to the snake, here's what you can do: 1. Go to the snake costume and create a new costume, "eye" with two dots on the circle. 2. Within the "When Green Flag Clicked" in the snake code, add a "switch costume to 'eyes' " 3. Within the "When I start as a clone" code, add a "switch costume to costume-1 (the costume without eyes)" That'll make sure your head has eyes. In case you're facing overlap issues, add a "go to back layer" to the "When I start as a clone" script. This will ensure that the eyes always stay on top. Hope this helps!
If you want to make the game stop when it touches an edge, put a new "When green flag clicked block". Then add a "forever loop" and put an "if < > then" inside it. Then inside of the < > put a "touching mouse pointer?" but change it to "touching edge?". Then inside the if then block, add a stop all!
Ooo this will be my answer....”well I know someone who used this website and created some really good games which I couldn’t at all since all the coding was everywhere and it was my year with this class even tho I was interested only into games ;-;. But yes he helped me and now he graduated last year and is joe in this company working for more coding :)”
There is a bit of a better way to do the movement. Set the direction to the actual numbers (0 = up, 90 = right, 180 = down, 270 = left) and instead of adding the 'if's, you can do (point in direction 'variable direction' and then move '5' steps). That gets rid of all the 'if's and makes the code a bit more compact.
Instead of using set direction to right just at the start (as the snake must be moving) we can use set direction to 0 (as the snake won't be moving at the start) and we can also make the snake die whenever it touches the edges and colliding into itself (as the real snake game) Btw nice game to play and is very addictive :p
One way would be having different color for head and body and check when they collide. But you should make sure the body is not attached to the head. Hope it helped ;)
I KNOW check my project scratch.mit.edu/projects/469081213/ basically when you create a clone move 7 steps in ur current direction also make it so that u change x or y by 1 or -1 when u click WASD or up down left right then make a new costume for the clones and change its color then when touching that color make it die idk if u can change proportions
In the original game, you couldn't turn in the opposite direction that you were facing so what I did was "When up arrow key is pressed, if direction=down, blank, else, set direction to up."
i can not believe my project had 300 loves thankyou very much coding with chris because of you i had 300 loves in the snake game project that i shared i made it with this tutorial thankyou very veryyyyyyyyyyyyyyyyyyyy much
Hi Chris, great tutorial, thank you! Is there a way I can program so the game stops when the snake "eats" itself? I have tried it with different colours but it didnn't quite work for me. Thank's
Hello 👋🏼 Coding With Chris I loved this video 📷 it helped me a lot in my technology class I passed my class because of this thank you a lot for Making this video ❤️:)
i use python instead as it gives me more practise for other coding languages and as long as i can do graphic design on python well, then i can make this game way more customisable just by myself. btw great turtorial!
Instead of going throughh so much trouble to make the steak go to a random posittion, I suggest just using the 'go to (random position)' block. Also, the way of making the snake move in a particular direction is also inefficient. Instead of changing variables, I would strongly suggest using: Eg. making the snake move up: when green flag clicked Repeat forever If Point in direction (90) (If loop closed) Move (5) steps (Repeat forever loop closed)
Bro thank you so much for this video, you're a real lifesaver. I had a homework where we had to make a game on Scratch 3.0 and this has helped me out a lot!! I subscribed with notifications on BTW.
the only problems are, for example if you are going right, you are able to press left and go inside yourself, also you can hit yourself and be just fine. Good base project tho.
Great video! but i have a question. A variable always has to be defined by something right? For example when you made the variable direction made it equal to "Left" you assigned the left key to that. Which makes direction left, equal to the left arrow key. But when you made the variable "length" im so confused, you didn't assign it to anything. How does the variable work if you didn"t assign it a value?
WackoRobin7485 that’s definitely the easier and more efficient way to go. But I was also trying to show how it can be done with operators. But thx for pointing out . Pinning this ;)
Hello Chris! I've watched your video trying to make a simple snake game for fun. I've followed everything you've done in the video, but the one problem is, before I even touch the food in which you should eat to gain length, I'm already gaining length. (better explanation ; 6:20 to 6:30) Do you know how to fix this? Hope you respond. Thanks!
i was thinking when u make it multi player and put it as a tutorial pls make the big snake is able to eat smaller snakes and obstacles on it way wich if u touch will decrese ur length
Oh! And also I really liked this tutorial and I really, REALLY want you to post a multiplayer snake game! I will make it so that you can play snake with the computer, since I don't know how to make a multiplayer game.
i love you soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
A lot of people have mentioned there was a problem with length. I believe I did not reset it. Make sure you set length to 0 in the beginning ;)
@@alpeshpatel6486 yes
try when clicked flag
set lenght 0
This coding with Chris is amazing, once I have all of my games has been gone and now coding with Chris he helped all of my games come back thank you chris
i can become coder with this channel
frick
you just saved me from failing my class
Lol
I am also seen for my class
Me too thanks
@@asapeinlovingscience6650 hjbj l
Also
In case anyone wants to add an eye to the snake, here's what you can do:
1. Go to the snake costume and create a new costume, "eye" with two dots on the circle.
2. Within the "When Green Flag Clicked" in the snake code, add a "switch costume to 'eyes' "
3. Within the "When I start as a clone" code, add a "switch costume to costume-1 (the costume without eyes)"
That'll make sure your head has eyes. In case you're facing overlap issues, add a "go to back layer" to the "When I start as a clone" script. This will ensure that the eyes always stay on top.
Hope this helps!
thanks you are the best
?
Thanks for the help 🙏
are the eyes on the side of the head?
Thank u. But I would prefer to just put eyes on the costume.(no offence)
If you want to make the game stop when it touches an edge, put a new "When green flag clicked block". Then add a "forever loop" and put an "if < > then" inside it. Then inside of the < > put a "touching mouse pointer?" but change it to "touching edge?". Then inside the if then block, add a stop all!
is there a way to make it end if it touches the snake again as well?
Everyone gangsta until the teacher asks "Can you tell me how you made it?"
Ooo this will be my answer....”well I know someone who used this website and created some really good games which I couldn’t at all since all the coding was everywhere and it was my year with this class even tho I was interested only into games ;-;. But yes he helped me and now he graduated last year and is joe in this company working for more coding :)”
@@mayonera904 Lol I would probably say oh first I used the green flag clicked block then- I would tell the literal process
Lol true
@@Peach_Peachy wait but don’t the teacher already know how to work it since it’s your teacher ..?
@@mayonera904 welllll My teacher asks so
There is a bit of a better way to do the movement. Set the direction to the actual numbers (0 = up, 90 = right, 180 = down, 270 = left) and instead of adding the 'if's, you can do (point in direction 'variable direction' and then move '5' steps). That gets rid of all the 'if's and makes the code a bit more compact.
That's exactly what I was thinking
Did u know
That maybe
Making ur own tutorial
Is better?
@@SoulLexx what
@@qk7x that was 4 months ago
go away noob
@@SoulLexx oldest scratch user:
Instead of using set direction to right just at the start (as the snake must be moving) we can use set direction to 0 (as the snake won't be moving at the start) and we can also make the snake die whenever it touches the edges and colliding into itself (as the real snake game)
Btw nice game to play and is very addictive :p
Poetry Dragon - Text Adventure Game!
repl.it/talk/share/Poetry-Dragon-Text-Adventure-Game/51211
How do I make the snake "die" when it touches itself?
One way would be having different color for head and body and check when they collide. But you should make sure the body is not attached to the head. Hope it helped ;)
@@CodingWithChris How do I make the head not touching the body?
@@CodingWithChris yes how to
I KNOW check my project scratch.mit.edu/projects/469081213/
basically when you create a clone move 7 steps in ur current direction
also make it so that u change x or y by 1 or -1 when u click WASD or up down left right
then make a new costume for the clones and change its color
then when touching that color make it die
idk if u can change proportions
@@CodingWithChris it did not work search up snaaaaaaaaaaaaaaaaake
I love the project soo much and l have done it in my laptop
In the original game, you couldn't turn in the opposite direction that you were facing so what I did was "When up arrow key is pressed, if direction=down, blank, else, set direction to up."
Can you make that line of code in scratch hat's difficult to understand reading
Never mind, I figured it out
wow nice
Uyanga Maya yeah it is nice
i just got a apple from the sprite selection for the food this is so helpfull!
Drew Banks yeah that works too, thx for watching ;)
i can not believe my project had 300 loves thankyou very much coding with chris because of you i had 300 loves in the snake game project that i shared i made it with this tutorial thankyou very veryyyyyyyyyyyyyyyyyyyy much
Wow great, glad to know that ;)
I did this whole thing on my laptop and it worked! Thank you so much! Keep on making these types of vids! You did awsome!
did you right and left break bc mine did
this is awesome
Very helpful that got me my grade for computing but how do I make the wall and for the snake to disappear aka die
Great Job
PranavPratik Natarajan he did great
Cool tutorial! We followed it in our coding class.
Oh awesome ;) thx
Me too
@@CodingWithChris Can you make multiplayer snake game on scratch with cloud vars
very nice and interesting game
This is the first time a game tutorial actually works, thank you for making it simple and easy
Yes, it was very simple and I liked it~
Only once what do u mean
first video that worked?? try watching griffpatch
Great video
Thanks Chris we did the snake game and enjoyed !
thanks a lot, I can made this nice with score and sound
thank u very much man.pls keep it up ur good things.Love from Sri Lanka.
Thank you very much for watching ;) appreciate your support
The sussiest language in sri lanka XD
Thanks for saving me from a dangerous moments😂
great tutorial it really helped and I think you forgot to add a chomp sound effect to the steak
Adam Gallagher haha, thx good idea ;)
Thanks
You are the best for teacher for scratch
You will make better future for childrens❤️
❤️❤️❤️❤️
Hi Chris, great tutorial, thank you! Is there a way I can program so the game stops when the snake "eats" itself? I have tried it with different colours but it didnn't quite work for me. Thank's
Thats what I was also thinking. I don't think there's a way to ask [if touching snake?]
I was thinking the same thing
Omg I thought the sameee
THANK You for making this gaming 🥰🥰🥰
I HOPE YOU WILL MAKE MORE GAME LIKE THIS
You are simply amazing
THIS HELPED ME WITH MY ROBOTICS SUBJECT THANK YOUUUUU
Mee tooo!!!
What is your teachers name?
@@wicked8752 I'm from Philippines :)
@@wicked8752 Are you?
@@evonne3338 nope
YOUR CODING ARE AMAZING
Awsome video as always and thxs for making a snake game I have been wondering how to make them on scratch and now I know so thxs chris 🤟🤩👍
You are the best teacher i have got
Love this, but how can I make the game end if the head of the snake touches his clones
I've never loved someone this much in my life :)
chilllll 😳
Hello 👋🏼 Coding With Chris I loved this video 📷 it helped me a lot in my technology class I passed my class because of this thank you a lot for Making this video ❤️:)
i use python instead as it gives me more practise for other coding languages and as long as i can do graphic design on python well, then i can make this game way more customisable just by myself. btw great turtorial!
hi can you tell me how to reset the length after game stops
its so good i like it
I have a question, how do you make the game over if you hit youself, like in google snake?
I thought the same. No answer lmao.
my snake is getting longer lolzz..thanks though for teaching me this
I like the tutorial so much
Thank you very much for watching and nice comment ;)
Instead of going throughh so much trouble to make the steak go to a random posittion, I suggest just using the 'go to (random position)' block.
Also, the way of making the snake move in a particular direction is also inefficient. Instead of changing variables, I would strongly suggest using:
Eg. making the snake move up:
when green flag clicked
Repeat forever
If
Point in direction (90)
(If loop closed)
Move (5) steps
(Repeat forever loop closed)
This WORKED OMG no way chris you are awesome
@Jacob Liu He is speaking hindi its my Native language so I will translate it for you:
I have made a new game
very nice love 😍 it.
Bro thank you so much for this video, you're a real lifesaver. I had a homework where we had to make a game on Scratch 3.0 and this has helped me out a lot!! I subscribed with notifications on BTW.
Yeah we definitely had the same teacher
@@seastarlit4134 I am in a IT group and I have to show them to make a game so its kinda my assignment
@asapeinlovingscience6650 same
This is a great game you made. I will try to make it too👍
Very helpful! 😄
THAT WAS AN EPIC STEAK
i love thissss its AMAZING imsoo glad you made a vid for this eeek im so exited
Me too, and you help me a lot to inspire my family 😃
Cool video
the only problems are, for example if you are going right, you are able to press left and go inside yourself, also you can hit yourself and be just fine. Good base project tho.
when left arrow key pressed
if not direction = right then
set direction to left
did this for my exam thank you so much
sooo helpful!!
Great
Wow , it's easier than I thought .. thank you for giving me an idea 🙏
🤟Awesome
Coding with Chris, I like the way you drew your steak.
TEMILOLUWA MAKINDE haha, I’m not a good artist but that kinda turned out well yeah. Thx for the comment and watching ;)
@@CodingWithChris Hehe, I though it was a weird apple :D
Very nice
Great video! but i have a question. A variable always has to be defined by something right? For example when you made the variable direction made it equal to "Left" you assigned the left key to that. Which makes direction left, equal to the left arrow key. But when you made the variable "length" im so confused, you didn't assign it to anything. How does the variable work if you didn"t assign it a value?
That’s a good catch. I should have set the length to zero after clicking green flag.
Hmm. I DID have a bug before I reset it, so I don't know why it works.
When green flag is clicked, then add the length variable set to 0. Above the set direction That worked for me!
your videos help so much with my coding class thank you so much my grade is so high
Thanks for the amazing begginer game! ill see more vids from u to do more in scratch bc you are understandable
Thx for the comment ;)
Thank uhh soooo much It helped me a lot .... I also created my own game thank u once again
Can you do "go to random position" for the food?
WackoRobin7485 that’s definitely the easier and more efficient way to go. But I was also trying to show how it can be done with operators. But thx for pointing out . Pinning this ;)
Thanks! I did not understand at first because I am new to scratch, but I am starting to get the idea now.
probably that makes sence!
@@Dr4qon i was about to comment the same thing but then i saw your comment
Coding With Chris how do i die
Thank u very much for this tutorial
I love it but instead of drawing the apple u can just take it as a sprite in the Foods section
Ty for this
this is usefull because i will do a game my self with whole class and i can get a head start
At first I thought this was complicated but TRUST me this is so helpful. Tysm it means a lot
Haiiiiii I watch ur vids lol I code on scratch too!
This project helped me with another project I am making
ayo who else is watching his tutorials to inpress there teacher
ha lol same XD
jesus what a teacher pet lol
YOU ARE AMAZING!!!
i just made one but everytime my snake get longer and then i start over the snake is the same length as i stopped at?
Klara remember to reset length to 0 when you click green flag ;)
Coding With Chris how
@@xl_bxseplayer_lx7622 variables -> set (length) to 0
@@nelew3003 I cant find set length I can see set direction
@@sherin1188 select 'length' from the drop down list by left clicking on the 'direction' option there
Thank u I needed it for school
he said im gonna wait a while
0.1 secs
hahahha
Chris Cutler haha I need to think before I speak ;)
I can only move left and right...but you're great!
Hello Chris! I've watched your video trying to make a simple snake game for fun. I've followed everything you've done in the video, but the one problem is, before I even touch the food in which you should eat to gain length, I'm already gaining length. (better explanation ; 6:20 to 6:30) Do you know how to fix this? Hope you respond. Thanks!
Hey there. Well that could only mean your if block had a problem. Make sure you change length only if touching food . Good luck ;)
@@arshia8769 with an if then block duh
i was thinking when u make it multi player and put it as a tutorial pls make the big snake is able to eat smaller snakes and obstacles on it way wich if u touch will decrese ur length
Nice video inspirational
your game is very good. I like it
best i have created the same thnks alot
Nice
Oh! And also I really liked this tutorial and I really, REALLY want you to post a multiplayer snake game! I will make it so that you can play snake with the computer, since I don't know how to make a multiplayer game.
Thank u so much sir very easy and efficient
you are really really a hard worker i am saying the truth
it's reallynice
Really cool , Thanks A LOT ! you teach SUPER COOL AND EASY how to make games on Scratch , THANK YOU ! 😃😃😃😃😃😃😃😃😃
nice tutorial
i like your videos super
cool it's very helpful
It was a very nice tutorial !!
very nice bro
Thanx @Coding with Chris for this video BTW we want a multiplayer snake game if possible.
very creative thanks chris
We were working on this instant thank you for saving my life
IN 3 words OMG!!! it really works
Cool
THIS WORKED THANK YOU SO MUCH
Really awesome and creative 😄😄😄👏👏👏
I'm really excited 😚😚😚thank you....
i love you soooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
its amazing
you help me with scratch so much tysm