Multiplayer Snake Game | JavaScript & -

Multiplayer Snake Game | JavaScript &

Traversy Media
Views: 89010
Like: 2776
In this video we will create a multiplayer snake game using

Hungry Turtle Code YouTube Channel:


0:07 – Adrian’s Intro
1:05 – Setting up HTML
2:25 – Setting up the canvas
7:00 – Painting the snake
12:24 – Setting up the socketio server
14:15 – Connecting to socketio from frontend
18:10 – Moving game state to the server
19:58 – Adding a game loop
32:31 – Debugging game loop issue
33:45 – Controlling the snake
40:50 – Home screen for multiplayer game
45:12 – Handling new game on the server
53:30 – Adding ability for second player to join the game
1:01:30 – Handling join game error states
1:03:44 – Modify game mechanics for two players
1:11:48 – Testing the game
1:12:35 – Debugging errors
1:15:15 – Working multiplayer game
1:15:21 – Outro


  1. Thank you for this im watching it rn and making it

  2. This is what I was looking as an inspiration for competition 🙂🙂, Thank you Brad sir and Aidrian sir!

  3. I was about to search for a socket io tutorial when this popped up in my sub box

  4. This is beautiful. Next time please if possible you can do a video on production development of nodejs web apps mostly on the security ,aspect, database security and most of all if possible a web app that spans a large region. In short how to create a full production system which is used by atleast 500 people at a go. Wanna see how to control those errors, seurity aspect ,etc

  5. This is the first video I saw that someone is using Vim for coding.🔥

  6. Adrian is an excellent teacher. I really like the way he explains everthing.

  7. I saw him coding with Vim, instantly subscribed !

  8. Please enable the subtitles…. for me is impossible to understand all!

  9. This video just made my youtube feed exciting really I love it😍

  10. Thanks Brad for another great guest on your channel !

  11. holy shit ur such a good teacher, keep it up!

  12. Just a few minutes in but I need to say that this kind of highlighting the specific areas of which he is talking about in a specific moment is just a brilliant idea. Far better and faster to understand.

  13. There are actually many great creators i did not know about. Thanks for bringing this to us Brad!

  14. I'm passing my javascript objects directly trough without using any parsing in my project. Is there a reason why I SHOULD parse it?

    My logic is that it is already json and doesn't need modification.

  15. Thanx Brad..bcoz of you we are getting these type of great content and personalities.. grateful to u

  16. @BradTravesy Idk how many channels i should follow😂. U got talented people.

  17. This was so refreshing, why's he using vim though

  18. At a time, I tried to set up the Vim for Windows, and the outcome was disappointing. Waiting to see the Vim course.

  19. Literally was wondering about making something like this not 2 hours ago! SO GLAD TO SEE A TUTORIAL. Thanks both of you guys

  20. Now this is a great build! Well done

  21. HTC was a good choice to bring to the family. Not only an interesting topic (multiplayer), but also using an interesting example (game that isn't pong).

  22. Is this something that can be used for party games like those by JackboxGames?

  23. Could be simplified as:
    const { food, gridsize } = state;

  24. A lot of effort has gone into this excellent video.

  25. made simple, thank sir, That was exactly what I was looking for.
    now I can refactor my code properly.
    Thank for GitHub code, there is really a lacking of good example to build game, everything is about building a chat

  26. I was watching one of his videos just the other day! I think me might just be the fastest JavaScript developer on YouTube.

  27. Hey Brad, can you make a video on whatsapp chat bot with python.

    Thank you

  28. Happened a lot of times, that I forgot to call the initialize function 🤣

  29. 1:03:26 how would you go about allowing n users to play matching 2/2 to a game as they connect? Thanks for the vid too, really useful!

  30. Over 1 million subscribers and only 19k views this channel is dying

Leave a Reply

Your email address will not be published.