Unity Game Dev Full Tutorial – 3D Snake Game



Learn to create a 3D snake game with Unity in this complete tutorial for beginners.

Assets for Tutorial: https://github.com/AwesomeTuts/3d-snake-tutorial/blob/master/3D%20Snake%20Assets.zip

Tutorial covers:
1. Importing Assets And Preparing Our Gameplay Scene
2. Moving The Snake
3. Controlling The Snakes Movement
4. Detecting Collision And Adding Collectable Items
5. Wrapping Up Our Game

Tutorial created by Awesome Tuts. Check out Awesome Tuts Youtube channel: https://www.youtube.com/channel/UC5c-DuzPdH9iaWYdI0v0uzw

On the Awesome Tuts website, you can learn to create a game in 40 minutes: https://www.awesometuts.com/from-scratch-to-game-ws

Learn to code for free and get a developer job: https://www.freecodecamp.org

Read hundreds of articles on programming: https://medium.freecodecamp.org

And subscribe for new videos on technology every day: https://youtube.com/subscription_center?add_user=freecodecamp

source

This Post Has 31 Comments

  1. Shania Shamanta

    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 🙂

  2. Noor Toama

    I need help, whenever my snake touches the bomb, fruit or wall nothing happens in the console or in the game? (I'm at point 1:17:00)

  3. THE STIG

    And how to make snake move smoothly ?

  4. 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.

  5. Rithik 4036

    My snake touches the bomb and fruit but nothing happening over there

  6. Maham Imtiaz

    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…

  7. Minh Chien Le

    i sure i match up score but my code not work, can u help me

  8. Prince Paco YT

    35:07 player controller script is having errors in unity but not in visual studio :/ how do i fix this?

  9. DINESH RAM

    Here I am not able to see sphere Collider on snake
    Why?

  10. Faço questão de escrever em português para elogiar a didática e dicção em inglês, que apesar de rápida, perfeitamente compreensível para quem não tem o inglês como língua nativa. Este é um grande diferencial de seus vídeos. Parabéns.

  11. moue

    I know this is old and all, but the "Random.Range" isn't working anymore, I'm getting an error in Unity.

  12. Armkeyter

    Thank you very much, I have never watched so detailed lesson👍

  13. 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?)"

  14. Erlend Vågeskar

    This was a really great tutorial. You explain things well, what you do, what codes do and why you use it. Tutorial at its finest =D

  15. Business Opportunity in Ruvol

    I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

    It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

    The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

    HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

    I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

    BIG MONEY POTENTIAL IN RUVOL!

    It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

    You may contact me at: rodolfovitangcol@gmail.com.

    Thanks and God bless!

    RODOLFO MARTIN VITANGCOL
    The Ruvol Inventor

  16. Business Opportunity in Ruvol

    I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

    It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

    The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.

    HOW IS RUVOL PLAYED and HOW YOU CAN MONETIZE IT?

    I detailed everything in my YouTube video. Here is the link: https://www.youtube.com/watch?v=jcqth0m3-R0

    BIG MONEY POTENTIAL IN RUVOL!

    It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

    You may contact me at: rodolfovitangcol@gmail.com.

    Thanks and God bless!

    RODOLFO MARTIN VITANGCOL
    The Ruvol Inventor

  17. I am holding up and down arrows after I press play button but snake is moving in just one direction

  18. km o

    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.

  19. km o

    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.

  20. Ghack Dev

    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!

  21. Pramit Samanta

    Fahir's tutorial is the best in youtube ie best free tutorial

Leave a Reply