
Unity Game Dev Full Tutorial - 3D Snake Game
video description
Date: 2022-03-14
Comments and reviews: 10
km
Been looking for tutorials on making snake game in unity and want to test it out in 3D as in snake able to go in 6 directions. There is a lot of tutorials for this game but 1s I-ve found aren-t easy to follow and 1 I found was just 1 script and it does work but it doesn-t explain anything so I-m trying to use that to help me learn but it-s hard not knowing where code is. I-ve only watched first 20 min of this but it looks good and easy to follow I-m looking forward to watching it all later when I-m on unity so I can follow it.
reply
Been looking for tutorials on making snake game in unity and want to test it out in 3D as in snake able to go in 6 directions. There is a lot of tutorials for this game but 1s I-ve found aren-t easy to follow and 1 I found was just 1 script and it does work but it doesn-t explain anything so I-m trying to use that to help me learn but it-s hard not knowing where code is. I-ve only watched first 20 min of this but it looks good and easy to follow I-m looking forward to watching it all later when I-m on unity so I can follow it.
reply
Ghack
I think that the complicated -if logic- :
if (dir == PlayerDirection.UP && direction == PlayerDirection.DOWN --
dir == PlayerDirection.DOWN && direction == PlayerDirection.UP --
dir == PlayerDirection.RIGHT && direction == PlayerDirection.LEFT --
dir == PlayerDirection.LEFT && direction == PlayerDirection.RIGHT)
-
return;
-
Could be simplified to:
if (Mathf.Abs(((int)direction - (int)dir)) == 2)
-
return;
-
Hope it helps! Thanks!
reply
I think that the complicated -if logic- :
if (dir == PlayerDirection.UP && direction == PlayerDirection.DOWN --
dir == PlayerDirection.DOWN && direction == PlayerDirection.UP --
dir == PlayerDirection.RIGHT && direction == PlayerDirection.LEFT --
dir == PlayerDirection.LEFT && direction == PlayerDirection.RIGHT)
-
return;
-
Could be simplified to:
if (Mathf.Abs(((int)direction - (int)dir)) == 2)
-
return;
-
Hope it helps! Thanks!
reply
Swagat
I thought game development must be crazy difficult because I have no idea how animation/graphics work. Since Unity is doing all of that from the code, which I am well versed with, this seemed in my comfort zone. Thank you for ending my worries about game development.
reply
I thought game development must be crazy difficult because I have no idea how animation/graphics work. Since Unity is doing all of that from the code, which I am well versed with, this seemed in my comfort zone. Thank you for ending my worries about game development.
reply
Joby
i understood nothing.u can improve if you tell why you writing each code for..and explaining the datatypes in c#.i dont know c#.its frustrating to hear stuff like delta position when i am not following
reply
i understood nothing.u can improve if you tell why you writing each code for..and explaining the datatypes in c#.i dont know c#.its frustrating to hear stuff like delta position when i am not following
reply
Marcus79
In the PlayerController script at 19:47 I get an error -Error-CS0246-The type or namespace name 'PlayerDirection' could not be found (are you missing a using directive or an assembly reference?)-
reply
In the PlayerController script at 19:47 I get an error -Error-CS0246-The type or namespace name 'PlayerDirection' could not be found (are you missing a using directive or an assembly reference?)-
reply
Shania
Hey, I hope you reply to my comment, I want to ask all the tutorials that you gave me I have followed everything, but my keyboard function does not work, what happen ? please answer :)
reply
Hey, I hope you reply to my comment, I want to ask all the tutorials that you gave me I have followed everything, but my keyboard function does not work, what happen ? please answer :)
reply
km
I have copied up to getting the snake start at random directions but the middle node disappears when I press play. Any ideas why I don-t use gravity on any nodes so it-s not that.
reply
I have copied up to getting the snake start at random directions but the middle node disappears when I press play. Any ideas why I don-t use gravity on any nodes so it-s not that.
reply
KatrinaJohnstonCQU
Is there somewhere to get the actual C# code? my arrows aren't working and the video flicks through the code so fast that I can't be sure where the problem is.
reply
Is there somewhere to get the actual C# code? my arrows aren't working and the video flicks through the code so fast that I can't be sure where the problem is.
reply
Maham
Hey I have a question.... if i want this movement smooth not with the delay... i want actuallly classic smooth movement.. how would i achieve it...
reply
Hey I have a question.... if i want this movement smooth not with the delay... i want actuallly classic smooth movement.. how would i achieve it...
reply
FDGamers_PT
What extension are you using? my visual studio doesn't give me options to complete some lines of codes, for example after a dot.
reply
What extension are you using? my visual studio doesn't give me options to complete some lines of codes, for example after a dot.
reply
Add a review, comment















